[CM] Frequency problems?

Ken renueden@earthlink.net
Sun, 30 Jun 2002 08:53:26 -0700


Extending the last tutorial algo, I am having trouble understanding how to
convert keynums to hertz for use in Csound.
1-Is there an easier way to convert to hertz other than inserting #h into
each keynum statement?
2-How do I have a chord return hertz as in the first random element below?


(defprocess my-first ()
  (process with k =(new random of '(([48 50 55] weight .2143)
        (#h 62 weight .0714)
        (#h 64 weight .1429)
        (#h 53 weight .0714)
        (#h 67 weight .2143)
        (#h 69 weight .1429)
        (#h 58 weight .1429)))
            with r = (new cycle rhythms '(e e ts ts ts e e ts ts ts))
     with d = (new cycle rhythms '(q h e e s q w e e q))
     with a = (new cycle amplitudes '(.6 .3 .1 .2 .1))
            repeat 96
            for x = (now)
            for ba = (next r)
            output (new pluck time x
   pitch (next k)
   duration (next d)
   amplitude (next a)
   envelope 32
   wet-level .4)
     wait ba))

Thanks,
Ken Locarnini