From d7c62c8a41b9ce4688a03a054522cbff1983d408 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Sun, 21 Oct 2012 04:01:33 +0000 Subject: In MidiEventBase::read() Repair controllers saved with lo byte 0xff. No such control. It was supposed to be 0x00. It's an error caused by a previous bug, fixed now. --- muse2/ChangeLog | 3 +++ muse2/muse/midievent.cpp | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'muse2') diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 365ef501..3d7c1513 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +20.10.2012: + - In MidiEventBase::read() Repair controllers saved with lo byte 0xff. (Tim) + No such control. It was supposed to be 0x00. It's an error caused by a previous bug, fixed now. 19.10.2012: * Improved: Midi initializations. New settings options, can be 'quiet'. Complete rewrite of initializations coding. (Tim) * Improved: Midi controller graphs: Control selector 'S' popup now stay-open, AND NOW with multi-coloured dots: diff --git a/muse2/muse/midievent.cpp b/muse2/muse/midievent.cpp index 9e0e8974..7599e3d9 100644 --- a/muse2/muse/midievent.cpp +++ b/muse2/muse/midievent.cpp @@ -177,7 +177,14 @@ void MidiEventBase::read(Xml& xml) break; case Xml::TagEnd: if (tag == "event") + { + // HACK: Repair controllers saved with lo byte 0xff. + // No such control. It was supposed to be 0x00. + // It's an error caused by a previous bug, fixed now. + if((type() == Controller) && ((a & 0xff) == 0xff)) + a &= ~0xff; return; + } default: break; } -- cgit v1.2.3