[PD] Analog/good-sounding oscillators in PD

Christian Klippel ck at mamalala.de
Thu Apr 6 20:58:43 CEST 2006


hi,

Am Donnerstag, 6. April 2006 20:18 schrieb cyborgk at nocturnalnoize.com:
> Hello everyone,
>
> I'm working on a set of abstractions that will allow users to easily
> sequence rhythmic-pattern style music; basically, to make it easy to
> create IDM/electro/minimal-techno style stuff. Anyway, there's one major
> weakness to the whole project: PD oscillators don't sound good! Also, the
> filters I've tried don't sound very analog at all.
>
> So, my question is:
>
> 1. Does anyone have any good, "analog-sounding" oscillators already
> created? I guess I only need saw, PWM square, and triangle, but they need
> to sound GOOD (like Reaktor, basically). I see how to do simple versions
> from the example patches, but I don't know enough DSP to get rid of the
> digital sound. For a great example of the kind of sound I want, check out:
> Asynth vst from antti at smartelectronix.
> http://antti.smartelectronix.com/
>

well, what is "analog sounding" after all? in case of an osc its basically a 
distorted variant of a prerfect curve/waveform. this is due to the 
nonlinearities and value fluctiations of the analogue parts.
you can achive the same effect by using kind of a table, where the input 
sample from the perfect osc is used to select an output sample of a table. 
that way you can map nonlinearities of any osc, amp, speaker, whatever to any 
other signal.

another way of achieving that is to code nonlinearities into the osc source 
code itself. of course that probably needs more cpu time then. in the example 
of a square-wave osc, you may do a simple modification: instead of the sudden 
change from 0 to +1 (or -1 to +1), wich introduces a high frequency part, you 
may interpolate that through some samples. the more non-linear you do that, 
the more analog sounding it will probably be.
also, if you have ever seen such pure signals on a scope, you will see that 
there is sometimes kind of overswing at the corners. so instead of 0..1 it 
goes more like 0...1,1...0,9.....1.....

if you want to have the nearest real analogue sound in a digital enviroment as 
pd, you can sit down and port analog circuit emulators (that is software like 
spice, pspice, ...) as externals to pd.
these would directly allow you to use any circuit, emulate it and have its 
sound .....

> 2. What would be the most analog sounding filter to use?
>

an analog one? ;)

you can always use a multichannel soundcard and route certain signals through 
external stuff ....

some stuff i tried once was to "filter" signal just by a sine function.... 
this already gets out the digital distortion, in case a signal is below/above 
-1/+1 ....

also, use many filters serially, while the first ones only have a small 
effect, mostly beeing used to shape the signal .... and the latter ones to do 
the real work ....

> 3. Is wavetable synthesis a reasonable option? How do I create a custom
> table to use for such synthesis? For example, if I synthesize a wave of
> one period in another program, how long should it be? 

one period, that is....

but see below ...

> I know this should
> be easy, but my brain is broken on this question. My gut instinct is that
> a wavetable would only sound good near original frequency or you just get
> the typical digital artifacts from pitch-shifting a sample... is that
> correct? I'm guessing what I'm really talking about is ROMpler style
> multi-sampling,  and selecting the wave closest to input frequency. Don't
> know if anyone built this already.
>

it depends on how you want to use wavetable synthesis.

if you want to use it for final instruments, like a piano, you surely want to 
have as much different notes sampled as possible .... complex sounds indeed 
sound bad when just pitch-shifted ....

in case of oscillators for creating your own synths (pure tones), just one 
sample of a full period at the lowest frequency is pretty much all you need. 
period time = 1 / frequency... you can either skip the excess samples in that 
wave, or average them in some way or the other ....
since you go on and process the signal afterwards anyway, that is perfectly 
sufficient....

iirc, you can use soundfonts in pd.... so go ahead, sample your favorite 
analogue ascillators, pack them into a soundfont and use that as osc for your 
pd synth ....


greets,

chris

> Btw, I can solve the problem for myself by loading in the VST~ external,
> but I want what I build to be cross-platform so that it is most useful to
> interested people in the community.
>
>
>
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list