Jump to content
russcky

Music or Speech using MSP430G2553 and Energia

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×