From 1adff3b18b973bf28201801505742429025d9980 Mon Sep 17 00:00:00 2001 From: chriskiefer Date: Tue, 4 Nov 2025 11:42:52 +0000 Subject: [PATCH] -ve reward decay --- PAFSynthAudioApp.hpp | 20 ++++++++++++++++++-- src/memllib | 2 +- src/memlp | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/PAFSynthAudioApp.hpp b/PAFSynthAudioApp.hpp index 6ff8c64..bb99c7e 100644 --- a/PAFSynthAudioApp.hpp +++ b/PAFSynthAudioApp.hpp @@ -26,7 +26,7 @@ public: static constexpr size_t kN_Params = NPARAMS; static constexpr size_t nFREQs = 17; static constexpr float frequencies[nFREQs] = {100, 200, 400,800, 400, 800, 100,1600,100,400,100,50,1600,200,100,800,400}; - + static constexpr size_t nVoiceSpaces=5; using VoiceSpaceFn = std::function&)>; struct VoiceSpace { @@ -34,10 +34,24 @@ public: VoiceSpaceFn mappingFunction = nullptr; }; - std::array voiceSpaces; + std::array voiceSpaces; VoiceSpaceFn currentVoiceSpace; + std::array getVoiceSpaceNames() { + std::array names; + for(size_t i=0; i < voiceSpaces.size(); i++) { + names[i] = voiceSpaces[i].name; + } + return names; + } + + void setVoiceSpace(size_t i) { + if (i < voiceSpaces.size()) { + currentVoiceSpace = voiceSpaces[i]; + } + } + PAFSynthAudioApp() : AudioAppBase() { #if 1 auto voiceSpace1 = [this](const std::array& params) { @@ -491,6 +505,8 @@ public: queue_t qMIDINoteOn, qMIDINoteOff; + + protected: maxiPAFOperator paf0; diff --git a/src/memllib b/src/memllib index fdce0a0..7e228dc 160000 --- a/src/memllib +++ b/src/memllib @@ -1 +1 @@ -Subproject commit fdce0a0335a2d29dd3089784450d44318a9ed989 +Subproject commit 7e228dcee5f13ea5c8f1a13e7b0e68827ba77af6 diff --git a/src/memlp b/src/memlp index dad7485..a906e6c 160000 --- a/src/memlp +++ b/src/memlp @@ -1 +1 @@ -Subproject commit dad7485a1c1b690e806ec917f7c75061baa4ad2b +Subproject commit a906e6caf394fa08c6a7442fc0132399c3d28e8b