From 7cbd920f7b1295bff01553750865d5dc51c69aeb Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Wed, 8 Apr 2020 13:17:14 +0200 Subject: [PATCH] Added note names to the MIDNAM file --- src/sfizz/Synth.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index fd3b5587..b3a43e84 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -885,6 +885,16 @@ std::string sfz::Synth::exportMidnam(absl::string_view model) const } } + { + pugi::xml_node nnl = device.append_child("NoteNameList"); + nnl.append_attribute("Name").set_value("Notes"); + for (const CCNamePair& pair : noteLabels) { + pugi::xml_node nn = nnl.append_child("Note"); + nn.append_attribute("Number").set_value(std::to_string(pair.first).c_str()); + nn.append_attribute("Name").set_value(pair.second.c_str()); + } + } + /// struct string_writer : pugi::xml_writer { std::string result;