[music-dsp] Re: programming languages for real-time audio
Kjetil S. Matheussen
k.s.matheussen at notam02.no
Wed Sep 17 07:57:56 EDT 2008
> > Richard Dobson:
> >> Kjetil S. Matheussen wrote:
> >>> ,,
> >>> For example, this is the implementation of a complete polyphonic soft
> >>> synth:
> >> Out of interest, which bit of this code handles voice assignment
> >> (stealing, etc) for machines with a fixed upper limit of polyphony?
> > The code does not use any special kind of hardware, and
> > the number of simultanious voices are only limited by CPU.
> I am not concerned with CPU load per se, but with amplitude scaling,
> which needs to take the number of voices into account (eg log(N)).
> Setting a limit on N make that computable. That is as much the reason
> for setting such a limit, as available compute cycles. Put another way,
> I do not think that a machine with no fixed upper limit of polyphony can
> be implemented as a real-time process, without the user constantly
> having to change Volume!
Well, the example just shows how to make a _minimal_ soft synth.
There's nothing hindering you from setting a limit on the number
of voices, scale the volume, using an envelope, adding reverb, etc.
More information about the music-dsp