Skip to content

Recording hardware to wavetables

  • Published: 2022-09-08 13:11
  • Updated: 2024-01-20 15:12

This is my collection of information about wavetable formats, tools, processes, lessons learned, and pitfalls to avoid.

My frame of reference

I’m writing this as professional sound designer sampling external gear, to capture as much intricate detail as possible. Without altering, or compromising the sound quality during conversion to different products.

Nomenclature

To avoid confusion, in the scope of this document:

  • Wavetable—A file containing an array of single cycle waveforms (frames)
  • Frame—One full, singular cycle of a waveform
  • Sample—A singular, raw data point of a waveform frame

Or, as visualized:

Wavetable container formats

  • .wav—A standard wave file without any specific wavetable information
    • Requires interpretation of a synths’ wavetable importer
    • Prone to misinterpretation, eg with arbitrary number of cycles, or samples per frame
  • .wt—Specific container format incl. information about frame-size and number of frames, supported by Bitwig, Surge, Serum
  • .vitaltable—Format used by Vital

Wavetable compatibility chart

This is work in progress, and will be updated as I receive more first hand information from the developers themselves. ‘?’ = unconfirmed information

Synth No. of frames Samples/ Frame File format Engine sample rate
Tytel Vital 2 - 256 1 - 9999 .vitaltable ?
Ableton Wavetable ? 1024 .wav, ? ?
Bitwig Polymer 2 - 512? 128 - 4096? .wt, ? ?
xfer records Serum 256 2048 .wt, ? ?
SurgeXT 2 - 512 128 - 4096 .wt, ? ?
Kilohearts Phase Plant 256 2048 .wav Host

Product-specific notes

  • Tytel Vital uses its own .vitaltable format, creating 88200hz/32bit files
    • Does importing 88200hz files bypass conversion?
  • Kilohearts Phase Plant supports
    • .wav’s with Serum header
    • Bypassing conversion using 256 x 2048 mono .wav

Wavetable basics

  • Number of samples per frame / 2 = number of partials per wavetable
    • Read: the more samples, the more high-end information

Good practices

Avoid resampling (🤣)

Because most of the synths internal sampling rates are unknown, this remains wishful thinking. Since resampling alters the raw sample data, it can lead to changes in peaks, introduce aliasing, change zero crossing points, shift the cycles’ phases, introduce unwanted clicks etcpp.

Sampling old hardware makes subtle resampling a necessity anyway. Because their oscillators tend to drift all over the place. Fun fact: even old digital synths can have issues maintaining stable pitch. When clocked by an analog quartz.

Therefor:

Work with 32bit float files

Utilize floats’ absurd headroom to counter potential clippings introduced by resampling.

Formula for pitch calculation

Sampling rate / frame size = pitch in hz

Example: 48000 / 2048 = 23.44hz

Convert the result using a musical frequency calculator to notes. Or refer to the data below:

Tables of the most common tunings

Samples/Frame Pitch/hz Note
128 344.53 F4 -24 cents
256 172.26 F3 -24 cents
512 86.13 F2 -24 cents
1024 43.06 F1 -24 cents
2048 21.53 F0 -24 cents
4096 10.76 F-1 -25 cents
Samples/Frame Pitch/hz Note
128 375 F#4 +23 cents
256 187.5 F#3 +23 cents
512 93.75 F#2 +23 cents
1024 46.87 F#1 +23 cents
2048 23.43 F#0 +23 cents
4096 11.71 F#-1 +22 cents
Samples/Frame Pitch/hz Note
128 689.06 F5 -24 cents
256 344.52 F4 -24 cents
512 172.26 F3 -24 cents
1024 86.13 F2 -24 cents
2048 43.06 F1 -24 cents
4096 21.53 F0 -24 cents
Samples/Frame Pitch/hz Note
128 750 F#5 +23 cents
256 375 F#4 +23 cents
512 187.5 F#3 +23 cents
1024 93.75 F#2 +23 cents
2048 46.87 F#1 +23 cents
4096 23.43 F#0 +23 cents

Useful tools for recording external gear

MOscilloscope for tuning oscillators

Although the free Melda Production bundle also contains a Tuner, I prefer using their Oscilloscope. To also check the waveform.

And yes: tracking the pitch below around 20hz becomes increasingly challenging for any plugin. Because the cycles are just too slow for reliable measurements.

Melda Recorder for a fast recording workflow

To streamline the recording process, I record samples directly into a specified folder. Mrecorder enables that right from the DAW. Bypassing the DAWs own settings and folder structure.

Editing workflow

Once I tamed the tuning, and recorded a folder of files for further editing, it’s time for my least favorable/automatable part of the process.

Extracting single-cycle waveform frames

I’d love to replace the following with a reliable command-line/batch processor. Didn’t find anything reliable yet. In case you’re aware of something: please let me know!

So far, I resort to OcenAudio for this part (reasons below). Using custom keyboard shortcuts, the process looks like this:

  1. Open file for editing
  2. Approximately select a single cycle
  3. Snap to Zero-Cross (CTRL-SHIFT-Z)
  4. Save selection (CTRL-SHIFT-S)
  5. Check file for correct size (eg 16.04kb for 2048 samples @48khz/32bit)
  6. Close file (CTRL-W)

Because hardware synths’ pitches are often instable, some cycles might be shorter or longer than eg 2048 samples. The file-size reflects that.

Reasons for using OcenAudio (as of now)

  1. Its Snap to Zero-function is reliable
    • Audacity’s has a bug, at some point it stops working
    • Acoustica’s function doesn’t reliably snap to zero, got rounding errors
    • Reaper overwhelms me, despite being sure it’s scriptable’n’awesome
  2. The ‘save dialog remembers the last-used folder
    • I need to navigate folders only once for processing a batch of files
  3. By default, the save dialog uses the name of the opened file
    • Spares me the step of naming
  4. It allows for switching the time format from the main interface
    • So does Audacity, but the bug above
    • In Acoustica, only possible via preferences

Post-processing utilities

SoX Sound eXchange

https://sourceforge.net/projects/sox/files/sox/

Useful commands

OKWT

https://github.com/drzhnn/okwt

  • Python-based tool for converting formats, and:
    • Adding wavetable headers
    • Changing the number and order of frames
    • Trimming silence
    • Fade in/out frames
    • Peak normalization across entire wavetable, and individual frames
    • Change frame size
    • Interpolate between frames
    • Create wavetable from image

FYI: The —shuffle option normalizes the peaks of the file.

Useful commands

Convert .wav to .wt:

okwt --infile in.wav --outfile out.wav --add-srge

Convert to Ableton Wavetable (eg from 2048 to 1024 samples/cycle):

okwt --infile in.wav --outfile out.wav --frame-size 2048 --new-frame-size 1024

Tip

When working with arbitrary frame amounts, OKWT might misinterpret the number of frames, or their sample lengths. Watch out for this!