Program? ... I used a MIDI version of the song and converted it to a wav file and burned the wav file in an EEPROM. The EEPROM was played with a simple R2R dac and an LM386 Audio amplifier. Granted this was awhile ago, but for the most part you can still go this route.
Once you have the song in EEPROM by whatever means, it's nothing for a micro controller to sequentially read the EEPROM and present the data to some output pins.
When you said you needed a 'song' I assumed that you had the hardware to support playing the song. Tell us what you have so that we can better assist you..
Another question is to ask what kind of quality you want.... it wouldn't be the EEPROM on your computer, it would be a stand-alone memory.
That aside, if you want this by tomorrow, I would suggest getting the song sheet for that song, or whatever song you like. ...convert that into the proper tones that a BS2 can generate. Since you have essentially two voices on the BS2 when it comes to generating frequency, you could stagger the frequencies slightly to create a smoother sound.
There are programs already out there for the BS2 where you can just enter the notes. but at the moment I can't put my hands on them. I have seen them in the forum though.
Can you attach the code you have? Since the BS2 is a single processor device you won't be able to play music and do other tasks, unless you carefully orchestrate your timing and events. That said, when the BS2 is playing music, it will be stuck playing music. The only chance to do any task oriented code will be between any pauses in the music.
There was a project not long ago that used a Basic Stamp to play "God Save the Queen" in between waving a hand and some other movement. I know code was posted for it. I might be useful to you.
I use the S2's GUI to enter music and sounds I want a Propeller to play and paste the generated code into my larger program. I haven't used the original Scribbler, but maybe it has a GUI that would make it easier to enter music.
There are many sound programs for the BS2px-based Parallax Penguin robot, free for download here. You could adapt the tunes and programs to the BS2 by adjusting the timing. The Penguin Jukebox has 11 popular tunes. The KTV program is also a good tune program. A zip of all sound files is available here for download.
Comments
-Android
Once you have the song in EEPROM by whatever means, it's nothing for a micro controller to sequentially read the EEPROM and present the data to some output pins.
When you said you needed a 'song' I assumed that you had the hardware to support playing the song. Tell us what you have so that we can better assist you..
That aside, if you want this by tomorrow, I would suggest getting the song sheet for that song, or whatever song you like. ...convert that into the proper tones that a BS2 can generate. Since you have essentially two voices on the BS2 when it comes to generating frequency, you could stagger the frequencies slightly to create a smoother sound.
There are programs already out there for the BS2 where you can just enter the notes. but at the moment I can't put my hands on them. I have seen them in the forum though.
-Android
http://www.youtube.com/watch?v=MvZS9gSKRp4
I use the S2's GUI to enter music and sounds I want a Propeller to play and paste the generated code into my larger program. I haven't used the original Scribbler, but maybe it has a GUI that would make it easier to enter music.
-Phil