[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] phasor calcfunc



if (unit->mCalcRate == calc_FullRate) {
if (INRATE(0) == calc_FullRate) {
if (INRATE(1) == calc_FullRate) {
SETCALC(Phasor_next_aa);
} else {
SETCALC(Phasor_next_ak);
}
} else {
SETCALC(Phasor_next_kk);
}
} else {
SETCALC(Phasor_next_ak);
}

This seems odd to me, but maybe I misunderstand.

If the unit is audio rate and its first two inputs are audio rate, use _aa (makes sense).
If the unit is audio rate and its trigger is audio rate but rate is control, use _ak.
If it's audio rate and its first two inputs are control, use _kk (huh wtf?).
if its control rate, use _ak (again, huh?).

Shouldn't the last two be flipped so it looks like this?

if (unit->mCalcRate == calc_FullRate) {
if (INRATE(0) == calc_FullRate) {
if (INRATE(1) == calc_FullRate) {
SETCALC(Phasor_next_aa);
} else {
SETCALC(Phasor_next_ak);
}
} else {
SETCALC(Phasor_next_ak);
}
} else {
SETCALC(Phasor_next_kk);
}

(I was surprised to see that my example was using next_ak when the unit is control rate and all its inputs are either control or scalar.)

hjh



: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman