[CM] Notes from the Metalevel text

Heinrich Taube taube at uiuc.edu
Thu May 7 06:29:07 PDT 2009


On May 7, 2009, at 7:39 AM, Randolph Latimer wrote:

> Okay, thanks for the update. I'd prefer to keep with CM3, keep  
> current.
> Perhaps there are equivalent functions/variables in CM3 for CM2 items,
> such as
>  (pwd)  -> (cwd)  and (cd) -> (chdir)

i guess maybe i should add the old names back, this wasnt intended to  
change. for now you can do
	(define pwd cwd)
	(define cd chdir)


>  let me know if there are equivalents to *scale*, (hertz..)   
> (keynum...)

in general cm3 names are terser (you want to keep typing down when you  
send things interactively )

hertz -> hz
keynum -> key

you dont need *scale* anymore, a scale is just a list of (probably  
floating point) key numbers. if you want to define your own scales you  
can use the handy 'scale' function, for example this will define a  
just major scale  on middle C over two octaves (15 steps):

(define just-c-major
   (let ((just-major '(9/8 10/9 16/15 9/8 10/9 9/8 16/15)))
     (scale 15 60 (ratio->steps just-major)))

since a scale is list you can do anything you want with it, eg

(list-ref just-c-major 7)
(pick just-c-major)
(make-cycle just-c-major)

> (new...)

there are no objects. just use lists to hold your data. to send data  
somewhere use one of the send methods or its underlyin function, eg

(mp:midi :key 90)
(send "mp:midi" :key (between 60 90))


> These are nice examples in the text, it'd be good to be able to keep
> similar examples, just update the syntax


its on my todo list, but unfortunately that list is infinately long.  
ill do some this summer, if you figure things out send them to me so i  
dont have to do it



More information about the Cmdist mailing list