midi: accept sending sysex strings without spaces between the bytes
This commit is contained in:
parent
fd0f6d24d5
commit
c9a02976ed
2 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.6.3
|
||||
|
||||
- midi
|
||||
- accept sending sysex strings without spaces between the bytes
|
||||
|
||||
## 1.6.2
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -194,8 +194,9 @@ def send_midi(name, event, *args):
|
|||
m = []
|
||||
for arg in args:
|
||||
if type(arg) is str:
|
||||
arg = arg.split(' ')
|
||||
arg = [int(x, 16) for x in arg]
|
||||
arg = arg.replace(' ', '') # remove spaces
|
||||
arg = [arg[i:i+2] for i in range(0, len(arg), 2)] # split in 2 chars bytes
|
||||
arg = [int(x, 16) for x in arg] # parse hex bytes
|
||||
for x in arg:
|
||||
m.append(x)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue