Header data of wav files generated by the UHM parser

Official support for: u-he.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello,
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"
Binary of the generated 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
Thank you very much
Enrico

Post

Code: Select all

struct uh_WaveWTInfoHeader
{
	uint32_t checksum = 0;
	uint32_t numFrames = 0;
	uint32_t frameSize = 0;
	uint32_t reserved = 0;
	char Infotext[ 256 ];
};
The checksum is a precaution which isn't used (yet). The idea was, if people frequently had problems associating the right wavetable with their presets, the preset also contains the checksum and would identify the wavetable by it instead of the filename. But as there are hardly any such issues, it takes the filename while the checksum is unused.

Post

Btw. there's a long standing ticket to also write the Serum chunk into the generated wavetables. Haven't done that yet, but it might happen one day.

Post

Thank you for the replies and congratulations for the excellent update to Filterscape. It both sounds and looks fantastic.

Enrico

Post Reply

Return to “u-he”