-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global keytrack modulators (lowest/highest/latest note) #2352
Comments
So there's two parts to this Part one is adding that menu and the property. Really easy Part two is swapping something from a voice modulator to a scene modulator. That is something we don't do anywhere else. The data structures for the modulation are separate and the place in which they are evaluated is separate. In a way you want this to be a 'different modulator' and that modulator is a scene modulator, which is some pretty substantial surgery which is why i've left this here. but if you follow the way release velocity works, generalize it to more than 'one alternate', have that alternate set of modulators be scene not voice modulators in the Modulator info, it will all work. That's the plan of attack, basically. Don't make keytrack have 4 modes, but have 4 separate modulators ("vkeytrack, skeytrack low, skeytrackhigh, and skeytracklatest") then treat that menu as a modulator swapper and build those modulators properly. Also you would have to do the work of updating those modulators on keypress and also handle release events. Probably best to just scan the voices when you get a noteon or off but remember to do that in a scene aware way. basically if voice->gate == true are the voices you want. Also you would need to decide what value the modulator keeps when all notes are off. So a bit of a tricky one but those are the hints. Lemme know if you need more to start. |
OK so the implementation of the modulators in your branch is correct but the implementation of the alternate state causes all sorts of problems. The reason it causes problems is because SurgeGUIEditor has a member 'mod source' which is used both to indicate the current modulator and also to index into the gui_modsources array so it has to be only for mod sources with buttons. If you naively set mod source to ms_keytracklow then you get a core dump looking at the GUI object; if you leave it set as keytrack you get scene/voice confusion. So what we need to do is move the 'has an alternate' out of the CModulationSourceButton object (which is transient) and put it as a permanent feature of SurgeGUIEditor (which is long lived). Then go and fix up things. Here's what I would do
|
Note to self:
|
This is now implemented without modulator alternates, by PR #2674. |
Keyboard tracking is a per-voice thing, however it could very well be extrapolated into a global modulator by offering variations that only track lowest, highest or latest note played from the keyboard. This way, key position (at least in this rudimentary manner) can be used to modulate effects parameters.
The way it could be implemented is similar to release velocity - through a RMB context menu on the mod tab for keytrack.
The text was updated successfully, but these errors were encountered: