node->add_property("Name", _name);
/*
- typedef std::list< boost::shared_ptr< Evoral::MIDIEvent<double> > > PatchMidiCommands;
+ typedef std::list< boost::shared_ptr< Evoral::MIDIEvent<Evoral::MusicalTime> > > PatchMidiCommands;
XMLNode* commands = node->add_child("PatchMIDICommands");
for (PatchMidiCommands::const_iterator event = _patch_midi_commands.begin();
event != _patch_midi_commands.end();
return "";
}
+ boost::shared_ptr<const NoteNameList> note_names;
boost::shared_ptr<const Patch> patch(
find_patch(mode_name, channel, PatchPrimaryKey(program, bank)));
- if (!patch) {
- return "";
+ if (patch) {
+ note_names = note_name_list(patch->note_list_name());
}
- boost::shared_ptr<const NoteNameList> note_names(
- note_name_list(patch->note_list_name()));
if (!note_names) {
/* No note names specific to this patch, check the ChannelNameSet */
boost::shared_ptr<ChannelNameSet> chan_names = channel_name_set_by_channel(
MIDINameDocument::MIDINameDocument (const string& filename)
{
- if (!_document.read (filename)) {
+ XMLTree document;
+ if (!document.read (filename)) {
throw failed_constructor ();
}
- _document.set_filename (filename);
- set_state (_document, *_document.root());
+ document.set_filename (filename);
+ set_state (document, *document.root());
}
int