[PD] bandlimited wavetables for pd vanilla

Claude Heiland-Allen claude at mathr.co.uk
Thu Feb 26 21:28:21 CET 2015


On 13/02/15 11:19, Claude Heiland-Allen wrote:
> On 13/02/15 10:32, Roman Haefeli wrote:
> I'll do some tests later today (but if you want to get there first the
> ramp is somewhere in "bl-gen-abs~.pd", perhaps try making it 1 all the
> way to SR/2).

2 weeks later, I finally got around to it...

I tried adjusting the filter ramp, it only made things worse (more 
aliasing).  So it's still the same as it was.

> There's also an offset in the index generation, [-~ 1]
> somewhere after the [log~ 2] in "bl-tabread4~.pd", changing this to [-~
> 0.5] or even [-~ 0] should brighten the sound but risks audible aliasing.

In fact the offset was too high already - I added a spectrum view, there 
were (small, but visible) peaks moving to the right when the frequency 
of the oscillator was moving to the left.  I changed the offset to [-~ 
1.5] and the problem seems gone, at least when using [bl-tabread4c~].

The repository now has a [tabread4c~] abstraction using 4x [tabread~] 
and some maths (still vanilla core, no [expr~] even), and a 
[bl-tabread4c~] that uses it (same as [bl-tabread4~] except for much 
nicer sounding interpolation and presumably somewhat higher CPU usage).

> Perhaps you just need to copy a larger table region

I increased the size of the source waveform table in the example, now 
copying shouldn't reduce harmonics (as the largest table is the same size).


Claude

>> On Thu, 2015-02-12 at 16:06 +0000, Claude Heiland-Allen wrote:
>>> Hi all,
>>>
>>> Today I implemented bandlimited wavetables in Pd vanilla using the idea
>>> behind mipmapping in OpenGL (ie, generate many filtered and downsampled
>>> versions of a source, use the most appropriate version(s) by a function
>>> of the derivative of the lookup index).
>>>
>>> More info and full source (quick start tutorial: bl-example.pd):
>>>
>>> https://gitorious.org/maximus/pd-bl
>>>
>>> License: same as Pd vanilla.
>>>
>>> Advantages over other implementations:
>>> * Can generate wavetables from any waveform stored in a table.
>>>
>>> Disadvantages:
>>> * The higher harmonics are reduced compared to an optimal method.

-- 
http://mathr.co.uk




More information about the Pd-list mailing list