russcky 9 Posted September 27, 2013 Share Posted September 27, 2013 I've been looking for a while and can't find a good example showing how I can play any sort of music or speech files (mp3, au, wav, etc.). I've got a configuration setup that allows me to read files for things like LCD screens, I'm looking to read a music or speech file and play it through an amplified speaker. I'm not looking to make just tones, rather to play full music or speech files. I've found projects for Arduino such as (http://hlt.media.mit.edu/?p=1963), but nothing that works with MSP430 and Energia. Has anyone done something similar to this with Energia? Quote Link to post Share on other sites
Rickta59 589 Posted September 27, 2013 Share Posted September 27, 2013 http://forum.43oh.com/topic/1501-ti-launchpad-plays-bad-apple/ Quote Link to post Share on other sites
russcky 9 Posted September 27, 2013 Author Share Posted September 27, 2013 I found exactly what I was looking for here: http://artists.sci-toys.com/speech This is working great! JWoodrell, energia and spirilis 3 Quote Link to post Share on other sites
spirilis 1,264 Posted September 27, 2013 Share Posted September 27, 2013 That's pretty cool. An "eventual" goal of mine is to store a couple minutes of PCM audio on a serial flash chip or something and stream it out using an MSP430F5172 with its Timer_D used for higher-resolution (e.g. hopefully 10 or 11 bit) output. I have the serial flash chip soldered to an SMD protoboard, just haven't got around to playing. russcky 1 Quote Link to post Share on other sites
spirilis 1,264 Posted September 27, 2013 Share Posted September 27, 2013 Actually I should step up the pace on that project, because Halloween will be here before ya know it and I want to scare the bejesus out of the kids in my neighborhood :grin: I have a PIR motion detector for this project too... russcky 1 Quote Link to post Share on other sites
energia 484 Posted September 27, 2013 Share Posted September 27, 2013 That's pretty awesome! Great find! spirilis and russcky 2 Quote Link to post Share on other sites
Rickta59 589 Posted September 27, 2013 Share Posted September 27, 2013 I found exactly what I was looking for here: http://artists.sci-toys.com/speech This is working great! Won't the lack of current limiting resistor on the first circuit fry the P1.6 pin? And what about some resistors for the npn transistor on the 2nd circuit? -rick Quote Link to post Share on other sites
russcky 9 Posted September 29, 2013 Author Share Posted September 29, 2013 Anyone know of an easy way to convert audio files such as 'wav', 'mp3' or 'au' to byte arrays? The online tool in the article above didn't work properly for me. I'm getting an error something like this from his website: /var/www/vhosts/sci-toys.com/artists/libsndfile-1.0.25/examples/wave_to_launchpad /tmp/phpSuuJaI > /tmp/bar I thought I had found something during my searching last night but forgot to bookmark the app, and now I'm not able to find anything either as a program or web app. Anyone else saving audio as byte arrays to save on SD cards for playback on MSP's? Quote Link to post Share on other sites
Rickta59 589 Posted September 29, 2013 Share Posted September 29, 2013 The program Audacity provides many ways to resample and convert from compressed audio formats to raw PCM data. -rick russcky 1 Quote Link to post Share on other sites
spirilis 1,264 Posted September 29, 2013 Share Posted September 29, 2013 Also the 'sox' CLI program in Linux offers simple wav conversion stuff. Sent from my Galaxy Note II with Tapatalk 4 russcky 1 Quote Link to post Share on other sites
mafiaWolf 0 Posted March 17, 2015 Share Posted March 17, 2015 I found exactly what I was looking for here: http://artists.sci-toys.com/speech This is working great! Have you done this demo yet? Quote Link to post Share on other sites
zeke 693 Posted March 18, 2015 Share Posted March 18, 2015 Not too long ago, I read about some clever guys who figured out a way of creating pretty high quality audio from an arduino or similar just by using two pwm outputs in a sort of class b amplifier configuration. One output created the first 180 degrees of audio and the second created the remaining 180 degrees. They said that it sounded like 16 bit audio from an eight bit micro. They played some music samples on camera and it sounded remarkable good. I wished I could remember where I read about this. Maybe the adafruit blog. Quote Link to post Share on other sites
austen520 6 Posted June 29, 2015 Share Posted June 29, 2015 I've been toying with this method over the last few days for an audio synthesizer project. With a 62.5KHz PWM (16MHz main clock with CCR0 set to 255), it works well for lower frequencies, as long as you feed the PWM into an appropriate low pass filter. TI has a decent application report that details how to set this up with the MSP430: http://www.ti.com/lit/an/slaa497/slaa497.pdf @zeke: That sounds like a great idea. I did some googling and found some interesting resources on the topic from Open Music Labs: http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/(theory) http://wiki.openmusiclabs.com/wiki/PWMDAC(an example using arduino) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.