Re: [linux-audio-user] virtual sampler

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] virtual sampler
From: xk (xk_AT_myrealbox.com)
Date: Fri Mar 22 2002 - 03:15:23 EET


> ok, lets get to my point, i'm basically talking about mixer speed, but
seems that my point was "changed" along this thread. What i'm talking about
is that VOICE MIXERS (aka, the critical zone of any synth -oscilator or
wavetable based-). _that_ is what it should be written
> using fixed point since it is what it uses the least CPU.
>
> in MIDI, and usually, any kind of wavetable synthesis, the mixing consists
of:
>
> 1-find nearer(s) val
> -simply done with a right shift
> 2-interpolate
> -ONLY multiply, division is made by shifting
> 3-filter
> -yet again, only multiply, and then shift
> 4-mix into left/right buffers - only multiply
> 5-increment sample iterator
>

With your approach you always have to check for overflowing. This is far
more worse than clipping. The user will have to reprocess an entire track
for example just because one overflowed/clipped kick. This is why I said
using floats is a time saver.

> this IS slower using floats, I did made sure of that myself, i've written
> mixers in both fixed point and floating point, and the SAME MIXER using
fixed point WAS FASTER in machines ranging from old pentiums to

Like I said in the first place, I don't know this for a fact. So you could
be right.

> >
> > 23 bits is more than enough precision for digital audio, so this is not
an
> > issue.
>
> Allow me to prove you wrong, lets say we've got 23 bits, now.. 23 bits
means numbers ranging from 0->8388608.
> now let's say we have a sample iterator, in other words the offset to a
sample being played. in each sample mixed, we must do step 5 of what i have
described above, this is:
>

You are kidding, right?
When I said 23 bits are enough I meant that they are enough for holding
audio data in them, and I assumed you were also reffering to this.
No sane person would use a float for a sample iterator. It's obviuos that
the sample iterator has to be an 32 bit integer.

> > And with floats you don't have to wory about overflows and you can
finally
> > exceed clipping range in a chain of plugins and just put a limiter at
the
> > end. This is a real time saver.
> >
>
> but as i said before, your floats can get stuck and cause you a lot of
problems.

Well, all the people using Sonar and Cubase don't seem to have these
problems.
Maybe it is a little slower, but the good side of floats far outweight the
bad sides.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Mar 22 2002 - 03:02:59 EET