sclbend, sclbend_i
Returns the interpolated cps pitch when given a scale degree and a modifier (pitchbend) in a channel.
Syntax
Usage
sclbend accepts a scale degree and a channel name. The value read from the channel is added to the scale degree. Output is converted to cps pitch (using cpstun3).
The channel can be used as a pitch-bend signal, modifying the pitch with a continuous signal.
However, unlike a standard midi pitchbend which typically applies a constant fixed interval to every pitch, sclbend applies a relative amount in reference to scale degrees in iscale.
For example, a channel value of -2 modifies the pitch down 2 steps in the scale (in a C major scale, an 'E' would move a major 3rd down to 'C', and a 'C' would move a minor 3rd to 'A'). Channel values can also be fractional. Fractional values are calculated as the distance to the next nearest note, thus a channel value of 0.5 finds the half-way point between the current pitch and the next pitch in the scale.
Outputs and Arguments
k/isclin -- An index of the scale. Think of this a bit like a pitch class. Can be fractional and negative.
Sbend -- A channel name expected to receive numerical values (through chnset).
iscale (optional, default=gi_CurrentScale)-- Function table containing the parameters (numgrades, interval, basefreq, basekeymidi) and tuning ratios (beginning at 1, and extending to the period of the scale).
See also the example for midiroute