Please help me on this:
I'm using Allegro CL trial and I'm writing functions that will give me
lists of midi events BUT I need the code that can write them to a midi
file. (I have 5 lists; attack, duration, pitch, velocity, channel),
I'm not that skilled in programming so can any1 help me get those
lists into a midi file.
Thanx
ET
········@hotmail.com
········@hotmail.com (E T Einarsson) writes:
> I'm using Allegro CL trial and I'm writing functions that will give me
> lists of midi events BUT I need the code that can write them to a midi
> file. (I have 5 lists; attack, duration, pitch, velocity, channel),
> I'm not that skilled in programming so can any1 help me get those
> lists into a midi file.
(defun write-midi-event (attack duration pitch velocity channel)
...)
(mapcar #'write-midi-event attacks durations pitches velocities channels)
but I don't think this is such a great idea. You may wish to break
your problem down into two stages: one that converts from your
representation into one that is closer to the MIDI format (with
note-on and note-off events rather than durations, for instance), and
one that writes into a file.
You may wish to investigate the midi support in the Gsharp score
editor; although it is bundled, it works fine as a standalone library
independent of the clim, font handling and score editor framework.
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)
You might try using common music:
http://commonmusic.sourceforge.net
E T Einarsson wrote:
>
> Please help me on this:
>
> I'm using Allegro CL trial and I'm writing functions that will give me
> lists of midi events BUT I need the code that can write them to a midi
> file. (I have 5 lists; attack, duration, pitch, velocity, channel),
> I'm not that skilled in programming so can any1 help me get those
> lists into a midi file.
>
> Thanx
>
> ET
> ········@hotmail.com