diff options
author | Graham Northup <grissess@nexusg.org> | 2018-09-11 02:30:06 -0400 |
---|---|---|
committer | Graham Northup <grissess@nexusg.org> | 2018-09-11 02:30:06 -0400 |
commit | a47d62027c8eefbaecdae73e34334d237841e374 (patch) | |
tree | ed667f6487f2df73cca1a8a529612e65350d567b | |
parent | 1efd04acb4e8e2cfaf89b4476d2b5b1a5ed57e6e (diff) |
Fixed IndexError
-rw-r--r-- | mkiv.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -342,7 +342,7 @@ for fname in args: lvtime, lvol = sorted(vol_at[tidx][ev.channel].items(), key = lambda pair: pair[0])[-1] vol_at[tidx][ev.channel][abstime] = (0x3F80 & lvol) | ev.value chg_vol[tidx][ev.channel] += 1 - events.append(MergeEvent(ev, tidx, abstime, cur_bank[tidx][ev.channel], cur_prog[tidx][ev.channel], cur_mw[tidx][ev.channel], events[-1])) + events.append(MergeEvent(ev, tidx, abstime, cur_bank[tidx][ev.channel], cur_prog[tidx][ev.channel], cur_mw[tidx][ev.channel], events[-1] if events else None)) ev_cnts[tidx][ev.channel] += 1 elif isinstance(ev, midi.MetaEventWithText): events.append(MergeEvent(ev, tidx, abstime)) |