[LAU] Sampling an external oscillator waveform
Harry van Haaren
harryhaaren at gmail.com
Tue Feb 10 13:34:22 UTC 2015
On Tue, Feb 10, 2015 at 1:00 PM, F. Silvain <silvain at freeshell.de> wrote:
> Hey hey,
> I want to sample the waveform of an oscillator of a hardware synth.
Cool - I've done this in software, but JACK makes that ~ the same thing.
I used a rather more crude approach though - detailed below.
> I can increase my samplerate to 96kHz and work through the sample process as
> above, but will that help?
Yes - I would advise oversampling at the capture stage - more
frequency headroom and better accuracy in general.
In order to capture all the harmonics of the sound, you'll probably
want to play a very low frequency on the hardware synth - but not too
low that its DC offset highpass-filter removes the lowest sound. I was
working with a bassline - just playing the notes on a MIDI keyboard
and listening carefully allowed me to select the "ideal" frequency as
reproduced by the synth.
As Clemens noted - don't try to sample one cycle of exactly 65536
samples. Instead, record the "ideal tone", then resample one cycle of
that waveform to the desired 65536 lenght.
How I resampled to that lenght? Audacity - a little zooming +
scrolling. This is the crude part of this solution. This could be done
by correlating the signal to itself - a brute force approach to
finding the closes match to itself would reveal the exact lenght of
On cutting away all extra parts of the recording, resample the
single-cycle waveform to desired lenght and use. The wavetables
produced are used in OpenAV's Sorcer synth. Note that the playback
method of the wavetable in Sorcer is far from ideal - don't copy it
for your own sake :)
 assuming the sound is static - if it isn't theres little point in
sampling one oscillation, as you're only capturing the one cycle of a
wave it has by definition a static frequency spectrum if repeated to
More information about the Linux-audio-user