[blog] keeping busy

Official support for: xoxos
RELATED
PRODUCTS

Post

i took a detour after the effects pack to concentrate on widening my knowledge base and have been enjoying some benefits from it lately..

of course, this is new to me, though all methods have been around for some time.

thanks to robin/rs-met i implemented some DSF (discrete summation formulas) which synthesize bandlimited waveforms in a single equation instead of calculating a bunch of partials. this includes band limited impulse trains (BLIT can mean this or b.l. interpolated tables, being my/a standard osc implementation).

essentially what this means is.. good for me, yay :p using doubles instead of floats means everything runs at twice the cpu load.. a DSF sawtooth is about 4x the cpu of an interpolated table. the benefit is that there is no aliasing (or, depending on algo, minimal), modulation options and they sound great.

in composition i only use synths i know the algo for so that i can improve it.. so thank god it means i can finally start using better oscillators in my composition :hihi:

i ought to have a single osc synth out fairly soon - the alg is similar to a 1980's yamaha home keyboard i used to have - amazing tech innovation :O it sounds pretty good in 44.1k with doubles and uses some better filters.. i used the stilson/smith moog ladder filter and am impressed bcs i'm hearing tones out of it that sctually sound like moog synthesizers.

so - old news, but makes me happy, and fleshes out my palette a bit. of course, this doesn't bode well for sales until i find some way to expand these algorithms. i'm still using fairly naive methods of modifying these complex equations. and, it also means higher cpu use in my synths :)


as a developer who likes to increase public awareness, i'd like to share something i found on a mailing list.. it's nice to know what you're hearing. enjoy!


> > > I'm curious, what approach are you using to get 'alias free'
> > > oscillators?
> > > Simply using a much higher internal sampling rate and then a low
> > > pass
> > > FIR filter? Or something more sophisticated than this.
> >
> > Since this question gets asked a lot, I'll list some of the common
> > methods. Roughly from easy to hard. Oversampling here means proper
> > oversampling with high quality lowpass filtering before decimating
> > to
> > target samplerate. Simply averaging N samples will not work.
> >
> > 1) Trivial saw with oversampling
> > Pros: Easy, can do any waveshape, allows simple sync and FM
> > Cons: Requires massive (64..256x) oversampling to sound good
> >
> > 2) Sum of sines
> > Sum nyquist/freq number of sines to produce exactly bandlimited
> > sawtooth.
> > Pros: No aliasing
> > Cons: Too slow to be of use in practise.
> >
> > 3a) Differentiated parabole wave
> > Synthesize parabole (diff(phase^2)*1/freq for -1 <= phase < 1).
> > Aliasing
> > falls at 12dB/oct (compared to 6dB/oct for trivial saw).
> >
> > Pros: Almost as easy as trivial saw. 1/freq can be derived from
> > interpolated table lookup (store 1/freq for each note)
> > Cons: diff(phase^2) can get very small for low frequencies requiring
> > 24
> > or
> > 32 bit resolution. Requires 1.5-2x oversampling to avoid annoying
> > warble
> > between 10-20 kHz.
> >
> > 3b) Slewrate limited saw
> > Use a trivial saw-tri pwm oscillator with the pulse width set to
> > exactly
> > one sample. Can be shown to be equivalent to 2a.
> >
> > Pros: Doesn't require frequency dependent scaling or high
> > resolution
> > computations.
> > Cons: Same as 3a
> >
> > 3c) Other waveshaping methods
> > Several other methods can be used to sample a smooth function and
> > then
> > warp the spectrum to resemble saw. Generally slower and more
> > complicated
> > than 2a or 2b.
> >
> > 4) Mipmapped wavetables
> > Precalculate a version (mipmap) for each octave (or half octave)
> > with
> > exact number of harmonics. Select nearest mipmap and interpolate
> > the
> > stored waveform on playback.
> >
> > Pros: Good quality with higher order interpolator or oversampling
> > mipmaps.
> > Can do arbitrary waveforms. Easy FM. Easy phase distortion.
> > Cons: Needs lots of memory. Number of harmonics limited for low
> > notes.
> > Requires oversampling the mipmaps (using longer table than strictly
> > required by the number of stored harmonics) or using high order
> > (FIR)
> > interpolator. Requires oversampling or more mipmaps (half or
> > quarter
> > octave) to avoid missing frequencies between 15-20 kHz.
> >
> > 5a) BandLimited Impulse Trains (BLIT)
> > Synthesize bandlimited impulse train and integrate that to produce
> > saw.
> >
> > Pros: Good quality. No oversampling required.
> > Cons: Complicated, slow, has numerical issues. Difficult to do FM,
> > PWM
> > or sync.
> >
> > 5b) BandLimited StEps (BLEP)
> > For each oscillator reset, sum a bandlimited step with the trivial
> > saw.
> > The steps are precalculated and stored in a table (can be quite
> > short
> > when interpolation is used between two phases.
> >
> > Pros: Very good quality. No oversampling required. Can do
> > bandlimited
> > FM, PWM and sync. Probably the only method that can do audio rate
> > PWM
> > and sync.
> > Cons: Requires a divide per cycle. Can be complicated: calculating
> > required table entry is not trivial when using sync or pwm.
> >
> > HTH
> >
> > Chris


with my modest (ha) abilities, i can attest that this is a description of common methods, and not exhaustive, eg. one of the phase mod options in hyperion is bandlimited using a very crude technique (which is mostly but not entirely effective). everything sounds different.. and people use their own strength in implementation, parameter ranging et al.. so ultimately, the message here is that my plugs should be sounding a little different in the future :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

the time to focus on learning has been rewarding.. i'm quite happy with recent developments, will share soon :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Sharing knowledge...
You can't always get what you waaaant...

Post

i realise this may not seem consequential to others..

after the better part of a decade, i have, about a minute ago, finally managed the FFT

it resources about 2% of my 1.6g cpu


of course, that does not include the polar coordinate transform, which is necessary for the fun stuff :)


