Required file format for unsing playSDRaw

Status
Not open for further replies.
Hi,

because i've got problems with sample playback in my edrum standalone project (see other post), i now want to try, if playSdRaw works better for me.
The samples, i want to use are still in 16 bit stereo 44100 Hz Wav Format.

No i'm wondering, how i can convert them to the required RAW-Format for the playSdRaw Object.
The documentation says:

"The data file must be RAW 16 bit signed integers in LSB-first format."

But my Steinberg WaveLab knows only the formats "Raw- Big Endian" and "Raw - Little Endian".
Which one is the right one? If both are incorrect: Can you suggest a good free converter which can do this required format?

And as the playSDRaw object is mono, i think i have also to set "mono" in the converter options, is this correct?

Best regards

Daniel
 
Lsb first is a synonym for little endian. And yes, your audio software has to sum both stereo channels up to a mono channel.
 
basementmedia wrote "The samples, i want to use are still in 16 bit stereo 44100 Hz Wav Format."

If this is standard RIFF Microsoft signed 16 bit stereo 44100 .WAV file then the audio data in the file will be Little Endian. That means because the audio is 16 bits wide, each 16 bit sample has to be stored in 2 bytes, the LSB (Least significant Byte) is stored first at the lower byte location followed by the MSB (Most significant Byte) stored in the next adjacent higher location. The bit order in each byte does not change. Also because it is signed data, the data is stored as 2's complement so if the msb (most significant bit) of the MSB (most significant byte) is a "1" then the 16 bit data value is negative, otherwise it is positive.

it can be converted from WAV to RAW using Audacity - Export as "other uncompressed" and pick what ever other parameters you need. Audacity will combine stereo to mono if required.

It can also be converted to RAW using the SOX program as described in the Teensy web pages.

A WAV file has a header of 44 bytes that describes the parameters of the data part to the system playing the file. The data part follows the header in the file.
A RAW file is the same data part but with the header removed. So it can play audio immediately without having to parse the header.
 
Status
Not open for further replies.
Back
Top