QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

cps2pch, cpsxpch

        icps    cps2pch    ipch, iequal
        icps    cpsxpch    ipch, iequal, irepeat, ibase

DESCRIPTION

Converts a pitch-class notation into cycles-per-second for equal divisions of the octave (for cps2pch) or for equal divisions of any interval. There is a restriction of no more than 100 equal divisions.

INITIALIZATION

ipch - Input number of the form 8ve.pc, indicating an `octave' and which note in the octave.

iequal - if positive, the number of equal intervals into which the `octave' is divided. Must be less than or equal to 100. if negative is the number of a table of frequency multipliers

irepeat - Number indicating the interval which is the `octave'. The integer 2 corresponds to octave divisions, 3 to a twelveth, 4 is two octaves, and so on. This need not be an integer, but must be positive.

ibase - The frequency which corresponds to pitch 0.0

Note: 1. The following are essentially the same

        ia      =               cpspch(8.02)
        ib      cps2pch         8.02, 12
        ic      cpsxpch         8.02, 12, 2, 1.02197503906
2. These are opcodes not functions.

3. Negative values of ipch are allowed, but not negative irepeat, iequal or ibase.

EXAMPLE:

       inote cps2pch   p5, 19  ; convert oct.pch to cps in 19ET
       inote cpsxpch   p5, 12, 3, 261.62561  ; Pierce scale centered 
                                              ; on middle A
       inote cpsxpch   p5, 21, 4, 16.35160062496 ; 10.5ET scale
The use of a table allows exotic scales by mapping frequencies in a table. For example the table:
        f2 0 16 -2 1 1.1 1.2 1.3 1.4 1.6 1.7 1.8 1.9
can be used with:
        ip       cps2pch        p4, -2
to get a 10 note scale of unequal divisions.

AUTHOR:

John ffitch
University of Bath/Codemist Ltd
Bath, UK
1997

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97