node->add_property("Name", _name);
/*
- typedef std::list< boost::shared_ptr< Evoral::MIDIEvent<Evoral::MusicalTime> > > PatchMidiCommands;
+ typedef std::list< boost::shared_ptr< Evoral::MIDIEvent<Evoral::Beats> > > PatchMidiCommands;
XMLNode* commands = node->add_child("PatchMIDICommands");
for (PatchMidiCommands::const_iterator event = _patch_midi_commands.begin();
event != _patch_midi_commands.end();
Note::get_state (void)
{
XMLNode* node = new XMLNode("Note");
- node->add_property("Number", _number + 1);
+ node->add_property("Number", _number);
node->add_property("Name", _name);
return *node;
assert(node.name() == "Note");
const int num = string_to_int(tree, node.property("Number")->value());
- if (num < 1 || num > 128) {
+ if (num > 127) {
PBD::warning << string_compose("%1: Note number %2 (%3) out of range",
tree.filename(), num, _name)
<< endmsg;
return -1;
}
- _number = num - 1;
+ _number = num;
_name = node.property("Name")->value();
return 0;
}
}
-boost::shared_ptr<CustomDeviceMode>
+boost::shared_ptr<CustomDeviceMode>
MasterDeviceNames::custom_device_mode_by_name(const std::string& mode_name)
{
return _custom_device_modes[mode_name];
}
-boost::shared_ptr<ChannelNameSet>
+boost::shared_ptr<ChannelNameSet>
MasterDeviceNames::channel_name_set_by_channel(const std::string& mode, uint8_t channel)
{
boost::shared_ptr<CustomDeviceMode> cdm = custom_device_mode_by_name(mode);
return cns;
}
-boost::shared_ptr<Patch>
-MasterDeviceNames::find_patch(const std::string& mode, uint8_t channel, const PatchPrimaryKey& key)
+boost::shared_ptr<Patch>
+MasterDeviceNames::find_patch(const std::string& mode, uint8_t channel, const PatchPrimaryKey& key)
{
boost::shared_ptr<ChannelNameSet> cns = channel_name_set_by_channel(mode, channel);
if (!cns) return boost::shared_ptr<Patch>();