+
+class PlayingScreen(_PlayingScreenBase) :
+ "fenêtre de jeu pour improvisation"
+ scale = [55, 57, 59, 60, 62, 64, 65, 67, 69, 71, 72]
+
+ def __init__(self) :
+ distinctNotes = []
+ for midi in self.scale :
+ tone = Tone(midi)
+ distinctNotes.append(tone)
+
+ super(PlayingScreen, self).__init__(distinctNotes)
+
+ #cracra code
+ soundFont = '/Users/pinbe/dev/minwii/fluid-soundfont-3.1/FluidR3_GM.sf2'
+ bank = preset = 0
+
+ self.fs = fs = fluidsynth.Synth()
+ fs.start()
+ self.fsid = fsid = fs.sfload(soundFont)
+ fs.program_select(0, fsid, bank, preset)
+
+ def __del__(self) :
+ print 'PlayingScreen.__del__'
+ self.fs.delete()
+
+ @event_handler(events.NOTEON)
+ def noteon(self, evt) :
+ tone = evt.tone
+ self.fs.noteon(0, tone.midi, 64)