zynaddsubfx

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

commit 9fcef1cf03878d7da1af35ef2595ebb2de9fafbf
parent 6738914755d76aa0a7eec0404565a421c1aafa6b
Author: Johannes Lorenz <johannes89@ist-einmalig.de>
Date:   Sun, 12 Nov 2017 12:38:41 +0100

Correct metadata, fix missing broadcasts

* Fix effect parameters not broadcasting after change
* Fix invalid tooltip for ADsynth button ("ADsynth enable")
* Clarify rLog vs rScale usage
* Add missing rLinear for some effect parameters

Diffstat:
Msrc/Effects/Distorsion.cpp | 3++-
Msrc/Effects/Echo.cpp | 2+-
Msrc/Effects/Effect.h | 15+++++++++------
Msrc/Effects/Phaser.cpp | 2+-
Msrc/Effects/Reverb.cpp | 2+-
Msrc/Misc/Part.cpp | 2+-
6 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/Effects/Distorsion.cpp b/src/Effects/Distorsion.cpp @@ -40,7 +40,8 @@ rtosc::Ports Distorsion::ports = { rEffParVol(rDefault(127), rPresetsAt(2, 64, 64)), rEffParPan(), rEffPar(Plrcross, 2, rShort("l/r"), rDefault(35), "Left/Right Crossover"), - rEffPar(Pdrive, 3, rShort("drive"), rPresets(56, 29, 75, 85, 63, 88), + rEffPar(Pdrive, 3, rShort("drive"), + rLinear(0, 127), rPresets(56, 29, 75, 85, 63, 88), "Input amplification"), rEffPar(Plevel, 4, rShort("output"), rPresets(70, 75, 80, 62, 75, 75), "Output amplification"), diff --git a/src/Effects/Echo.cpp b/src/Effects/Echo.cpp @@ -41,7 +41,7 @@ rtosc::Ports Echo::ports = { rEnd}, rEffParVol(rDefault(67), rPresetsAt(6, 81, 81, 62)), rEffParPan(rPresetsAt(2, 75, 60, 60, 64, 60, 60, 64)), - rEffPar(Pdelay, 2, rShort("delay"), + rEffPar(Pdelay, 2, rShort("delay"), rLinear(0, 127), rPresets(35, 21, 60, 44, 102, 44, 46, 26, 28), "Length of Echo"), rEffPar(Plrdelay, 3, rShort("lr delay"), diff --git a/src/Effects/Effect.h b/src/Effects/Effect.h @@ -1,7 +1,7 @@ /* ZynAddSubFX - a software synthesizer - Effect.h - this class is inherited by the all effects(Reverb, Echo, ..) + Effect.h - this class is inherited by all effects (Reverb, Echo, ...) Copyright (C) 2002-2005 Nasca Octavian Paul Author: Nasca Octavian Paul @@ -19,8 +19,7 @@ #include "../Params/FilterParams.h" #include "../Misc/Stereo.h" -// bug: the effect parameters can currently be set, but such values -// will not be saved into XML files +// effect parameters differing between single effects #ifndef rEffPar #define rEffPar(name, idx, ...) \ {STRINGIFY(name) "::i", rProp(parameter) rDefaultDepends(preset) \ @@ -31,19 +30,24 @@ #define rEffParCb(idx) \ [](const char *msg, rtosc::RtData &d) {\ rObject &obj = *(rObject*)d.obj; \ - if(rtosc_narguments(msg)) \ + if(rtosc_narguments(msg)) { \ obj.changepar(idx, rtosc_argument(msg, 0).i); \ + d.broadcast(d.loc, "i", obj.getpar(idx)); \ + } \ else \ d.reply(d.loc, "i", obj.getpar(idx));} #define rEffParTFCb(idx) \ [](const char *msg, rtosc::RtData &d) {\ rObject &obj = *(rObject*)d.obj; \ - if(rtosc_narguments(msg)) \ + if(rtosc_narguments(msg)) { \ obj.changepar(idx, rtosc_argument(msg, 0).T*127); \ + d.broadcast(d.loc, obj.getpar(idx)?"T":"F"); \ + } \ else \ d.reply(d.loc, obj.getpar(idx)?"T":"F");} #endif +// effect parameters common to all effects #define rEffParCommon(pname, rshort, rdoc, idx, ...) \ {STRINGIFY(pname) "::i", rProp(parameter) rLinear(0,127) \ rShort(rshort) DOC(__VA_ARGS__, rdoc), \ @@ -58,7 +62,6 @@ d.broadcast(d.loc, "i", eff.getpar(idx)); \ } \ }} - #define rEffParVol(...) rEffParCommon(Pvolume, "amt", "amount of effect", 0, \ __VA_ARGS__) #define rEffParPan(...) rEffParCommon(Ppanning, "pan", "panning", 1, \ diff --git a/src/Effects/Phaser.cpp b/src/Effects/Phaser.cpp @@ -69,7 +69,7 @@ rtosc::Ports Phaser::ports = { rEffPar(lfo.Pstereo, 5, rShort("stereo"), rPresetsAt(1, 88, 66, 66, 110, 58), rDefault(64), "Left/right channel phase shift"), - rEffPar(Pdepth, 6, rShort("depth"), + rEffPar(Pdepth, 6, rShort("depth"), rLinear(0, 127), rPresets(110, 40, 68, 67, 67, 37, 64, 70, 60, 45, 25, 70), "LFP depth"), rEffPar(Pfb, 7, rShort("fb"), diff --git a/src/Effects/Reverb.cpp b/src/Effects/Reverb.cpp @@ -42,7 +42,7 @@ rtosc::Ports Reverb::ports = { rEffParVol(rDefault(90), rPresets(80, 80, 80), rPresetsAt(5, 100, 100, 110, 85, 95)), rEffParPan(rPreset(8, 80)), - rEffPar(Ptime, 2, rShort("time"), + rEffPar(Ptime, 2, rShort("time"), rLinear(0, 127), rPresets(63, 69, 69, 51, 53, 33, 21, 14, 84, 26, 40, 93, 111), "Length of Reverb"), rEffPar(Pidelay, 3, rShort("i.time"), diff --git a/src/Misc/Part.cpp b/src/Misc/Part.cpp @@ -185,7 +185,7 @@ static const Ports kitPorts = { rParamZyn(Pminkey, rDefault(0), "Kit item min key"), rParamZyn(Pmaxkey, rDefault(127) "Kit item max key"), rToggle(Padenabled, rDefaultDepends(firstkit), - rPreset(true, true), rPreset(false, false) + rPreset(true, true), rPreset(false, false), "ADsynth enable"), rToggle(Psubenabled, rDefault(false), "SUBsynth enable"), rToggle(Ppadenabled, rDefault(false), "PADsynth enable"),