|
|
|
|
kcps cpstun ktrig, kindex, kfn icps cpstuni index, ifn
Create fully customized micro-tuning scales. These opcodes are similar to cpstmid, but work without MIDI.
icps – return value in Hz (cps)
index – integer number denoting an index of the scale
ifn – function table containing the parameters (numgrades, interval, basefreq, basekeymidi) and the tuning ratios
kcps – return value in Hz (cps)
ktrig – trigger signal used to trigger the evaluation. Evaluation is performed when ktrig <> 0.
kindex – integer number denoting an index of the scale
kfn – function table containing the parameters (numgrades, interval, basefreq, basekeymidi) and the tuning ratios.
cpstun works at k-rate, while cpstuni at init-rate. A function table number (ifn or kfn) containing the tuning ratios, and other parameters is required in the score.
kindex and index arguments should be filled with integer values expressing the grade of the scale to be converted to Hz (cps). In cpstun, a new value is evaluated only when ktrig contains a non-zero value. The function table, ifn or kfn, should be generated by GEN2. The first four values stored in this function are:
After these four values, the user can insert the tuning ratios.
An example sowing the f-statement for a standard 12-grade scale with a base frequency of 261 Hz assigned to key number 60.
; numgrades interval basefreq basekey tuning-ratios (equal temprament) f1 0 64 -2 12 2 261 60 1 1.059463 1.12246 1.18920 (etc.)
A 24-grade scale with a base frequency of 440 Hz assigned to key number 48, and a repetition interval of 1.5.
; numgrades interval basefreq basekey tuning-ratios .......
f1 0 64 -2 24 1.5 440 48 1 1.01 1.02 1.03 (etc.)
Gabriel Maldonado
Italy
2001
New in Csound 4.15
|
|
|
|