self.start()
self.fsid = self.sfload(sfPath)
+ self._octaveAjusts = {}
+
+ def adjust_octave(self, chan, octave) :
+ '''
+ Abaisse ou élève les notes de n octave
+ '''
+ self._octaveAjusts[chan] = octave
def sfunload(self, update_midi_preset=0):
FSynth.sfunload(self, self.fsid, update_midi_preset=update_midi_preset)
def sfont_select(self, chan):
FSynth.sfont_select(self, chan, self.fsid)
-
+ def noteon(self, chan, key, vel):
+ key = key + self._octaveAjusts.get(chan, 0) * 12
+ FSynth.noteon(self, chan, key, vel)
+
+ def noteoff(self, chan, key) :
+ key = key + self._octaveAjusts.get(chan, 0) * 12
+ FSynth.noteoff(self, chan, key)
if __name__ == '__main__' :