anyway.. hello world
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

well done,you work really hard.
it's great to make breakthroughs,and i'll look fwd to what you do with it.
though i must admit it's a bit advanced for me to understand easily,i still appreciate the sounds they make.:)

Post

i would suggest studying calculus first to new developers :hihi: i've definately taken a roundabout route, and coded "my own" frequency analysis/resynthesis by averaging quarter periods (which takes as much or more cpu as fft but only extends to sr/4) - hopefully it will give me a sneaky way to accomplish something in the future.

the DFT is easy to understand. the FFT does the same thing 100x faster and i wouldn't waste the time thinking about how it works until i'm two or three times my current age :? it's best to just find some code you can actually understand enough to implement that one.

i'm going to redo my pdf on dsp in the next week ;)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

is there a blog of your investigations that this is connected to? I couldn't find one on your website. I'm using the book you recommend to learn c++ and seemed to think you'd put a lot of this sort of stuff up from figuring it all out.

cheers :)
ZZZzzZZzz..zz....zzzzz
My SoundCloud

Post

there isn't one :) i've occasionally made efforts to furnish information for developers, my chops are pretty grotty so it's a low priority. any algorithm i use which isn't obvious is probably better notated elsewhere. really the only thing that isn't elementary algebra is the mass-spring.. the examples i've seen differ from mine, and they're widely used (eg. 3d graphics).

i did have a pdf out a few years ago which is is as such probably more of a detriment than asset to others :) i keep collating bits to redo it sometime. i'd also *love* to take time and do a nice general video on synthesis my way.

ask questions if you've got 'em! :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

cheers for the responce - it was the [blog] bit of the title that confused me. I'm still slowly working through that book, and my maths course has only just got to trigonometry so i'll just keep plodding along with it.

I'm just startng to look about for information about how to start writing audio code though - there seems to be lots of links in the developer forum, but it will certainly take a while to find the useful stuff :D

And I'm sure I'll be posting a few confused questions in that forum with time!
ZZZzzZZzz..zz....zzzzz
My SoundCloud

Post

very cool, xoxos, congrats! :)
..what goes around comes around..

Post

zombie thread :)

i don't know if you mean dspguide.com or schidt's c++ for beginners.. i think both are highly recommended *awaiting chamberlin's musical apps of microprocessors atm* :) trig was as much as i took, so if you go further with math you'll better me :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

xoxos wrote:zombie thread :)

i don't know if you mean dspguide.com or schidt's c++ for beginners.. i think both are highly recommended *awaiting chamberlin's musical apps of microprocessors atm* :) trig was as much as i took, so if you go further with math you'll better me :)
I found a download of the Schidt book which I thought was from MS but isn't, and there were loads of mistakes in it so I bought it instead. I've seen mentions of dspguide - is that the one you can download chapters of? it may well go on my kindle quite soon :D

That musical Apps book looks quite interesting.
ZZZzzZZzz..zz....zzzzz
My SoundCloud

Post

i thought ms was hosting c++ for beginners.. if not publishing it :p i thought most of the mistakes in the pdf were bad spacing/line breaks.. the book is def. easier to read but the pdf isn't missing much/shoudl work for the economically challenged.

www.dspguide.com is worth the 5 mins to grab the chapters of.. imo it's probably the closest to a standardised text for audio dsp :) it's fairly coherent, i found making a .txt file of notes worthwhile.

the chamberlin book i've seen recommended again and again. last week there were two copies on amazon for $16.. :shock: don't blink if you see it for that price.

sean costello's blog is worth reading :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Ah sorry - I found a link on a forum to it and people were talking about it being hosted by MS so I downloaded it and then found out the MS page about it says they don't provide it anymore. I found a few bits where examples were incorrect (the had the previous ones and not the one relevant to the text) and wasn't sure how many more mistakes there would be so paid the £10 for a hard copy cause thats not much really.

I think I've got a long way to go though, with this and my Maths course (will be looking at things like calculus and stuff in the Autumn I think)
ZZZzzZZzz..zz....zzzzz
My SoundCloud

Post

you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post Reply

Return to “xoxos”