I just put up some new code on github, to allow access to wavetable files such as those that ship with Serum, Vital and such.
Typically these synths crossfade between a number of “wavetable positions.” The wavetable source file usually concatenates one “wtpos” after another. In that case, it’s pretty straightforward to unpack them.
What we don’t have in SC, to my knowledge, is an oversampling BufRd to reduce aliasing at high frequencies. Should such a UGen emerge (please! that would be really nice!), then some of this quark would become unnecessary.
To reduce aliasing, this quark expands each single wavetable into several versions, removing successively more high-frequency content so that higher pitches can use more strongly-filtered versions. It’s a bit of a dodge – when sweeping the oscillator frequency, you can see the top frequencies fading in and out – but, if you lowpass-filter after that, it may be less noticeable (and it’s certainly less noticeable than heavy aliasing).
Two classes:
-
WavetablePrep, which reads a source multi-wavetable file and writes out an expanded wavetable file.
-
MultiWtOsc, a pseudo-UGen which plays back with frequency mapping, wtpos interpolation, phase distortion, and detuning (you decide how many oscillators). It’s a bit CPU-hungry actually; I’d consider it for nasty growly single notes but it may not be ideal for dense harmony.
Or
Quarks.install("https://github.com/jamshark70/ddwWavetableSynth");
hjh