zynaddsubfx

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

commit fbe0573eb11fbca3b07ac53a3643a6a5a53c8557
parent 268911377d0feaed03ae199c9ba835d07f70407d
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Fri, 21 Apr 2023 22:31:02 +0200

OscilGen/PADnoteParams: Add missing rProp(non-realtime)

Diffstat:
Msrc/Misc/Util.h | 2+-
Msrc/Params/PADnoteParameters.cpp | 7++++++-
Msrc/Synth/OscilGen.cpp | 9+++++++--
3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/Misc/Util.h b/src/Misc/Util.h @@ -164,7 +164,7 @@ char *rtosc_splat(const char *path, std::set<std::string>); * types */ #define rParamZyn(name, ...) \ - {STRINGIFY(name) "::i", rProp(parameter) rMap(min, 0) rMap(max, 127) DOC(__VA_ARGS__), NULL, rParamICb(name)} + {STRINGIFY(name) "::i", rProp(parameter) rDefaultProps rMap(min, 0) rMap(max, 127) DOC(__VA_ARGS__), NULL, rParamICb(name)} #define rPresetType \ {"preset-type:", rProp(internal) rDoc("clipboard type of object"), 0, \ diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -158,6 +158,8 @@ static const rtosc::Ports non_realtime_ports = { rSelf(PADnoteParameters), rPresetType, +#undef rDefaultProps +#define rDefaultProps rProp(non-realtime) {"paste:b", rProp(internal) rDoc("paste port"), 0, [](const char *m, rtosc::RtData &d){ rObject &paste = **(rObject **)rtosc_argument(m,0).b.data; @@ -246,6 +248,8 @@ static const rtosc::Ports non_realtime_ports = "Samples per octave"), rParamI(Pquality.oct, rShort("octaves"), rLinear(0,7), rDefault(3), "Number of octaves to sample (above the first sample"), +#undef rDefaultProps +#define rDefaultProps {"Pbandwidth::i", rShort("bandwidth") rProp(parameter) rProp(non-realtime) rLinear(0,1000) rDefault(500) rDoc("Bandwidth Of Harmonics"), NULL, @@ -258,7 +262,7 @@ static const rtosc::Ports non_realtime_ports = d.reply(d.loc, "i", p->Pbandwidth); }}}, - {"bandwidthvalue:", rMap(unit, cents) rDoc("Get Bandwidth"), NULL, + {"bandwidthvalue:", rProp(non-realtime) rMap(unit, cents) rDoc("Get Bandwidth"), NULL, [](const char *, rtosc::RtData &d) { PADnoteParameters *p = ((PADnoteParameters*)d.obj); d.reply(d.loc, "f", p->setPbandwidth(p->Pbandwidth)); @@ -310,6 +314,7 @@ static const rtosc::Ports non_realtime_ports = {"needPrepare:", rDoc("Unimplemented Stub"), NULL, [](const char *, rtosc::RtData&) {}}, }; +#undef rDefaultProps #undef rChangeCb const rtosc::Ports &PADnoteParameters::non_realtime_ports = zyn::non_realtime_ports; diff --git a/src/Synth/OscilGen.cpp b/src/Synth/OscilGen.cpp @@ -36,6 +36,8 @@ namespace zyn { const rtosc::Ports OscilGen::non_realtime_ports = { rSelf(OscilGen), rPaste, +#undef rDefaultProps +#define rDefaultProps rProp(non-realtime) //TODO ensure min/max rOption(Phmagtype, rShort("scale"), rOptions(linear,dB scale (-40), @@ -97,10 +99,12 @@ const rtosc::Ports OscilGen::non_realtime_ports = { "modulation parameter"), rToggle(ADvsPAD, rShort("If it is used by PADSynth"), "If it is used by PADSynth (and not ADSynth)"), +#undef rDefaultProps +#define rDefaultProps //TODO update to rArray and test - {"phase#128::c:i", rProp(parameter) rLinear(0,127) + {"phase#128::c:i", rProp(parameter) rLinear(0,127) rProp(non-realtime) rDefault([64 ...]) rDoc("Sets harmonic phase"), NULL, [](const char *m, rtosc::RtData &d) { @@ -127,7 +131,7 @@ const rtosc::Ports OscilGen::non_realtime_ports = { } }}, //TODO update to rArray and test - {"magnitude#128::c:i", rProp(parameter) rLinear(0,127) + {"magnitude#128::c:i", rProp(parameter) rLinear(0,127) rProp(non-realtime) rDefault([127 64 64 ...]) rDoc("Sets harmonic magnitude"), NULL, [](const char *m, rtosc::RtData &d) { //printf("I'm at '%s'\n", d.loc); @@ -303,6 +307,7 @@ const rtosc::Ports OscilGen::realtime_ports{ }}, }; +#undef rDefaultProps const rtosc::MergePorts OscilGen::ports{ &OscilGen::realtime_ports,