Global Midi Learn(not saved in preset) Possible?
-
@johnmike said in Global Midi Learn(not saved in preset) Possible?:
.possible? something Im missing? or is that just the way it is?
You can create a global system yourself using the MIDI automation handler and preset handler. You can save the assigned CCs to a file, which you read back in after the preset has been loaded.
https://docs.hise.audio/scripting/scripting-api/midiautomationhandler/index.html
https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html -
@d-healey if im understanding correctly this would then be for creating a set of pre-defined Midi-CC for various parameters? so Mod-wheel is CC1, slider 1 is CC-5, knob 5 is CC-12, etc? but does this handle user-defined CC mapping? like the user hits assign CC and taps a random button on their midi controller...and that mapping is retained no matter what preset is loaded and or even if the plugin is reloaded later those mappings are retained?
-
-
@johnmike yes, isn't that what you wanted?
-
@d-healey sorry...maybe im not communicating effectively...no I don't want to create pre-defined midi-CCs...I want for it to be a "free" system that a end-user can map any parameter to any button on their controller...but NOT have to save those CCs in a preset in order for recall to happen...Like I have a "play" button on my interface that plays midi files...the end user should be able to map that button to a button on their midi controller and have that retained even when switching presets so that they don't have to re-map that control everytime a preset is switched or the plugin is closed/reopened...defining my own parameters would feel a bit counter-intuitive seeing as how most midi controllers aren't created equal and use various CCs for different things...hopefully that makes more sense...
-
@johnmike yes what I was suggesting is user assignable
-
@d-healey gotcha...my apologies for misreading...Id love to see a minimal example of how this can work/be implemented...
-
HiseSnippet 1261.3oc0V0saaTDEdVmrEroTQQ8AXj4FGoTW6jRAAB0z33TrJIwBmVgDBpFu6YsG7tyrZlYiy1nbGOObOWAuJ7Fva.blcWauNwooxhdA6EVdN+Memyb9quR5AZsTQbpdZZLPbtq6fTgYbmwLtfz6.hy8bOhoMfhlSZ+zXlVC9DGmMdtkfS0MIYe+8S2mExDdvBRDxqjbO363QbyBp826E7vvCY9vo7nRR+3854IEcjgxDDOa31hDy7lvFAGyrhUwk3bmt9biTMvvLfl3r49R+zAikSE4x+JtlOLDrGZSFfFJm7gxPeKhsTIcFyC86Oyu0DzJ8WDE1HOJ7.2i3974zWDM9jLFzEZTNd3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J1UzJXXAb4UDrcHDnijVFT+msBy6JDuuaetwa7pwXkUfQaky6ALVr32G61MH.mvs.fa5d3O79YKOx2KSL3.5iX3SuMi93jnA3tud.d6BADZaE4TwVrmetk8rMBL.D9YG9G7qfYa6YmBlsmwDS5vQOu1Kuagc0xOLiBhIQ1V0UcyFNQWQOFLYm+ZOukM00Tbm0UwcWWEe75p3mutJ9j0UwuXcU7KucEWdybTfi52MqstiSWACy.yxVI+K8uE4BA
- updated with a slightly more obvious and useful example...
One thing the documentation does not make clear is that calls to setAutomationDatafromObject() expects an array of JSON objects one for each widget that you want to see assigned.
-
@Lindon maybe im missing it... this is the same basic behavior...as soon as I click a new preset it kills whatever user mapping I have assigned unless I save it in preset...maybe im missing something either in my communication or in my understanding...Im sure it's my understanding...maybe explain a bit deeper
here's a video showing...plus it crashes HISE whenever I assign the button
https://www.dropbox.com/scl/fi/hfifi0npxlhzmdezxuhq9/knob-assign-on-2024-10-29-at-12.00.12.mov?rlkey=98jilrqsfs0kcsnh7wdp8vsin&dl=0 -
@johnmike the snippet shows you how to get and set the CC values for any control in your interface, once you have this data you will need to save it into a file as David suggests.
You will then need to set up a UserPresetHandler and add a setPostcallback function that will execute when the preset has finished loading, at this point you should read your saved file and apply it, thus setting the CC values back to your preferred(saved) state.
-
@Lindon ok thanks...starting to make sense now...I'll mess around with this a bit and see what I can do with it!