having a problem with a .wav object
mikea
Posts: 283
I downloaded an object for reading and playing wav files from an sd card. I haven't been able to make it work yet, and during the course of this somehow made my sd card write protected. I think when i ran the code it write protected it so i can't change anything on it from my computer.There is a format option, but this doesnt seem to cure the write protection problem. The object link is http://obex.parallax.com/objects/567/ If anyone can point me in the right direction on any of these issues i would appreciate it. It looks like this object plays back a certain file at different rates. The ideal thing for me would be to play a certain wav file based on a condition.Thanks.-mike
Comments
Problems with sd can be caused by hardware. In my environment, SD card added to Propeller Demo Board sometime caused resets and other strange symptoms. After one of these resets SD card was empty, all files disappeared.
Then I added 100 uF capacitor between vcc and vdd, soldered directly to SD slot and this solved all my problems with SD card
There is no resistors In my configuration. Only this 100 uF capacitor added after these stability problems.
OBC
What i am doing is just replacing "wilhelm.wav", with the file name my wav file is saved under in my laptop that i copied to the sd card "whatever.wav". Is this correct?...I feel like i'm making a simple mistake somewhere and not sure how to proceed.-mike
http://obex.parallax.com/objects/567/
there is a demo wave player program
You have to rename your wave file to wav.wav or change this name in the code
Try this. I use this program ( after I remove all this tempo change stuff) to play wav files.
Are you using supported wav files? 16bit or 8bit. Note the information on this in the top of the file I posted. There is a free program to convert them.
Also, I'm having some doubts about your SD configuration. Could you test it with another known program like Femtobasic and see if the "files" command works for you?
OBC
FemtoBasic doesn't work with SDHC.
Has anyone written a "simple", "one-trick" test program to simply display a list of files from SD using K's code?
This would have been handy in debugging this.
OBC
I have a KyeDos. I had to modify it to work with my environment - I replaced SD driver to newest version from OBEX. Its "dir" command seems to work, displaying names in 8.3 format.
I plan to write my own code for this as soon as I finish this "VGA Nostalgia" driver which I want to use with it. First program I want to do with it is media player (sid/ym/wav) with sdhc/fat32 support - Ahle's version is written for TV driver and I am listening to these tunes without any video output and it doesn't support fat32 (it can see only a few files in it)
Yes good idea, as Kye updated the driver after Kyedos was published.
]
That sounds fun. Back in the olden days when memory was precious everyone compressed to .mp3. But SD cards have so much capacity now you can easily just expand your music collection back to .wav files. A media player would be cool.