Closed aaronventure closed 2 months ago
Seems unrelated to the sampler, as it happens with the waveform generator, too.
HiseSnippet 1125.3oc2W0saaaCElJNLsNsqXcnEc2McwtHEnHvNsqa.6h57maMViiQTVZuKfkhNlHTjBjTI0XXua6QXOB6QXuAaGRZGI03k4XztrMY.Cc9i77yGO7nAZEkYLJMJp4giyYnn6hSFKsi1dDgKQ81AEcO7dDikoiCr1ZbNwXXonnnFuzwHp4xH+yu+hsHBhjxJYgPGo3T1q4YbaI2Ac9AtPzkjxNjmUQ6m0oGUI2VITEf+z.2BkSnmRNg0m3TaILJZkcS4VkNwRrLCnyVpzwIiTmKC5eD2vemf4HZiRfEJvFs8HtHcvzX0fPQ3AkQdiPj+.7d7T9E7Ky.etWPboEUyAQKcUtT6qgKEUwkVN3R2GmP07baoDm+bGbOITPFRfTcUWInKJ5Wvaq.Ej10yHmx5pAhKLXsm2p0Shg+d72OrPRsbkLVI6qrr8kq83U+oUat5OuZ7GJZ3vYJysMZkPvzyTrq5puJCWSVj8Nl9IwmQDErKTDB+54zUlubJMD0UTTI6I418yYSn6pDotbk68KWAPSRava+XucHVhqnLgGnWNSa4N2IZG1Y.pNThZh2gYN0pxAb8kpe.xQkVHH15vI24lIBf7QsZnqPIMb63pmqtFXrVWIFadcw6iGvszQy1GWZF9Hjo9T3iSNY9Y3cGNjQskN3x3tucQOFN+a+CCa+cvugbFy2Vzu4OzSOToyheISxztbW6qnw3uNuMFym6Fi6SsfKbnlHM4JCqc0U9CjsQUY6vrEx5pGXUSKW30EBuJ5c6NSYtQUlCHxZKFPWak1i+9Rxe6E6JIPQHgAQS59FJDrtbWUn9fBgg8FdpcT6pFVxdipreEQmB0EZMfXi5HgkmulG0OSVQ+YzodkafKO93bv9Fr2Ss62ZN0GS3Y4B1txyXBnAq2G+Bni5PRgvNka8yV6ojp7QJIuVU+.lUyO4DVMvzLCnMsVXphRNOnyALAiXpbd6q67ZtjQzPdhsf4hq+c8yrd8k3f6F6ZHD+e26LZ7+56LlU47d3AJw3vHYv95bfG4YEvtwAIwcea6YNC2Wgm07RUFQB+QBJVYnm9L64J8o9.Zx6nnaE777K77iMdW73guuMZSgPc91prb9jRNDAddkApafgfFLnTHkLwlYpBX+hvQKAa5qHlCIbgSsjBCLoV59xDPY+0kQMNhoM9E9V3VqC+.LSe+oRbWBEh+wCHvsx.3yM7GToY50oWTw+qb6pIb2pM8lUbDxmPxxbID+Gbznxfeg5riBPwK41f6h6YNxIkRDnibCw5hCjaM8nRhF9xEXxaGwVJ0oYDe58S73kvkt+6tUwivvk+aD66WDeyzv3.UgkKOYOBbsALhBteQVBfAnSAolo3yIzslhNR.Dpm3OfmIBa6nilHr8Tg+irGYDpVcLMzevAQusmCD2R+GM2D95cfNtM5r.7rLYlAykbLkVeotjgarnF9zE0vmsnF9MKpgOeQM7aWTC+t+dCciMtYgUkENa.yROXWeWinnvXz9iIn+TTBlrQ
No issue here with your snippet... but did you try changing the envelope between mono and polyphonic mode?
You can't reproduce it? What about Windows?
Happens on Windows, too
The envelope is the default one, if I disable the monophonic mode, I just get a mumbo jumbo of all the notes played whenever I press a note.
Ah ok I see what you mean. Yes I get the same issue on Windows and Linux.
Yeah just discovered that this scales with modulator usage as well. This is a pretty serious issue with more complex setups like complex envelope script modulators as the voice processing just goes on indefinitely as the voice object doesn't get killed, resulting in a CPU "leak".
Feature, not a bug. The polyphonic FX has the power to keep a voice alive - that's how you can use it to create synthesisers with scriptnode when you combine it with the silent synth sound generator (I'm using this method in Triaz to have 3 drum layers work with the same sound generator).
The solution to the voice leak is to turn off the HasTail
property of the network - if you do this, the network will not act as possible generator and stop affecting the voice handling.
Now the question is how and where to write the documentation so that power users like you two don't run into this problem again?
Ah that's simple and sensible.
Is there a polyphonic script FX doc section? Probably there.
This whole solution means that the silent killer should be added if has_tail is still on, right? If so, it's not working.
If so, it's not working.
Interesting. At first I thought that's because you haven't added a ScriptVoiceKiller envelope to the gain mod which you need to do when using a script synthesiser, but then I realized that the PolyScriptFX module has that already build in.
The actual reason why it doesn't kill the note is a bit weirder: apparently the signal flow of the Waveform Generator is not as advertised here:
(Source: https://docs.hise.dev/hise-modules/sound-generators/index.html)
but instead the order of the voice rendering is reversed, so it will first calculate the polyphonic effects for each voice and then apply the gain modulation:
For reference here is the sine synth code with the correct order:
Usually this does not cause any issues (which is why it went undetected for all those years) but in this specific case it leads to the silent killer being fed the unmodulated full scale waveform and thus never firing because the envelope will turn it down later in the chain.
So I guess I will have to go through all sound generators and check that the order is as described, then I'll tackle the polyscript FX docs...
Alright, curiously it was about 50/50:
Now it should be consistent. Now the problem is that changing the order might have a drastic impact on the sound - especially when using polyphonic non-linear processing. The most obviuos example I could think of is the poly shaper:
HiseSnippet 1047.3oc2X0saaaCEVJNrKNsMscXE6VcwtHEnXvJoqa.6h5D+SiwpiMhxZ6tpfk53XhHQJPQ4Uigc2dE16SeD1ivdD1av1gR1VhMtdYFqadyWX3yejemeIoGpjLHMUpbbqe9zDvw8VjfoB83ViobgSu1Nt6Q5SS0fxqf0wSSnooPniqasmZX3Veam7O+1SNlFQELnjkiyykbF7LdLWWxcXyugGE0kFBmyiqn8iZ1iIEsjQxLDO0HMbRnrKoW.mRMpsEww8FcB4ZoJPS0Ppi61GKCmFLV98hB8eNOk+5HvP36DfKTA6txnPChMbcZMlGENbtem533RFVFEpUDE9DRedHeA+xnwcyE3UZQ03g6V1vqlE77qBuFUf2RfjaEHscAjtGIfo3I5RIF7bSROAlbFQwvdUnTnqi6aIsjnBB8mGSuD5pPhEFr+iaz3gd3WO3qGkIXZtT3IEmJ0v.w9OX2eX2569i658thFMZoxLaiRFEApkJ1joUqxv8EYwuFTOzaBMJCVnH591wTx6OlVMkyJ75JJJE8Db8fDP79JDblEpve8s8ZS0TShXFOTuDPo4FH31FlfU0Eok5j1P5kZYBVWekbFVsHCyhnZ6RHSeyLAXLvJuYRNhTtdZ09p+1pqttP7djgbMa7xw3VKAiXj5CAFm0MdaRmQi.ltDfaS59xOLsdU296Wr82j7B5DHerX9le+b5QRUr2SAAnLwN+ULX7WttCFSt1CFGvzHDNWQEoIxTvu5J+NxNnpr1fNSXqdAKKsLtWWz87qVDNmYEM2o4PpvZwPZqUpO+Mkj+5S5HnXRH.PuIbPJCcVSryZAxhRgWvC0i8qZXI6Cpx9DpJDyKLqBwZq5LB+07LharwcFw+AF2XcL1cJv3GQN5j1AmMaLS9u85Hl.Q37U6ln9RgLYrTvsRumAZE+hK.UUDuT23HsFu9PqL0DvtdmQmdEtEJeUNOCPnUk8IXcRI8m0Le4Vv3m94lAYoZq1+u6smAQ.M0pgtCShoDXMC69qNrStlkF2lT3jd4ia17NFZu43qHKr4AvaQxS+apwu6PlULtwF.2iLq2XSMDtxaBU6+02DxZ58Ny2+gxnooioI.tsE0XK3308k1SvmMkEe31QoSiMCtYznRlsU7ECgad3gMaZOQ7tMGLAToz3jHt3h0LB6+W9cVKsL3iI4f0ai9V6l6c7lMaH9oD7ZeG3k2S48uSS0YxLMVO0mhki3kSImlEGf2qlAHJEBHx7FS2sLuFrftgg1.g.PDlS763mYB8MztyD5OW3+H6QLkojuhU75YSs7N4bP+Vj+2kTmz2P646j+h5pAyX75ouhwrWpqX3AqqgGttF9n00vuXcM7wqqge45Z3W8man40CGkokwE8F3qnF1I+uiv0s3AT4sIN+gLASiw
Before the decay was applied after the shaping so the sound is a pure fade-out of the highly distorted sine wave. After the change, the shaper is being applied to the dynamic signal which causes the distortion to reduce with the volume.
I think I have to add a preprocessor that keeps the old order so that existing projects with existing presets will not break...
Add a sample to the sampler to test it out, then try bypassing the polyphonic script fx in the modules browser. Keep an eye on the voice count.