Hi, I've found a small bug in the Keyboard class. To reproduce it, you can use e.g. Zyne with server settings MIDI interface = Virtual Keyboard, Polyphony = 3, and Hold mode. Start audio and press/click 3 keys and then try to deselect all pressed keys. You still hear sound and the console shows an exception for no declared var voice.
A suggestion to fix the bug look at the functions MouseDown and KeyDown in file pyo.lib._wxwidgets.py; when deleting a dict key from self.blackSelected or self.whiteSelected, one should decrement total by one; otherwise self.outFunction(note) would not called with note (pit, 0) to switch off the key correctly.
Thus, adding after these lines:
3668368037903807
a new line with:
total -= 1
should fix it.
Hi, I've found a small bug in the Keyboard class. To reproduce it, you can use e.g. Zyne with server settings MIDI interface = Virtual Keyboard, Polyphony = 3, and Hold mode. Start audio and press/click 3 keys and then try to deselect all pressed keys. You still hear sound and the console shows an exception for
no declared var voice
. A suggestion to fix the bug look at the functionsMouseDown
andKeyDown
in filepyo.lib._wxwidgets.py
; when deleting a dict key from self.blackSelected or self.whiteSelected, one should decrementtotal
by one; otherwiseself.outFunction(note)
would not called with note (pit, 0) to switch off the key correctly.Thus, adding after these lines: 3668 3680 3790 3807 a new line with:
total -= 1
should fix it.PS Brilliant work!