Re: [LAU] Sampling an external oscillator waveform

From: Harry van Haaren <harryhaaren@email-addr-hidden>
Date: Tue Feb 10 2015 - 15:34:22 EET

On Tue, Feb 10, 2015 at 1:00 PM, F. Silvain <silvain@email-addr-hidden> wrote:
> Hey 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
one osciallation[1].

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[2]. Note that the playback
method of the wavetable in Sorcer is far from ideal - don't copy it
for your own sake :)

Cheers, -Harry

[1] 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
infinity.

[2] http://openavproductions.com/sorcer
and https://github.com/harryhaaren/openAV-Sorcer/tree/master/wavetables

-- 
http://www.openavproductions.com
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Feb 10 16:15:02 2015

This archive was generated by hypermail 2.1.8 : Tue Feb 10 2015 - 16:15:03 EET