Skip to content

Sample data

Prerequisite

This section requires a basic understanding of SoundFont 2.04 and binary.

SoundFont sample data is accessible through SoundFont3.sampleData.

  • Samples are WAV files in linear PCM format.
  • Each sample is padded with at least 46 bytes in between.
  • Sample must loop so end point value matches start point value.

smpl - 16-bit WAV

Accessible through SoundFont3.sampleData

WAV file in 16 bit signed little endian (least significant byte first).

C
int16_t[] soundFontVersionMajor = ... // Multiple 2 byte
char zeroPadding = 0 // >= 46 byte
// Even number of byte total

sm24 - Plus 8-bit WAV

If 24-bit WAV is provided. The additional 8 bit detail is stored in this chunk. Chunk size should be 1/2 of smpl

C
int8_t[] soundFontVersionMajor = ...
char zeroPadding = 0 // >= 46 byte
// Even number of byte total