[CM] Synthesizing Midi

Rick Taube taube@uiuc.edu
Mon, 9 Aug 2004 08:35:38 -0500

all you need to do is import your two files using import-events and 
then define a little funcion that maps over the events and combines 
them. here is a candidate mapping function that returns a combined list 
of pitches and rhythms, where "rhythm" means the time delta between 
midi notes in your rhythm file:

(define (zipper noteseq rhyseq)
   (loop with time = 0
         for e1 in (subobjects noteseq)
         for e2 in (subobjects rhyseq)
         collect (list (midi-keynum e1) (- (object-time e2) time)))
         do (set! time (object-time e2))))

On Aug 8, 2004, at 4:28 PM, Tony wrote:

> I'm still trying to find a way to synthesize midi, yes midi, not audio.
> This means I want to go further in the ways of creating midi parts,
> especially in creating combinations of melody and rhythm, also finding
> new ways of creating variations of existing midi files. To reach this
> goal I thought Pd, Common Music or both together should be helpful
> tools.
> Rhythm-Melody Combination
> Let me try to describe what is the first step I want to try in 
> combining
> rhythmic midi files with melodic midi files.
> I have two midi files. (e.g. both just one bar long, in 4/4 measure).
> 1: rhythm.mid ( with the following note lengths)
> 1/4 1/4 1/4 1/8 1/8. (all C notes)
> 2: melody.mid (with the following notes)
> 1/4(Note C) 3/4(Note D)
> From these midi files I should get with Pd or Common Music or Key Kit a
> combination:
> 3: combi.mid
> 1/4(C) 1/4(D) 1/4(D) 1/8(D) 1/8(D)
> The same in words explained: The file melody.mid defines the note
> pitches at a given time and rhythm.mid defines the note starting times,
> the note durations and the note velocities.
> (Sometimes) Long melody notes are converted (splitted) to many shorter
> notes according to the rhythm.mid.
> Any tips regarding reaching this goal with Pd or Common Music or Key 
> Kit
> are welcome.
> Best greetings,
> t
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist