midi: fix program change (failed to send with correct number of arguments)

This commit is contained in:
jean-emmanuel 2017-05-09 16:39:24 +02:00
parent 0ca02f1be2
commit de8cb6d5e8
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@
- bug fixes
- launcher: link to the app's address is now clickable
- sidepanel: layout glitches with iOS
- midi: `program` now works with the correct number of arguments
- misc
- some little style fixes

View file

@ -216,7 +216,7 @@ class MidiRouter(object):
channel = int(min(max(args[0],1), 16))
data1 = int(min(max(args[1],0), 127))
data2 = int(min(max(args[2],0), 127))
data2 = int(min(max(args[2],0), 127)) if len(args) >= 3 else 0
if 'note' in event:
if data2 == 0: