Since my program requires sequential update_time(n)s, I need to use "blank" midi messages that interrupt update_time. Therefore I could not only use rel_time() or something to that effect, as it does not actually hold a place in the midi file and ergo does not interrupt the count. I used note_off(...) when there was no note playing, which serves the purpose of the "blank" function:
midi.note_on(...)
midi.update_time(24)
midi.update_time(47)
midi.update_time(30)
midi.note_off(...)
would be the same as
midi.note_on(...)
midi.update_time(30)
midi.note_off(...).
Since my program requires sequential update_time(n)s, I need to use "blank" midi messages that interrupt update_time. Therefore I could not only use rel_time() or something to that effect, as it does not actually hold a place in the midi file and ergo does not interrupt the count. I used note_off(...) when there was no note playing, which serves the purpose of the "blank" function:
...
if int(beat[2]):
midi.note_on(channel=0, note=0x40)
midi.update_time(24)
midi.note_off(channel=0, note=0x40)
midi.update_time(0)
else:
midi.note_off(channel=0, note=0x40)
midi.update_time(24)
...
Simple enough, I guess.
Thanks a lot, max, this is an amazing module. will come in handy many times