Simple mono portamento question?
-
Hello everyone,
I am trying to create a (from a user perspective) relatively simple mono portamento which will have a button, combo box, and a slider.
Let me try...The button will turn mono on and off, the slider will change the time for the portamento glide between the initial note that stays on and the notes played after, while the combo box will select one of the three options for the glide:
- Mono legato (it will always glide the initial note to all the notes activated after while holding the initial note - the result will be always gliding by pitching the initial note all over the place)
- Standard mono (it will always re-trigger the next note and glide it to it while holding the initial note - the result will be always pitching to the active note from the previous)
- Crossfade (it will start with both notes active, however the glide from first to second will start with pitching the first note half way, then crossfade it to the second note pitching to its default value).
-
Is this even possible in Hise?
-
How to create it? Only with the script processor, or it must be done with the Pitch Modulation?
-
- yes
- Synth.addPitchFade(int eventId, int fadeTimeMilliseconds, int targetCoarsePitch, int targetFinePitch); and similar Synth note altering calls are your friendw....
-
I added a snippet to the snippet browser with a monophonic glide script.
https://github.com/qdr/HiseSnippetDB/blob/main/Monophonic Glide Script.md
-
@Christoph-Hart Thank you very much Christoph. This works great, there is only one problem, let's say you hold C2 and add G2, then release C2 while still holding the G2, then after you let go the G2 as well it is still on.
-
@alfaholic yup that is fixed in the last HISE commit - there was an issue with artificial note offs invalidating their note on despite being ignored.
-
Thanks, I just compiled the latest Hise, this is now ok.
Still not perfect, for example:
While holding D3 and playing (legato also) G3 and A3 back and forth, it plays the G3 and A3 just for a millisecond, and again returns to D3 no matter you hold the G3 or A3 as well.
-
@alfaholic this is because the voice allocation logic is very naive and just picks the first note in the stack. You can change this easily in the
findNewNote()
function.