[Fwd: Python Midi Package: writing events non-chronologically]

tim tim.vets at skynet.be
Thu Nov 24 08:15:19 EST 2005


(...I sent this one a second time, waited for 60 minutes, it didn't 
appear, sorry if it's a double...)

Someone using Python Midi Package from 
http://www.mxm.dk/products/public/ lately?

I want to do the following :
write some note events in a midi file
then after doing that, put some controllers at the beginning of the 
midifile
(because I want to be able to make those dependant on what notes were 
just written)

def midctrls():
   global roffset, melchan, roffset, gmt, timedisplay, out_file, midi, 
usednotes, n
   midi.reset_time()      #seems to do nothing
   for cha in range(16):
       if cha==1:
           midi.abs_time=0   #seems to do nothing
           midi._relative_time = 0   #seems to do nothing, but I can 
imagine why
           midi._absolute_time = 0   #seems to do nothing
           midi.update_time(new_time=0, relative=0)  #although I give 
the variable relative=0 it seems to be relative ?
           midi.continuous_controller(cha, 0, 122)
(snip)

With this code I want a controller number 0 with value 122 to be written 
at the beginning of my midifile.
It is written at the end, how I move the writing position to the beginning?

thanks for any help!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051124/d931cc5a/attachment.html>
-------------- next part --------------
An embedded message was scrubbed...
From: tim <tim.vets at skynet.be>
Subject: Python Midi Package: writing events non-chronologically
Date: Thu, 24 Nov 2005 12:39:55 +0100
Size: 1558
URL: <http://mail.python.org/pipermail/python-list/attachments/20051124/d931cc5a/attachment.mht>


More information about the Python-list mailing list