projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qq bidouilles de l'ordre de l'expérimentation.
[minwii.git]
/
src
/
app
/
synth.py
diff --git
a/src/app/synth.py
b/src/app/synth.py
index
a2a0244
..
fa65638
100755
(executable)
--- a/
src/app/synth.py
+++ b/
src/app/synth.py
@@
-23,6
+23,13
@@
class Synth(FSynth) :
self.start()
self.fsid = self.sfload(sfPath)
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 sfunload(self, update_midi_preset=0):
FSynth.sfunload(self, self.fsid, update_midi_preset=update_midi_preset)
@@
-33,7
+40,13
@@
class Synth(FSynth) :
def sfont_select(self, chan):
FSynth.sfont_select(self, chan, self.fsid)
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__' :
if __name__ == '__main__' :