[music-dsp] a question about reducing calculation-complexity in
a modular synthesizer
Michael Gogins
gogins at pipeline.com
Mon Dec 12 13:50:24 EST 2005
The 1 : 5 ratio was with Csound running with ksmps=1 and ksmps = something (10? 100? don't recall, but I have a spreadsheet at home that I will look at again).
Csound iterates ksmps frames over every dsp inner loop. So, with ksmps =1 , it's for(i=0; i < 1; i++) and with ksmps = 100, it's for (i=0; i<100; i++). In other words the loop structure is identical, the only difference is dwelling in the inner loops longer, or not.
The C++ code I was referring to implemented the same DSP algorithms with sample by sample loops, so, as one would expect, it was a bit faster than Csound with ksmps=1.
Regards,
Mike
-----Original Message-----
From: robert bristow-johnson <rbj at audioimagination.com>
Sent: Dec 12, 2005 12:05 PM
To: music-dsp <music-dsp at ceait.calarts.edu>
Subject: Re: [music-dsp] a question about reducing calculation-complexity in a modular synthesizer
----- Original Message -----
From: "Vesa Norilo" <vesa.norilo at saunalahti.fi>
To: "music-dsp" <music-dsp at ceait.calarts.edu>
Subject: Re: [music-dsp] a question about reducing calculation-complexity in a modular synthesizer
Date: Mon, 12 Dec 2005 11:22:26 +0000
> > I think single sample code can be made faster than it is typically
> > written. I did some tests a few years ago using machine generated C code.
> > Block processing was usually faster, but not by 5 times, and it depended
> > on what was being done and how things were divided up.
>
> I'd like to point out that in some cases, sample-by-sample processing makes
> it possible to keep everything in the CPU registers - in that case, block
> processing could well be slower.
sure, that sounds like a dedicated device doing a single function. for a modular synth or modular processor, where the modules are likely doing all sorts of different functions, i doubt that you would be able to get away with not saving and restoring the context of the CPU for *each* module. it's the cost of that saving/restoring that gets reduced by using block processing (but i doubt it's a 5 fold savings, maybe 2 or less).
--
r b-j rbj at audioimagination.com
"Imagination is more important than knowledge."
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp
http://ceait.calarts.edu/mailman/listinfo/music-dsp
More information about the music-dsp
mailing list