| @@ -28,6 +28,7 @@ using namespace std; | |||||
| #include "../Misc/Config.h" | #include "../Misc/Config.h" | ||||
| #include "InMgr.h" | #include "InMgr.h" | ||||
| #include "AlsaEngine.h" | #include "AlsaEngine.h" | ||||
| #include "Nio.h" | |||||
| AlsaEngine::AlsaEngine(const SYNTH_T &synth) | AlsaEngine::AlsaEngine(const SYNTH_T &synth) | ||||
| :AudioOut(synth) | :AudioOut(synth) | ||||
| @@ -212,7 +213,13 @@ bool AlsaEngine::openMidi() | |||||
| if(snd_seq_open(&midi.handle, "default", SND_SEQ_OPEN_INPUT, 0) != 0) | if(snd_seq_open(&midi.handle, "default", SND_SEQ_OPEN_INPUT, 0) != 0) | ||||
| return false; | 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( | alsaport = snd_seq_create_simple_port( | ||||
| midi.handle, | midi.handle, | ||||
| @@ -211,10 +211,6 @@ void SUBnote::setup(float freq, | |||||
| GlobalFilter->updateNoteFreq(basefreq); | GlobalFilter->updateNoteFreq(basefreq); | ||||
| } | } | ||||
| if(GlobalFilter) | |||||
| GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale, | |||||
| pars.PGlobalFilterVelocityScaleFunction); | |||||
| oldamplitude = newamplitude; | oldamplitude = newamplitude; | ||||
| } | } | ||||
| @@ -391,6 +387,9 @@ void SUBnote::initparameters(float freq) | |||||
| GlobalFilter = memory.alloc<ModFilter>(*pars.GlobalFilter, synth, time, memory, stereo, freq); | GlobalFilter = memory.alloc<ModFilter>(*pars.GlobalFilter, synth, time, memory, stereo, freq); | ||||
| GlobalFilter->updateSense(velocity, pars.PGlobalFilterVelocityScale, | |||||
| pars.PGlobalFilterVelocityScaleFunction); | |||||
| GlobalFilter->addMod(*GlobalFilterEnvelope); | GlobalFilter->addMod(*GlobalFilterEnvelope); | ||||
| } | } | ||||
| computecurrentparameters(); | computecurrentparameters(); | ||||