[RTcmix-discuss] two minor WAVETABLE questions

Brad Garton brad at music.columbia.edu
Fri Jan 7 12:36:17 EST 2005


Question 1:

I noticed something about the logic of how we do stereo channel 
assignments in WAVETABLE (and in fact most of our other mono/stereo 
instruments, except for MIX) that is maybe a little counterintuitive:

      if (outputChannels() == 2) {
         out[1] = (1.0 - spread) * out[0];
         out[0] *= spread;
      }

This means that when "spread" is 0, all output goes to out[1], and when 
"spread" is 1, it all goes to out[0].  MIX does the opposite -- when I say 
MIX(0, 0, dur, amp, 0) input channel 0 goes to output channel 0, and 
MIX(0, 0, dur, amp, 1) sends input channel 1 to output channel 1.

Not a big deal, but a logic like this:

      if (outputChannels() == 2) {
         out[1] =  spread * out[0];
         out[0] *= (1.0 - spread);
      }

might be a bit more consistent.  Funny that I've never really noticed this 
before; I guess because I'm always just listening to find where the stereo 
placement happens.


Question 2:

table() now works fine for the amp curve in the rtcmix~ version of 
WAVETABLE, but I was wondering if it might be better audio to use 
tablei()?  Certainly not as efficient, and I'm hard-pressed to cite an 
instance where table() was a problem.

brad




More information about the RTcmix-discuss mailing list