I am looking into writing wavetable files like those generated by the UHM parser in Hive. I looked into the the binary file of a single sine wave, and figured out most of the WAV file header, but I am missing a few bytes. Could you let me know what is the meaning of the blocks I could not understand?
Source code of sine.uhm
Code: Select all
Info "StartInfoBlock************************************************************************************************************************************************************************************************************************************EndInfoBlock"
NumFrames=1
Wave "sin(2 * pi * phase)"
Export "sine.wav"
Code: Select all
0 - 3 char[4] Chunk ID = "RIFF"
4 - 7 uint32 Chunk Data Size in Bytes = 8508
8 - 11 char[4] RIFF type = "WAVE"
12 - 15 char[4] Chunk ID = "fmt "
16 - 19 uint32 Chunk Data Size in Bytes = 16
20 - 21 uint16 Compression Code = 3
22 - 23 uint16 Number of Channels = 1
24 - 27 uint32 Sample Rate = 44100
28 - 31 uint32 Average Bytes per Second = 0
32 - 33 uint16 Block Align = 4
34 - 35 uint16 Significant Bytes per Channel = 32
36 - 39 char[4] Chunk ID = "uhWT"
40 - 43 uint32 Chunk Data Size in Bytes = 272
44 - 47 uint32 ??? 0
48 - 51 uint32 Number of Waveforms = 1
52 - 55 uint32 Samples per Waveform = 2048
56 - 59 uint32 ??? 0
60 - 313 char[254] Info Text
314 - 315 uint16 ??? 0
316 - 319 char[4] Chunk ID = "data"
320 - 323 uint32 Chunk Data Size in Bytes = 8192
324 - 2371 float[2048] Sample Data
Enrico
