source file: mills2.txt Date: Wed, 14 May 1997 18:59:27 +0200 Subject: Re: Scala to Csound (digest 1072 topic 2) From: alves@orion.ac.hmc.edu (Bill Alves) >> Csound contains operators for dealing with any equally divided scale, >> repeating at any interval in teh score; it also has facilities for >> handling non-equal scales at any repeat interval. This has been there >> for a long time now. Look at cpsxpch. > >Thanks John. I have looked at cpspch. It seems to me to be related to >pitch class, which is inherently related to modulo-12. For that reason, I >tried another way. I thought it was more exact (and therefore less likely >to mislead) to use modulo-7 numbers, rather than modulo-12. > John referred to cpsxpch, not cpspch. Here's what it says in the 3.44 release notes: b) Tuning Opcodes (John Fitch) icps cps2pch ipch, iequal icps cpsxpch ipch, iequal, irepeat, ibase 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. INITIALISATION 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 It is possible to accomplish the same thing without cpsxpch or cps2pch. Here's an example for 7-TET, since you asked about 7 tones to the octave: instr 1 ioct int(p5) ; the octave ipchclass 100*frac(p5) ; the pitch class # (00-07) ifreq cpsoct(ioct+ipchclass/7) ; covert it to oct format .. ; go on to use ifreq as normal If you want a fixed but not equally tempered scale, then you can store the factors in a table and use a negative iequal parameter in cps2pch: f 1 0 16 -2 1.000000 1.066667 1.125000 1.200000 1.250000 1.333333 1.406250 1.500000 1.600000 1.666667 1.777778 1.875000 instr 1 ifreq cps2pch p5,-1 ... This table will give you 5-limit just intonation for a 12-tone scale. To effect more general just intonation, Lydia Ayers posted an example some months ago of how to send the fundamental, numerator, denominator, and octave to the instrument as p-fields. This way you don't have to mess with pitch class notation at all. Best of luck. Bill ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ Bill Alves email: alves@hmc.edu ^ ^ Harvey Mudd College URL: http://www2.hmc.edu/~alves/ ^ ^ 301 E. Twelfth St. (909)607-4170 (office) ^ ^ Claremont CA 91711 USA (909)607-7600 (fax) ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Received: from ns.ezh.nl [137.174.112.59] by vbv40.ezh.nl with SMTP-OpenVMS via TCP/IP; Wed, 14 May 1997 19:19 +0200 Received: by ns.ezh.nl; (5.65v3.2/1.3/10May95) id AA01914; Wed, 14 May 1997 19:19:20 +0200 Date: Wed, 14 May 1997 19:19:20 +0200 Received: from ella.mills.edu by ns (smtpxd); id XA01912 Received: (qmail 11631 invoked from network); 14 May 1997 17:19:11 -0000 Received: from localhost (HELO ella.mills.edu) (127.0.0.1) by localhost with SMTP; 14 May 1997 17:19:11 -0000 Message-Id: Errors-To: madole@mills.edu Reply-To: tuning@eartha.mills.edu Originator: tuning@eartha.mills.edu Sender: tuning@eartha.mills.edu