[CM] Notes from the Metalevel text

Randolph Latimer rdlatimer at tjhsst.edu
Thu May 7 08:33:09 PDT 2009


Yes, I used the "windows exe" installer from this site
http://sourceforge.net/project/showfiles.php?group_id=9766&package_id=106649&release_id=652318

cm-3.2.4-win32.zip    


I noticed you're also working on a ruby version, that would be more
attractive syntactically.
I teach in a high school in northern VA - Thomas Jefferson HS for Sci and
Tech, there are students here doing computer science related senior
projects who are interested in the computer science/music connections.

I like lisp/scheme, but I'm "old school", kids nowadays have a difficult
time with it, lose patience pretty quickly.
Python/Ruby are easier for them to pick up.

We also teach some C, I like this too, but again, it's tougher for kids to
pick up.
Anyway, looks like you've got alot built up around scheme at this point.  I
wonder if that's the problem with loading the files from within cm. Maybe
it would work better with a straight common lisp file?  
Although, the syntax for scheme is probably a little more attractive.

I had a bright student in the late 80s who used Forth, I see you've even
got a Forth version.

At school here, we have a linux workstation lab.  My teacher laptop is
windows, so is my home computer, that's why I'd like to get the windows
version working.  Thanks





On Thu, 7 May 2009 10:18:16 -0500, Heinrich Taube <taube at uiuc.edu> wrote:
> is this an exe you downloaded or did you build it recently from svn  
> sources?
> If the former i could make a "beta" of the current svn and post it on  
> pinhead.
> 
> On May 7, 2009, at 9:29 AM, Randolph Latimer wrote:
> 
>> Is it possible that the Windows version has bugs as far as loading scm
>> progs from within cm?
>>
>> I'm getting strange error messages for simple files from Chap 7.
>>
>> For example..
>> chap7.scm     (I think that's an ok file name?)
>>
>> (define x 1)
>>
>> (define (scale-hz hz mul)
>>  (* hz (expt 2 mul)))             <--- If I save this, then load (see
>> below) from cm, this may work ok, but when
>>                                         I add in the next function,  
>> then
>> resave, I may get error messages
>>
>> (define lowest-freq 6.875)
>>
>> (define (keynum->hertz knum)
>>  (* lowest-freq (expt 2 (/ (+ knum 3) 12))))
>>
>>
>>
>> cm>(load "chap7.scm")      <--- sometimes loads ok, sometimes gives  
>> strange
>> error messages
>>
>> I'm using Vim, but seems to act oddly also with xemacs
>>
>> I'm in Windows
>>
>> Do you think the cm for windows may be a little buggy, loading scm  
>> files
>> this way? or maybe it's something I'm doing?
>>
>>
>>
>>
>> On Thu, 7 May 2009 08:29:07 -0500, Heinrich Taube <taube at uiuc.edu>  
>> wrote:
>>> 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
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list