This has been interesting.

INSTRUCTIONS:

Start Jack. Start Qsynth. Route the midi through port to qsynth. Load up our famous general MIDI soundfont. Start emacs/lisp environment. Put these files in the directory it's looking in:

Ass2.cm
fourhardpartII.mid

Do this at your CM prompt:

(compile-file "ass2.cm")
(load "ass2")

Some notes:

The import-events function works ok on a line of notes with no chords, but I imported a two handed piano score. It did weirdness to me. I think what it did was put my notes one after the other, such that, if I had, say, a G4 and a C2 playing at the same time, it became C2, G4 in sequence. At least the way I was doing things that's what happened, once I did some work and had a list of notes. The net result of this in this piece was that it slowed the tempo down. How you ask? Well because in this simple piece, all of the notes are eighth notes. So what ended up happening was the whole piece was stretched out by two, since also, no more than two notes play at the same time in the piece. Cool.

So I wrote a function to play the notes straight as they were, one per eighth note. This is where that stretch manifested, unless of course, I played back the piece into a MIDI file at my target tempo, 120, which then put everything back into perspective (in an odd way - I still don't claim to understand, since I haven't looked at a detailed event list, what it's doing). In other words, outputting to a midi file with tempo set to 120 doubles the speed of what I hear when I do the same events command outputting to the midi output directly. And this, as it turns out, puts the chord progression back into the "right" place, ie: hooked in to what I originally wrote. Weird eh? So I output this result, used Rosegarden to play it back with a Rhodes patch in Qsynth, and got a track for the tune that this is all meant for. Neat eh?

Then I got two versions of what you hear if you do the above instructions, which uses some Markov analyzation and such to - you know - sort of - randomizijize the notes. One is as you hear it, only it was slightly longer, and I export it to a MIDI file, then used Rosegarden to play it back into Ardour. But it was the same timbres. It was just a few too many notes and it errors out if playing with midi-port.pm so I gave you a slightly shorter version here. Then I exported another MIDI file at 120 BPM which created a double time version. Both of those are being worked into the Ardour project as we speak.

For curiosity's sake, here is the part of this that is actually different:

The version on this page:

(events (list (playit 40 4hardnotes 35 :chan 5)
              (playit 32 4hardnotes 1 :chan 4)
	      (playit 16 4hardnotes 6 :chan 6)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 32 4hardnotes 1 :chan 4)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 40 4hardnotes 35 :chan 5)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 32 4hardnotes 4 :chan 4))
	 "midi-port.pm" '(0 2 4 6 10 12 14 16 24 32 40 44 44) :timesig '(4 4))

The slow MIDI file version that I used:

(events (list (playit 48 4hardnotes 35 :chan 5)
              (playit 40 4hardnotes 1 :chan 4)
	      (playit 16 4hardnotes 6 :chan 6)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 40 4hardnotes 1 :chan 4)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 48 4hardnotes 35 :chan 5)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 40 4hardnotes 4 :chan 4))
	 "ass2slow.mid" '(0 2 4 6 10 12 14 16 24 32 40 44 48 52 44) :timesig '(4 4))

The fast MIDI file version that I used:

(events (list (playit 48 4hardnotes 35 :chan 5)
              (playit 40 4hardnotes 1 :chan 4)
	      (playit 16 4hardnotes 6 :chan 6)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 40 4hardnotes 1 :chan 4)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 48 4hardnotes 35 :chan 5)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 8 4hardnotes 12 :chan 7)
	      (playit 40 4hardnotes 4 :chan 4))
	 "ass2fast.mid" '(0 2 4 6 10 12 14 16 24 32 40 44 48 52 44) :tempo 120 :timesig '(4 4))

Also, here is the differing code that I used to make the other Rhodes track, before any Markov analyzing and such.

(defun playstraight (len tune &key (chan 0) (amp .5) (temp 120))
	    (process with len = (length tune)
		      for i from 0
		      for k = (list-ref tune i)
		      output (new midi :time (now)
				       :keynum k
				       :channel chan
				       :amplitude amp)
		      wait (rhythm 'e temp)))

(events (playstraight 10 4hardnotes :chan 5 :amp .3) "test.mid")

Also, another note, I was lucky that I was already wanting to work in 120 beats per minute, because as it turns out, I couldn't get events to calculate a seconds number using the rhythm function. It would tell me it wasn't a real number. I was stuck with seconds when it came to telling each different instance of "playit" when to start. Luckily, 2 seconds is one bar in 120 beats per minute time, so I squeaked by.

Also, if you care, here is the original music:

Goodnight, and good luck.