zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 744fbe014bf1f90e60bbe77be85c223c59b6a138
parent 651c6618255a2f1a7fceeff00d5e7bb849126469
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Wed,  8 Apr 2020 19:12:06 +0200

MW/PADnoteParams: Add comments

Diffstat:
Msrc/Misc/MiddleWare.cpp | 2++
Msrc/Params/PADnoteParameters.cpp | 1+
Msrc/Params/PADnoteParameters.h | 1+
3 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -181,6 +181,7 @@ void deallocate(const char *str, void *v) * PadSynth Setup * *****************************************************************************/ +// This lets MiddleWare compute non-realtime PAD synth data and send it to the backend void preparePadSynth(string path, PADnoteParameters *p, rtosc::RtData &d) { //printf("preparing padsynth parameters\n"); @@ -204,6 +205,7 @@ void preparePadSynth(string path, PADnoteParameters *p, rtosc::RtData &d) //printf("sending info to '%s'\n", // (path+to_s(N)).c_str()); rtdata_mutex.lock(); + // send non-realtime computed data to PADnoteParameters d.chain((path+to_s(N)).c_str(), "ifb", s.size, s.basefreq, sizeof(float*), &s.smp); rtdata_mutex.unlock(); diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -87,6 +87,7 @@ static const rtosc::Ports realtime_ports = {"sample#64:ifb", rProp(internal) rDoc("Nothing to see here"), 0, [](const char *m, rtosc::RtData &d) { + // MiddleWare calls this to send the generated sample buffers to us PADnoteParameters *p = (PADnoteParameters*)d.obj; const char *mm = m; while(!isdigit(*mm))++mm; diff --git a/src/Params/PADnoteParameters.h b/src/Params/PADnoteParameters.h @@ -176,6 +176,7 @@ class PADnoteParameters:public Presets //! RT sample data Sample sample[PAD_MAX_SAMPLES]; + //! callback type for sampleGenerator typedef std::function<void(int,PADnoteParameters::Sample&&)> callback; //! PAD synth main function