[CM] Rearranging a sequence
Mon, 9 Apr 2007 19:52:44 -0400
I having been trying to rearrange the time values of a MIDI file, i.e.
rearrange the ordering of the notes while keeping all the other MIDI
information intact. I can load the MIDI into a seq object but from
there I hit a brick wall.
I tried using "heap" to no avail and I figured there was a way to do
it with fold-objects or map-objects but I can't figure out how. I was
looking in Notes From the Meta Level and couldn't find any helpful
examples... all the
ones that ones that seem to cover this topic in the book are
manipulating simple lists like '(a4
b d f c) not objects/subobjects.
Any ideas how I should approach this? Any pages in NRTML that cover
it that I missed?
Let me know if I have the right idea here... a "seq" is a class. If I
load a midifile into an instance of a seq (call it myseq) then myseq
will contain many instances of the class MIDI. The time value of
those instances can be accessed using the :time keyword. Correct? So
my basic problem is how do I reach into "myseq", and then into a MIDI