enable and extend EVORAL_MIDI_XML. Useful for Debugging. Any objections?

git-svn-id: svn://localhost/ardour2/branches/3.0@13223 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier
2012-10-10 04:31:59 +00:00
parent f8b7687f78
commit 3f5c6f8190
3 changed files with 26 additions and 3 deletions

View File

@@ -71,8 +71,29 @@ MIDIEvent<Time>::to_xml() const
result->add_property("Number", long(pgm_number()));
break;
case MIDI_CMD_NOTE_ON:
result = new XMLNode("NoteOn");
result->add_property("Channel", long(channel()));
result->add_property("Note", long(note()));
result->add_property("Velocity", long(velocity()));
break;
case MIDI_CMD_NOTE_OFF:
result = new XMLNode("NoteOff");
result->add_property("Channel", long(channel()));
result->add_property("Note", long(note()));
result->add_property("Velocity", long(velocity()));
break;
case MIDI_CMD_BENDER:
result = new XMLNode("PitchBendChange");
result->add_property("Channel", long(channel()));
result->add_property("Value", long(pitch_bender_value()));
break;
default:
// The implementation is continued as needed
result = new XMLNode("NotImplemented");
break;
}
@@ -82,6 +103,7 @@ MIDIEvent<Time>::to_xml() const
#endif // EVORAL_MIDI_XML
template class MIDIEvent<Evoral::MusicalTime>;
template class MIDIEvent<long long>;
} // namespace Evoral