diff options
Diffstat (limited to 'libs/midi++2/midnam_patch.cc')
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 624701bcde..dbde6e240c 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -40,6 +40,26 @@ Patch::set_state (const XMLNode& node) } XMLNode& +Note::get_state (void) +{ + XMLNode* node = new XMLNode("Patch"); + node->add_property("Number", _number); + node->add_property("Name", _name); + + return *node; +} + +int +Note::set_state (const XMLNode& node) +{ + assert(node.name() == "Patch"); + _number = node.property("Number")->value(); + _name = node.property("Name")->value(); + + return 0; +} + +XMLNode& PatchBank::get_state (void) { XMLNode* node = new XMLNode("PatchBank"); |