TAG_SMPL structure

RIFF "smpl" tag structure.

typedef struct {
    DWORD dwManufacturer;
    DWORD dwProduct;
    DWORD dwSamplePeriod;
    DWORD dwMIDIUnityNote;
    DWORD dwMIDIPitchFraction;
    DWORD dwSMPTEFormat;
    DWORD dwSMPTEOffset;
    DWORD cSampleLoops;
    DWORD cbSamplerData;
    TAG_SMPL_LOOP SampleLoops[];
} TAG_SMPL;

Members

dwManufacturerSpecifies the MMA Manufacturer code for the intended target device. The high byte indicates the number of low order bytes (1 or 3) that are valid for the manufacturer code. For example, this value will be 0x01000013 for Digidesign (the MMA Manufacturer code is one byte, 0x13); whereas 0x03000041 identifies Microsoft (the MMA Manufacturer code is three bytes, 0x00 0x00 0x41). If the sample is not intended for a specific manufacturer, then this field should be set to zero.
dwProductSpecifies the Product code of the intended target device for the dwManufacturer. If the sample is not intended for a specific manufacturer’s product, then this field should be set to zero.
dwSamplePeriodSpecifies the period of one sample in nanoseconds (normally 1/nSamplesPerSec from the WAVEFORMAT structure for the RIFF WAVE file--however, this field allows fine tuning). For example, 44.1 kHz would be specified as 22675 (0x00005893).
dwMIDIUnityNoteSpecifies the MIDI note which will replay the sample at original pitch. This value ranges from 0 to 127 (a value of 60 represents Middle C as defined by the MMA).
dwMIDIPitchFractionSpecifies the fraction of a semitone up from the specified dwMIDIUnityNote. A value of 0x80000000 is 1/2 semitone (50 cents); a value of 0x00000000 represents no fine tuning between semitones.
dwSMPTEFormatSpecifies the SMPTE time format used in the dwSMPTEOffset field. Possible values are (unrecognized formats should be ignored): 0 - specifies no SMPTE offset (dwSMPTEOffset should also be zero), 24 - specifies 24 frames per second, 25 - specifies 25 frames per second, 29 - specifies 30 frames per second with frame dropping ("30 drop"), 30 - specifies 30 frames per second
dwSMPTEOffsetSpecifies a time offset for the sample if it is to be syncronized or calibrated according to a start time other than 0. The format of this value is 0xhhmmssff. hh is a signed Hours value [-23..23]. mm is an unsigned Minutes value [0..59]. ss is unsigned Seconds value [0..59]. ff is an unsigned value [0..(dwSMPTEFormat - 1)].
cSampleLoopsSpecifies the number (count) of TAG_SMPL_LOOP records that are contained in SampleLoops.
cbSamplerDataSpecifies the size in bytes of the optional sampler-specific data. Sampler specific data is stored imediately following the SampleLoops records. The cbSamplerData field will be zero if no extended sampler specific information is stored in the chunk.
SampleLoopsSpecifies the sample loop(s).

Remarks

The structure is given by BASS_ChannelGetTags as it is in the RIFF file, which is little-endian, so the members will need to be reversed on big-endian platforms.

See also

BASS_ChannelGetTags, TAG_SMPL_LOOP structure