Skip to content

Cønverting yøur audiø files

Møffenzeef Mødular edited this page Nov 6, 2016 · 10 revisions

Taken directly from TechnoBlogy Tutorial

Extract the raw audio data

The WAV file format contains a 44-byte header followed by the raw data. On a Mac or Unix computer you can dump the data in a C-friendly text format using the built-in xxd command in a Terminal window:

Copy the audio file into your home directory. Open the Terminal application. Type the following command, substituting the name of your WAV file:

xxd -i -s +44 quack.wav

The -i parameter tells xxd to output the data in C include format, and the -s parameter specifies an offset to omit the first 44 bytes of the file. The output will look something like:

It also gives you a variable containing the length of the data, which we will use to detect the end of the audio.