[CM] cm 3.7.0 beta
Heinrich Taube
taube at uiuc.edu
Sat Jul 31 07:48:35 PDT 2010
i save a beta version of cm 3.7.0 with midifile-import on camil:
http://www.camil.music.uiuc.edu/software/grace/Grace-3.7.0-beta1-osx.zip
the other new things in the beta are (1) file-version() generates
versioned file names and (2) sal checks your local variable and
function parameter names and warns you if they shadow defined
functinos etc
here is an example of importing key numbers from a midi file and
writing a corresponding ly file :
function notate (mid)
with ly = make-pathname(type: "ly", defaults: full-pathname(mid)),
dat = midifile-import(mid, 1, "key")
file ly ()
fms:part(id: "pno", inst: "piano")
loop with r = 1/4
for k in dat
for t from 0 by r
fms:note(time: t, dur: r, pitch: k, part: "pno")
end
end
end
function playmidi (path)
shell(string-append("timidity ", path, " &"))
end
notate("/Users/hkt/incline/incline-1.mid")
More information about the Cmdist
mailing list