WRID>RIFF-WAVE>smpl
TODO: overview
The
[RIFF1994]smpl
sampled instrument chunk describes the minimum necessary information needed to allow a sampling keyboard to use a WAVE file as an instrument. Samplers which require more information can save their extended information in the sampler specific data section.
Chunk | Group | Name | Bytes | Type | condition | Description | WRID |
---|---|---|---|---|---|---|---|
smpl | id |
4 |
u8[4] |
id = "smpl"
|
...>id | ||
smpl | size |
4 |
u32 |
|
...>size | ||
smpl | manufacturer |
4 |
u32 |
|
Specifies 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. | ...>manufacturer | |
smpl | product |
4 |
u32 |
|
Specifies the Product code of the intended target device for the manufacturer . If the sample is not intended for a specific manufacturer's product, then this field should be set to zero. |
...>product | |
smpl | sample_period |
4 |
u32 |
|
Specifies the period of one sample in nanoseconds (normally 1/ samples_per_second 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). |
...>sample_period | |
smpl | midi_unity_note |
4 |
u32 |
|
Specifies 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). | ...>midi_unity_note | |
smpl | midi_pitch_fraction |
4 |
u32 |
|
Specifies the fraction of a semitone up from the specified midi_unity_note . A value of 0x80000000 is 1/2 semitone (50 cents); a value of 0x00000000 represents no fine tuning between semitones. |
...>midi_pitch_fraction | |
smpl | smpte_format |
4 |
u32 |
|
Specifies the SMPTE time format used in the smpte_offset field. Possible values are (unrecognized formats should be ignored):
0 - specifies no SMPTE offset (smpte_offset 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. |
...>smpte_format | |
smpl | smpte_offset |
4 |
u32 |
|
Specifies 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..(smpte_format - 1)]. |
...>smpte_offset | |
smpl | sample_loop_count |
4 |
u32 |
|
Specifies the number (count) of <sample-loop > records that are contained in the <smpl > chunk. The <sample-loop > records are stored immediately following the sampler_data field. |
...>sample_loop_count | |
smpl | sampler_data_size |
4 |
u32 |
|
Specifies the size in bytes of the optional <sampler_data >. Sampler specific data is stored imediately following the <sample-loop > records. The sampler_data field will be zero if no extended sampler specific information is stored in the <smpl > chunk. |
...>sampler_data | |
smpl | sample_loop | identifier |
4 |
u32 |
|
Identifies the unique 'name' of the loop. This field may correspond with a name stored in the <cue > chunk. The name data is stored in the <LIST-adtl > chunk. |
...>identifier |
smpl | sample_loop | type |
4 |
u32 |
|
Specifies the loop type: 0 - Loop forward (normal). 1 - Alternating loop (forward/backward). 2 - Loop backward. 3-31 - reserved for future standard types. 32-? - sampler specific types (manufacturer defined). | ...>type |
smpl | sample_loop | start |
4 |
u32 |
|
Specifies the startpoint of the loop in samples. | ...>start |
smpl | sample_loop | end |
4 |
u32 |
|
Specifies the endpoint of the loop in samples (this sample will also be played). | ...>end |
smpl | sample_loop | fraction |
4 |
u32 |
|
Allows fine-tuning for loop fractional areas between samples. Values range from 0x00000000 to 0xFFFFFFFF. A value of 0x80000000 represents 1/2 of a sample length. | ...>fraction |
smpl | sample_loop | play_count |
4 |
u32 |
|
Specifies the number of times to play the loop. A value of 0 specifies an infinite sustain loop. | ...>play_count |
Learning References
Specification
- [RIFF1994] New Multimedia Data Types and Data Techniques (1994). See pages 12-22.