Triggering Profiles .... Triggering Folders, Groups!
Hi,
I am for example in a scenario where I use let's say only 5 Physical Triggers, let's say via MIDI.
I want to control different macros , I can put all these Macros in a folder, create other 3 macros in different folders (Groups) and be able to turn on (better "solo") the folder where are the Macros I want to trigger, so there is not conflict triggering many macros with the same Trigger MIDI Note, etc (regardless soundflow reads that conflict, but I want to have many macros receiving the same MIDI note from the same controller) yes I could make MIDI presets, but I want all fast and not be thinking in changing preset each time, plus the limited numbers of Midi Notes and Midi Channels...etc
Now I see you can trigger profiles, is that act very fast?? how to do it?
is that the fastest most elegant way to do this?
I think to have something like Groups or Folders you can tun On/Off would be great, especially in the Soundflow Editor to have it all in the same Profile, so you have a better visual representation of what you are building in terms of Macros and you can have folders and tree folders.
Being able to turn on/off (Solo) folders, or Groups will be amazing,
Thanks.
- Kitch Membery @Kitch2022-08-23 09:13:33.086Z
Hi @Reuven_Amiel,
Currently there is now way AFAIK to assign Tiggers to switching the SoundFlow Profiles.
You may be able to achieve the workflow you are after by using a globalState variable to control how the midi trigger scripts respond.
Is there any chance you could make it to the SoundFlow hangout this Wednesday (https://soundflow.org/hangout)? It would be much easier for me to walk you through how to do this in the Zoom session. :-)
- In reply toReuven_Amiel⬆:Kitch Membery @Kitch2022-08-23 09:55:26.638Z
Actually here is a way to demonstrate how to do it...
Say that you wanted to have midi notes react differently when in three different modes.
In its simplest form you would set it up as follows;
- Create three scripts to set the individual modes.
- Name them "Mode 1", "Mode2", "Mode 3".
- Add the following script to the "Mode 1" Script;
globalState.myMidiTriggerMode = "mode1";
- Add the following script to the "Mode 2" Script;
globalState.myMidiTriggerMode = "mode2";
- Add the following script to the "Mode 3" Script;
globalState.myMidiTriggerMode = "mode3";
- Create a new Deck and name it "Mode Switching Deck"
- Add the three Mode commands to a deck;
___
- Create a new script and name it "Middle C".
- Assign a MIDI trigger to the script.
- Add the following code to the script;
function actionOne() { log("You are in Mode 1, run Action 1"); } function actionTwo() { log("You are in Mode 2, run Action 2"); } function actionThree() { log("You are in Mode 3, run Action 3"); } function defaultAction() { log("No valid mode found, run the default action"); } function main() { let currentMode = globalState.myMidiTriggerMode; switch (currentMode) { case "mode1": actionOne() break case "mode2": actionTwo() break case "mode3": actionThree() break default: defaultAction() break } } main();
Global State variables allow you to store variables that can be used in more than one script, so by using the Mode buttons on the deck to switch modes, you can then trigger the "Middle C" script via your midi controller and the script will react differently depending on what mode you are in.
You can then add the code you want to run in the associated action functions.
If no mode is set the
defaultAction
function will run.Let me know if that makes sense. :-)
- In reply toReuven_Amiel⬆:Reuven Amiel @Reuven_Amiel
Thanks for your help Kitch, will check this out!
- OOwen Granich-Young @Owen_Granich_Young
I've built this into a template if you want. Someone else was asking for a similar function. Check out my package called 'Multi-Function Buttons for Dummys' The Mode-Switch Multi Function' command template is the one that will achieve this workflow. Along with the 'Mode Select' Command ID to swap between 8 possible modes.
It's a little time consuming to copy and paste all the ID's but once it's up and running should be smooth.
Bests,
Owen- OOwen Granich-Young @Owen_Granich_Young
PS.... pretty sure @Kitch wrote the code and was involved in the original discussion thread.
- In reply toOwen_Granich_Young⬆:
Reuven Amiel @Reuven_Amiel
Awesome, thank you @Owen_Granich_Young will check that and let you know!!