Re: [LAD] Wavetable synthesis : Creating fat wavetables

From: Gabriel M. Beddingfield <gabrbedd@email-addr-hidden>
Date: Sat Aug 25 2012 - 17:32:44 EEST

On 08/24/2012 02:21 PM, harryhaaren@email-addr-hidden wrote:
> Hi everybody!
>
> I'm interested in wavetable synthesis, so read around a bit on how they
> work, best used etc, but I can find preciously little information that

You probably know this, but wavetable synthesis is different from a
table-lookup oscillator. It sounds like you're doing a table look-up
oscillator.

> describes how to best "create" a wavetable.
> Pre-recorded material seems a pretty go-to choice rather than using
> csound or freinds to generate wavetables.
>
> The issue of tuning is where I currently struggle the most: How should
> that be approached?

I wrote a table-lookup oscillator that is currently being used in
omap-audio-tool[1] for the tone generator. See [2] for the header. I
originally wrote it for fun, with the intention of using it on platforms
with weak floating point.

Like Fons mentioned in the e-mail, I made my tables a length of N^2 and
large enough so that they would not need interpolation for frequencies
over about 100Hz (IIRC). Below this cut-off frequency it does linear
interpolation.

When calculating offsets within your table, it's important to be wary of
truncation error (i.e. don't convert your frequency to "play every kth
sample in the table). This will cause your output frequencies to be
different from what you input (quantization error).

For generating the tables for sine, triangle, etc., audio-tool has a
program generate-wave-table.c[3] that generates the look-up tables in a
format suitable for inclusion in a C source file. However, you can
easily change the output by changing the 'out()' implementation in main().

-gabriel

[1] http://gitorious.org/omap-audio/omap-audio-tool
[2]
http://gitorious.org/omap-audio/omap-audio-tool/blobs/master/oscillator-table.h
[3] I started off calling everything "wavetable" by mistake, this is one
was overlooked in the renaming of thing.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Aug 25 20:15:01 2012

This archive was generated by hypermail 2.1.8 : Sat Aug 25 2012 - 20:15:02 EEST