From a47d62027c8eefbaecdae73e34334d237841e374 Mon Sep 17 00:00:00 2001 From: Graham Northup Date: Tue, 11 Sep 2018 02:30:06 -0400 Subject: Fixed IndexError --- mkiv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkiv.py b/mkiv.py index 9c6970f..cd50ce2 100644 --- a/mkiv.py +++ b/mkiv.py @@ -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)) -- cgit v1.2.3-70-g09d2