cpstun3, cpstun3_i
Return tuning values from scale table.
Syntax
Usage
cpstun3 works in similar fashion to the Csound cpstun opcode. Given an index (representing something like a pitch-class), and a function table formatted with pitch ratio's, cpstun returns the cps pitch.
cpstun3 enhances cpstun by working with fractional indices, negative indices, and non-octave scales. The fractional part is calculated as a value between neighbouring whole-integer indices.
cpstun3 evaluates every time kindex changes. The kforcetrigger argument is optional.
Note also that cpstun3 uses a different order of arguments from cpstun.
Outputs and Arguments
k/iindex -- An index of the scale. Think of this a bit like a pitch class. Can be fractional and negative.
k/itable -- Function table containing the parameters (numgrades, interval, basefreq, basekeymidi) and tuning ratios (beginning at 1, and extending to the period of the scale).
kforcetrigger (optional for cpstun3) -- when non zero triggers an evaluation.
See also cpstun and Iain McCurdy's cpstun2