🡪 iicaras
A wavetable refers to PCM sample data which contains single-cycle waveforms a wavetable synthesizer can select for it's oscillator 12. Currently the most common container is a WAV file which includes a CLM chunk as defined by Steve Duda from Xfer Records 3. Another slightly less common format is the WT format from Surge XT 4. Both contain the same PCM data with different data chunks and support.
(To be written.)
An external sample or wavetable in the WAV format can be imported into Vital. Vital always assumes a wave size of 2048 samples when importing a file as a wavetable, and uses the left channel if the file has 2 channels.
Vital has built-in resynthesis functionality with which wavetables can be created. It seems that it will record a clip of 4 seconds on the note E0 to create the wavetable with roughly 80 cycles, and sets the oscillator to File Blend mode (Of course other blend styles can manually be chosen). When exporting to WAV, the file will have 256 cycles, each resampled to 2048 samples.
As such, the optimal way to create wavetables with Vital's resynthesis functionality is as follows 5:
- Set oscillator pitch to 0.
- Set phase randomisation to 0.
- Use LFO's of 4 seconds on parameters to be modulated.
- Optionally turn off smoothing on the LFO's.
- Rightclick the wavetable and select
Resynthesize Preset to Wavetable. - Choose desired blend and phase styles.
- Export to WAV under the hamburger menu.
When exporting a wavetable to WAV, Vital always exports 256 cycles. This means that an exported WAV file will contain duplicates of cycles if that wavetable was designed with less than 256 cycles and with the blend mode set to None. To combat this, the author has written a programme with which the duplicate cycles can be easily removed.
Furthermore, Vital writes a sample rate of 88200 to the file header, and the sample data is 16 bit. It seems to always specify an interpolation mode of 2 in the CLM data (see WAV CLM Chunk).
(To be written.)
To make wavetables first some essential values need to be calculated.
Popular digital synthesizers such as Serum by Xfer Records or Vital by Matt Tytel often assume each cycle to be 2048 samples in length by default unless otherwise specified by the wavetable 36. This corresponds to the frequencies
which corresponds to F0 with a small deviation of
Often there are 256 single-cycle waveforms in a wavetable, such that the wavetable is
It may be useful to record and edit to a grid in a DAW, usually defined through a project's BPM. To calculate a suitable BPM;
with
256 cycles are then recorded over 64 beats, or 16 bars, but in principle any number of cycles can be recorded.
However, it may not always be possible to record at a precise frequency or semitone deviation. In that case the most suitable notes to record with are E0 for 44100 samples/s and F#0 for 48000 samples/s. In those cases,
with
The table below contains all the calculated data for multiple scenarios, but beware, the numbers are rather ugly.
| Sample Rate | 44100 | 48000 | 44100 | 48000 |
| Samples/cycle | 2048 | 2048 | 2140.5977297781 ... | 2075.7069643683 ... |
| Note | F0 - .2344241383 ... st | F#0 + .2326448623 ... st | E0 | F#0 |
| Cycles/beat | 4 | 4 | 4 | 4 |
| BPM | 322.998046875 | 351.5625 | 309.0258346058 ... | 346.8697712921 ... |
Proper wavetable samples can be recorded with any of these cases as described in the table above. The last step is to add the necessary clm tag in the WAV file which either can be done manually, see this section below, or using the Python program Wavetable-Tools-WTT by iicaras.
Example to record the standard amount of 256 cycles where each cycle fits nicely into a 16th note in length:
- Set the sample rate to
48000samples/s. This results in the nicest project BPM to use. - Set the project BPM to
351.5625BPM. - Place a note of
F#0and make it 16 bars long. - In the oscillator(s), add a pitch deviation of
.2326448623st. (W.I.P: what pitch deviations to use if preset has other harmonic relationships within) - Make automations over these 16 bars.
- Bounce sample to either 16-bit or 32-bit per sample.
- Normalise the sample.
Personally I like to add a lead-in-beat and a lead-out-beat, such that the note becomes 16 bars and 2 beats long to prevent click-in or click-out kind of noise. After bouncing the clip, I would then remove these beats again and rebounce the sample to a normalised 16-bar sample.
For post processing:
- Use
python wtt.py maketable --wt "your-sample.wav"from Wavetable-Tools-WTT to place the right metadata into the sample and export a WAV and WT file, or write it yourself using the section below.
General WAV chunk information can be found here on Wikipedia. The CLM chunk in a WAV file has the following format as defined by Steve Duda from Xfer Records 3:
FormatBlocID (4 bytes): Identifier `clm␣` [0x63 6C 6D 20]
BlocSize (4 bytes): Chunk size minus 8 bytes (# bytes)
ClmData (# bytes): ASCII string `<!>AAAA BC000000 D`
where for the ClmData bytestring:
`AAAA`: cycle-size (often 2048)
`B` : Interpolation type. 0 = None, 1 = linear crossfades, 2,3,4 = spectral morph modes
`C` : Serum factory flag. DO NOT SET TO 1 FOR CUSTOM WAVETABLES
`D` : Vendor ASCII string or room for other comment
For interpolation, Vital interprets 1 as Time blend, and 2, 3, & 4 as Spectral blend. Serum has multiple spectral modes, namely Spectral, Spectral (zero fundamental phase), and Spectral (zero all phases).
For example CLM chunk in the Basic Shapes.wav from Serum has the following data:
63 6C 6D 20 30 00 00 00 3C 21 3E 32 30 34 38 20 30 31 30 30 30 30 30 30 20 77 61 76 65 74 61 62 6C 65 20 28 77 77 77 2E 78 66 65 72 72 65 63 6F 72 64 73 2E 63 6F 6D 29
clm 0␣␣␣<!>2048 01000000 wavetable (www.xferrecords.com)
This wavetable has
Note that for vital to import the wavetable correctly, it seems that the BlocSize needs to be an even number. The vendor or comment string can be adjusted to compensate.
The WT format from Surge XT is given as follows in little-endian 4:
FormatBlocID (4 bytes): Identifier `vawt` [0x76 61 77 74]
WaveSize (4 bytes): Cycle size as integer (must be a power of 2)
WaveCount (2 bytes): Number of cycles
Flags (2 bytes): Bits `ABCD 0000`
SampleData (# bytes): int16 or float32 single-channel sample data.
The Flags are bit flags defined as follows:
A (1000 0000): Set if the full 16-bit range is used if the sample is in int16 format. Else 15-bits are used (-6 dBFS peak)
B (0100 0000): Set if SampleData is in int16 format. Else it is float32
C (0010 0000): Set if the sample is looped, if the file is a sample
D (0001 0000): Set if the file is a sample instead of a wavetable
For instance, .wt from Bitwig Essentials has the following initial data:
76 61 77 74 00 08 00 00 04 00 0C 00
This wavetable has 0C 00 in bits is 1100 0000).
Footnotes
-
Bristow-Johnson, Robert; Wavetable Synthesis 101, A Fundamental Perspective [PDF]; Wave Mechanics, Inc., Montclair, NJ,; Paper 4400; 1996 Available: https://aes2.org/publications/elibrary-page/?id=7379 ↩
-
S. Adamspublished, ‘The ultimate guide to wavetable synthesis’, MusicRadar. Accessed: Jan. 12, 2025. [Online]. Available: https://www.musicradar.com/news/ultimate-guide-wavetable-synthesis ↩
-
‘XferRecords.com Forums: File Types???’ Accessed: Jan. 12, 2025. [Online]. Available: https://xferrecords.com/forums/general/file-types ↩ ↩2 ↩3
-
mkruselj, ‘WT fileformat.txt’, GitHub. Accessed: Jan. 12, 2025. [Online]. Available: https://github.com/surge-synthesizer/surge/blob/main/resources/data/wavetables/WT%20fileformat.txt ↩ ↩2
-
‘Resynthesize preset as wavetable - Questions and Support’, Vital. Accessed: Feb. 02, 2025. [Online]. Available: https://forum.vital.audio/t/resynthesize-preset-as-wavetable/1858/2 ↩
-
‘Tipp: WT Editor: Audio File Source and “Window Size” parameter - What does it actually mean - Share’, Vital. Accessed: Jan. 12, 2025. [Online]. Available: https://forum.vital.audio/t/tipp-wt-editor-audio-file-source-and-window-size-parameter-what-does-it-actually-mean/4262/2 ↩
-
iicaras, ‘harmonics.md’, Gist. Accessed: Jan. 12, 2025. [Online]. Available: https://gist.github.com/iicaras/9acfe1b65d2f3555211deeb3eec95e1b ↩
-
iicaras, ‘note_frequencies.md’, Gist. Accessed: Jan. 12, 2025. [Online]. Available: https://gist.github.com/iicaras/430ba2f6bd7b1f250fe8664a3cbef987 ↩ ↩2 ↩3