zynaddsubfx

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

commit b017ba9dbe2a66c5a67da4f87dd9401dd8320e88
parent ee366cc27904b4a8d3b7da6ed844b674a90ed309
Author: piegames <git@piegames.de>
Date:   Thu, 17 Oct 2019 15:19:53 +0200

Add microtonal support

This sounds ugly on instruments with low attack/decay. This can be resolved by implementing aftertouch.
Diffstat:
Msrc/Misc/Master.cpp | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp @@ -477,10 +477,16 @@ static const Ports master_ports = { sysefsendto.dispatch(msg, d); }}, - {"noteOn:iii", rDoc("Noteon Event"), 0, + {"noteOn:iii:iiif", rDoc("Noteon Event"), 0, [](const char *m,RtData &d){ Master *M = (Master*)d.obj; - M->noteOn(rtosc_argument(m,0).i,rtosc_argument(m,1).i,rtosc_argument(m,2).i);}}, + if (rtosc_narguments(m) > 3) + /* Manually specify the frequency as 4th argument */ + M->noteOn(rtosc_argument(m,0).i,rtosc_argument(m,1).i,rtosc_argument(m,2).i,rtosc_argument(m,3).f); + else + /* Standard MIDI noteOn */ + M->noteOn(rtosc_argument(m,0).i,rtosc_argument(m,1).i,rtosc_argument(m,2).i); + }}, {"noteOff:ii", rDoc("Noteoff Event"), 0, [](const char *m,RtData &d){