dsp blog for xoxos.net

Archive for August 2011

BLIT oscillators

leave a comment »

i was quite happy to achieve rapid success with BLIT (bandlimited impulse train) oscillators. i didn’t run into a pitfall i’d heard about.

or maybe i misheard – my instant success was frustrated by the realisation that pitch transitions to triangles (and other twice-integrated contours, eg. hyperbola) generate nasty artifacts – BIG transients in the integrator resulting in significant dc offsets.

so i have a few notes on BLITs:

itfp, what i have not seen mentioned elsewhere is scaling the integrator by the ratio of old omega and new omega. that’s fairly obvious, and thankfully, as simple as one could want.

it may be somewhat unfair of meto compare my implementation to another. i recorded the output to compare how triangle pitch transitions were handled. i discovered that that instrument only updated pitch between wavecycles – this may have been a contemporary method of reducing cpu, i misinterpreted it as a way of stabilising the integration. it’s not, at least as far as it seems to me.

what i do seem to have improved is an application of a high pass filter to the triangle integrator instead of to the signal. there are still artifacts on some note transitions (depending on phase and pitch) but they never offset the dc by more than half the amplitude of the wavecycle (which can probably be improved with a stronger filter).

so try that 🙂

top waveform is my first attempt at highpassing the integrator. lower waveform is a bad instance of another BLIT algorithm making a pitch transition, presumably with the signal highpassed (images captured separately, pitch is not to scale).


a nice example of the working algorithm. worst cases oscillate instead of having a single-sided dc offset, but rarely even halfway to clipping.

Written by xoxosvst

August 25, 2011 at 5:32 am

Posted in Uncategorized

unison voicing

with 2 comments

a very brief entry on unison voicing, as i’ve just finished another unison oscillator and coincidentally been asked a question. this should be useful to anyone experimenting with modular synthesis who hasn’t developed much familiarity with dsp yet –


for unison voicing gain, i use 1 / sqrt(# of voices), making:

1 voice: 1 / 1 = 1.0 gain

2 voices: 1 / sqrt(2) = ~.7071 gain

4 voices: 1 / sqrt(4) = .5 gain

this seems to give about the same volume no matter how many oscillators you stack together 🙂

other note on unison voicing is to avoid equidistant spacing between pitches – there’s a spectral analysis graphic in the manual of my ‘horizon’ unison synth that clearly illustrates this concept –

equidistant pitch (logarithmic scale, of course) between three or more oscillators (of course) is going to produce cyclic phase cancellation and pronounced beating, instead of the smooth, thick detune effect. pointedly, equidistant pitch is useless 🙂

i use a simple n*n nonlinearity crossfaded with equidistance as a ‘spread’ parameter – try using a hi-res spectral analysis (voxengo’s SPAN has longer fft block rates which give better frequency resolution) then use sine oscillators and exaggerate your detune amount.. if the frequencies are the same distance apart, you will hear phase cancellation/beating.

there are different effects you can achieve, eg. bunching the pitches towards the center is different from spreading them away from the center.. things to experiment with 🙂

horizon has several stereo voice distribution schemes.. after using horizon for ?? three years now ?? i almost never used the left>right or right <left schemes, which pan in order of lowest to highest pitch – the highest pitch will draw the most attention, so this strongly weights the stereo image… i left them off the new build.

i did find it useful to have a mode where voices are split between either the left or right channel (i include an option to alternate which channel receives the highest pitch, usually in patching, if i use both oscs in unison mode, the highest pitch of each osc will be towards the opposite side) and another mode where voices are panned lowest to highest from the center to the side, alternating back and forth.

both of these modes sit better in the mix for some sounds.. the split is “cleaner” and the center>side distribution makes a thicker timbre (obviously).

Written by xoxosvst

August 10, 2011 at 5:55 am

Posted in Uncategorized