assert(_writing);
if (note->note() > 127) {
- error << string_compose (_("illegal note number (%1) used in Note event - event will be ignored"), note->note()) << endmsg;
+ error << string_compose (_("illegal note number (%1) used in Note on event - event will be ignored"), (int) note->note()) << endmsg;
return;
}
if (note->channel() >= 16) {
- error << string_compose (_("illegal channel number (%1) used in Note event - event will be ignored"), note->channel()) << endmsg;
+ error << string_compose (_("illegal channel number (%1) used in Note on event - event will be ignored"), (int) note->channel()) << endmsg;
return;
}
DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 c=%2 note %3 OFF @ %4 v=%5\n",
this, (int)note->channel(),
(int)note->note(), note->time(), (int)note->velocity()));
- assert(note->note() <= 127);
- assert(note->channel() < 16);
assert(_writing);
+
+ if (note->note() > 127) {
+ error << string_compose (_("illegal note number (%1) used in Note off event - event will be ignored"), (int) note->note()) << endmsg;
+ return;
+ }
+ if (note->channel() >= 16) {
+ error << string_compose (_("illegal channel number (%1) used in Note off event - event will be ignored"), (int) note->channel()) << endmsg;
+ return;
+ }
+
_edited = true;
if (_percussive) {