genmidi: Add option for note offset.

This commit is contained in:
Simon Howard 2012-01-02 15:37:44 +00:00
parent de596007d8
commit e10f006a71
2 changed files with 12 additions and 1 deletions

View file

@ -72,7 +72,7 @@ def load_instrument(filename):
return result
class Instrument:
def __init__(self, file1, file2=None, note=None):
def __init__(self, file1, file2=None, off1=0, off2=0, note=None):
self.instr1 = load_instrument(file1)
if file2 is not None:
@ -81,6 +81,8 @@ class Instrument:
self.instr2 = None
self.fixed_note = note
self.offset1 = off1
self.offset2 = off2
NullInstrument = Instrument("dummy.sbi")