From 62506b50f3219995ed279e8852dfa84be5520256 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 15 Apr 2021 22:20:09 +0200 Subject: [PATCH] Add the missing exportMidnam C++ API --- src/sfizz.hpp | 10 ++++++++++ src/sfizz/sfizz.cpp | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/src/sfizz.hpp b/src/sfizz.hpp index 8891dd40..ee21ea38 100644 --- a/src/sfizz.hpp +++ b/src/sfizz.hpp @@ -954,6 +954,16 @@ public: */ const std::vector>& getCCLabels() const noexcept; + /** + * @brief Export a MIDI Name document describing the currently loaded SFZ file. + * @since 0.6.0 + * + * @param model The model name used if a non-empty string, otherwise generated. + * + * @return A XML string. + */ + std::string exportMidnam(const char* model); + /** * @addtogroup Messaging * @{ diff --git a/src/sfizz/sfizz.cpp b/src/sfizz/sfizz.cpp index e67c3adc..370e5201 100644 --- a/src/sfizz/sfizz.cpp +++ b/src/sfizz/sfizz.cpp @@ -356,6 +356,11 @@ void sfz::Sfizz::clearExternalDefinitions() synth->synth.getParser().clearExternalDefinitions(); } +std::string sfz::Sfizz::exportMidnam(const char* model) +{ + return synth->synth.exportMidnam(model); +} + const std::vector>& sfz::Sfizz::getKeyLabels() const noexcept { return synth->synth.getKeyLabels();