wav file converting...

Hi all! I got a problem. I want to convert a wav sound file for arduino ide but i don't do it. Please help me!

Here is an example

static const uint8_t PROGMEM ring[] = {
0x00, 0x03, 0x05, 0x08, 0x0A, 0x0D, 0x0F, 0x12,
0x14, 0x17, 0x19, 0x1B, 0x1E, 0x20, 0x23, 0x25,
0x28, 0x2A, 0x2D, 0x2F, 0x32, 0x34, 0x37, 0x39,
0x3C, 0x3E, 0x40, 0x43, 0x45, 0x48, 0x4A, 0x4C,
0x4F, 0x51, 0x54, 0x56, 0x58, 0x5B, 0x5D, 0x5F,
0x62, 0x64, 0x66, 0x68, 0x6B, 0x6D, 0x6F, 0x72,
0x74, 0x76, 0x78, 0x7A, 0x7D, 0x7F, 0x81, 0x83,
0x85, 0x87, 0x89, 0x8C, 0x8E, 0x90, 0x92, 0x94,
0x96, 0x98, 0x9A, 0x9C, 0x9E, 0xA0, 0xA2, 0xA4,
0xA6, 0xA8, 0xA9, 0xAB, 0xAD, 0xAF, 0xB1, 0xB3,
0xB4, 0xB6, 0xB8, 0xBA, 0xBB, 0xBD, 0xBF, 0xC0,
0xC2, 0xC4, 0xC5, 0xC7, 0xC8, 0xCA, 0xCB, 0xCD,
0xCE, 0xD0, 0xD1, 0xD3, 0xD4, 0xD5, 0xD7, 0xD8,
0xD9, 0xDB, 0xDC, 0xDD, 0xDE, 0xE0, 0xE1, 0xE2,
0xE3, 0xE4, 0xE5, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB,
0xEC, 0xED, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2,
0xF3, 0xF3, 0xF4, 0xF5, 0xF5, 0xF6, 0xF7, 0xF7,
0xF8, 0xF9, 0xF9, 0xFA, 0xFA, 0xFB, 0xFB, 0xFB,
0xFC, 0xFC, 0xFD, 0xFD, 0xFD, 0xFE, 0xFE, 0xFE,
0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xFD, 0xFD, 0xFC,
0xFC, 0xFB, 0xFB, 0xFB, 0xFA, 0xFA, 0xF9, 0xF9,
0xF8, 0xF7, 0xF7, 0xF6, 0xF5, 0xF5, 0xF4, 0xF3,
0xF3, 0xF2, 0xF1, 0xF0, 0xEF, 0xEE, 0xED, 0xED,
0xEC, 0xEB, 0xEA, 0xE9, 0xE8, 0xE7, 0xE5, 0xE4,
0xE3, 0xE2, 0xE1, 0xE0, 0xDE, 0xDD, 0xDC, 0xDB,
0xD9, 0xD8, 0xD7, 0xD5, 0xD4, 0xD3, 0xD1, 0xD0,
0xCE, 0xCD, 0xCB, 0xCA, 0xC8, 0xC7, 0xC5, 0xC4,
0xC2, 0xC0, 0xBF, 0xBD, 0xBB, 0xBA, 0xB8, 0xB6,
0xB4, 0xB3, 0xB1, 0xAF, 0xAD, 0xAB, 0xA9, 0xA8,
0xA6, 0xA4, 0xA2, 0xA0, 0x9E, 0x9C, 0x9A, 0x98,
0x96, 0x94, 0x92, 0x90, 0x8E, 0x8C, 0x89, 0x87,
0x85, 0x83, 0x81, 0x7F, 0x7D, 0x7A, 0x78, 0x76,
0x74, 0x72, 0x6F, 0x6D, 0x6B, 0x68, 0x66, 0x64,
0x62, 0x5F, 0x5D, 0x5B, 0x58, 0x56, 0x54, 0x51,
0x4F, 0x4C, 0x4A, 0x48, 0x45, 0x43, 0x40, 0x3E,
0x3C, 0x39, 0x37, 0x34, 0x32, 0x2F, 0x2D, 0x2A,
0x28, 0x25, 0x23, 0x20, 0x1E, 0x1B, 0x19, 0x17,
0x14, 0x12, 0x0F, 0x0D, 0x0A, 0x08, 0x05, 0x03 };

What you are doing? What is this that you are posting? In the .wav file, you have a few bytes at the beginning of the file that is the header of the file and that are not "sound". If you want to play the .wav file in the Arduino you must "throw away" that header.

i want to embed a converted wav file in a program but i didn't find a converter program. I have try winhex and itunes programs but not working.

In this tutorial, they introduce a few methods to do that.

i saw that and applicated but not work. so, thanks a lot of for interesting "luisilva"...

How you want to play the sound?

ha13151:
Hi all! I got a problem. I want to convert a wav sound file for arduino ide but i don't do it. Please help me!

Shall we make a guess about the operating system of your PC you want to use for the data conversion?

In that case: I'm guessing you are using the Windows operating system.

If so, you could use the Audacity software to create a binary data file as you need it. And then you could use a binary-to-C conversion tool to convert the binary data to C data lines that can be used in the code editor.

I’m using windows 7. I am trying different sound make with arduino uno like this ------>>>

ha13151:
I'm using windows 7. I am trying different sound make with arduino uno like this ------>>>
http://www.instructables.com/id/Arduino-Chiptunes/?ALLSTEPS

"This" is NOT a WAV file player.

It seems to be some kind of "synthesizer", which creates algorithmic sound based on the data in the input array.

So you might have two possibilities to midify the sound:

1st possibility: Randomize
Modify the "songdata" array as you like. Convert WAV files or use the random() function to generate data. The resulting blips and bleeps will be purely randomized then.

2nd possibility: Compose
I thinkThis is the original project: The hardware chiptune project

English is not my mother language, but I think the composer is in the download "hardwarechiptune-tracker" and it is a Linux software. And I don't quite understand how the composing actually works. But as the original author is a musician and composer of electronic music, I think it works like that: He plays the music that he wants on an electronic keyboard which is connected to the PC sound card. The software then samples the played song to the songdata.

Thank you all guys! I found my question 's answer at this youtube video :slight_smile: