[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Coerce input signal to a given scale?
Hi,
How could I coerce an input signal to a given scale? I've worked out
how to do it for a scale with all equal ratios - e.g. a whole-tone
scale in this example:
(
{
var in, realPitch, desiredPitch, shiftVal, shifted, out;
in = AudioIn.ar(2);
realPitch = ZeroCrossing.ar(in);
desiredPitch = realPitch.cpsmidi.round(2).midicps;
shiftVal = desiredPitch/realPitch;
out = PitchShift.ar(in, pitchRatio:shiftVal);
}.play;
)
But for a scale where the ratios aren't all the same...?
Thanks in advance for any tips on this one -
Dan
--
http://www.mcld.co.uk