From 41dd3e13a92d2b9bacd7fd1a3dc8ddad4d5e57c0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 23 Feb 2016 10:56:10 +0100 Subject: [PATCH] Update zynaddsubfx --- source/native-plugins/zynaddsubfx/Nio/AlsaEngine.cpp | 9 ++++++++- source/native-plugins/zynaddsubfx/Synth/SUBnote.cpp | 7 +++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/source/native-plugins/zynaddsubfx/Nio/AlsaEngine.cpp b/source/native-plugins/zynaddsubfx/Nio/AlsaEngine.cpp index a34357d3c..04f4d8730 100644 --- a/source/native-plugins/zynaddsubfx/Nio/AlsaEngine.cpp +++ b/source/native-plugins/zynaddsubfx/Nio/AlsaEngine.cpp @@ -28,6 +28,7 @@ using namespace std; #include "../Misc/Config.h" #include "InMgr.h" #include "AlsaEngine.h" +#include "Nio.h" AlsaEngine::AlsaEngine(const SYNTH_T &synth) :AudioOut(synth) @@ -212,7 +213,13 @@ bool AlsaEngine::openMidi() if(snd_seq_open(&midi.handle, "default", SND_SEQ_OPEN_INPUT, 0) != 0) return false; - snd_seq_set_client_name(midi.handle, "ZynAddSubFX"); + string clientname = "ZynAddSubFX"; + string postfix = Nio::getPostfix(); + if (!postfix.empty()) + clientname += "_" + postfix; + if(Nio::pidInClientName) + clientname += "_" + os_pid_as_padded_string(); + snd_seq_set_client_name(midi.handle, clientname.c_str()); alsaport = snd_seq_create_simple_port( midi.handle, diff --git a/source/native-plugins/zynaddsubfx/Synth/SUBnote.cpp b/source/native-plugins/zynaddsubfx/Synth/SUBnote.cpp index 38bab5143..2f0a22946 100644 --- a/source/native-plugins/zynaddsubfx/Synth/SUBnote.cpp +++ b/source/native-plugins/zynaddsubfx/Synth/SUBnote.cpp @@ -211,10 +211,6 @@ void SUBnote::setup(float freq, GlobalFilter->updateNoteFreq(basefreq); } - if(GlobalFilter) - GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale, - pars.PGlobalFilterVelocityScaleFunction); - oldamplitude = newamplitude; } @@ -391,6 +387,9 @@ void SUBnote::initparameters(float freq) GlobalFilter = memory.alloc(*pars.GlobalFilter, synth, time, memory, stereo, freq); + GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale, + pars.PGlobalFilterVelocityScaleFunction); + GlobalFilter->addMod(*GlobalFilterEnvelope); } computecurrentparameters();