Need a util to convert file to an array!

I urgently need a util to convert a binary file into an array which I can include via PROGMEM in my code. I need it because I want to include a small raw sound sample in my program space.

I'm guessing someone's written a utility like this since it would have a ton of uses besides playing back sounds.

If anyone could help me out with this I'd be most grateful!

What is the current format, and how does it look (in the file) what format do you want for the array?

I'll be saving the file as raw 8bit unsigned sound data from Sound Forge. So I just need an array of bytes.

so you need an app that for each eight bit value, convert that to ascii representation, print it and comma if there is a next value ?

I do not know if anything like that exists, but it would be fairly trivial to program it

Yes it is pretty simple sounding.

Problem is I have 18 hours to finish the rest of the program, solder together 9 boards, and complete paint and assembly on 7 other props, two of which have boards that need a little repair. So I don't have time to download a compiler figure out how to intall it properly, write an app that can read and save files (haven't done that in years) and compile an app.

http://alexanderbrevig.com/temp/Arrayify.jar

I hope that help you :slight_smile:

Thanks for the help!

Unfortunately I failed to finish this particular project in time for Halloween, but it'll still get done, and I'm sure the code will come in handy.