-
Notifications
You must be signed in to change notification settings - Fork 454
Expand file tree
/
Copy pathWT fileformat.txt
More file actions
18 lines (18 loc) · 971 Bytes
/
WT fileformat.txt
File metadata and controls
18 lines (18 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
byte
0-3 'vawt' as big-endian text - all the following bytes are little-endian
4-7 wave_size size of each wave; 2 ... 4096, must be a power of 2 (v1.3)
8-9 wave_count number of waves; 1 ... 512 (v1.3)
10-11 flags
0001: is a sample instead of a wavetable
0002: is a looped sample
0004: if not set, wave data is in float32 format
if set, wave data is in int16 format
0008: if not set, a sample with 0 dBFS peak will end up having a peak of 2^14 (uses 15 bits, -6 dBFS peak)
if set, int16 data uses the full 16-bit range
0010: if set, there is a metadata block after the wave data
12-(12+size) wave data
float32 format: size = 4 * wave_size * wave_count bytes
int16 format: sise = 2 * wave_size * wave_count bytes
12+size+1-end metadata (if flags & 0x10)
metadata is a null terminated XML string with the tag <wtmeta> as the root and application
dependent beyond that