Can I group decks in a package to function as 1 when triggering by application active?
Hi, first off, thank you @chrscheuer for the help in creating the Reaper script. I wanted to share with you that from that one script I have been building a pretty extensive controller for Reaper. Here are a few pics from my iPad. It's working great.
As you can see in the images, the different "pages" are different sizes, and are different decks with navigation at the bottom of each one to get back to most any other window.
One issue that i'm running into is that any time i click out of Reaper, which is about 200 times a day, the deck reverts to the main page because it is set to trigger by application active.
I just tried making all the pages like that and it does't work.
It'd be awesome if there were a way to associate decks so that they act as 1 when being triggered. There may be, but I'm just not aware of it.
Right now my Reaper package has 10 decks but will probably grow as some of those decks are embedded within others like sub-folders.
I love the workflow though.
I think the time i'm saving not even having to think about keyboard shortcuts for a lot of things will make up for the time spent creating the decks.
Thanks!





Oh, and if you're looking closely at my FX deck you may be wondering why there are mirror images of the same buttons. The left side adds FX to Tracks, while the Right side adds effects to Items and the the bottom are FX busses that insert routable tracks.
- Christian Scheuer @chrscheuer2025-03-28 08:31:53.930Z
Wow, this looks very impressive!
Let me CC @Kitch who might be able to help you with the "act as 1 deck". We have something similar in the official Pro Tools package, where we provide a default macro that navigates to "any of the decks in a collection of decks" when Pro Tools is focused. This ensures it doesn't jump back to the main deck in your Reaper package if a "sub deck" is the current one.
- In reply toRyan_Franks⬆:Kitch Membery @Kitch2025-03-28 17:30:25.649Z
Hi @Ryan_Franks
That's an impressive set of decks you have created. Great work!
Am I correct in assuming the first deck is the Master deck and the remaining decks are Reaper Layout 1-4?
It might be beneficial for me to create a video walkthrough to illustrate how to set this up, as it requires a bit of setup. I will do my best to do so today. :-)
- RRyan Franks @Ryan_Franks
thank you @Kitch and @chrscheuer!
I didn't think about the order when posting. Yes, the 1st image is of my current Reaper home page. I that image, the top row are other main folders. 1 is Visibility which connects to the 5th/last image (but you can see i've started putting those same commands on my main page as i might not need that one). Row 1 column 2. is FX (image 2). Row 1 columns 3 and 4 are not shown here.
Row 3 are instrument group visibility decks. Row 3 Column 2 "ORCH" is shown in image 4 and Row 3 column 5 "synths" is shown in image 3. I'm still refining the layout as i start working with this and notice what i need quick access to.
Please let me know if you need/want any additional info on the structure. And thank you for taking a look at it. That'd be great to be able to maintain the current deck when changing programs, as that is often just grabbing a file or something quick like that.Kitch Membery @Kitch2025-03-28 18:13:21.356Z
Thanks @Ryan_Franks,
That's all the information I need. :-)
- In reply toRyan_Franks⬆:
Kitch Membery @Kitch2025-03-29 08:58:31.102Z
Hi @Ryan_Franks,
I've started the work on this and will get back to you early next week with a solution. :-)
There will be two parts.
- A script to ensure that the Master deck is only relaunched if none of the other decks in the local package are currently being displayed.
- A more advanced way (as Christian mentioned) of navigating back to a master deck from multiple sub-decks.
- RRyan Franks @Ryan_Franks
Thank you @Kitch ! That will be really helpful and much appreciated. Very curious to hear about the master deck navigation. As you can see in my decks, the bottom rows are dedicated to navigating to most any of the other decks, including the master deck which is always the bottom right corner. That kind of quick, direct access to other pages is proving crucial to workflow as i get into using this.
Thanks a ton. i'll look forward to your next message.
- JIn reply toRyan_Franks⬆:Jonathan Johnson @Jonathan_Johnson
Is this scratch public? Trying to find it….
- RRyan Franks @Ryan_Franks
Hi @Jonathan_Johnson I wasn't sure if you were referring to the decks or the scripts that they're working on. However, if you're asking about the decks, they are not public. That's something that I'm currently in the process of building. are you a reaper user? If so, @chrscheuer made a reaper script to trigger actions simply based on the action names which makes it extremely simple to program.
- JJonathan Johnson @Jonathan_Johnson
Mainly approachable is user, very new to reaper in which case having a deck would be Very helpful. Hoping you make it public in the future thanks so much for responding.
You mentioned chrscheuer reaper deck where do I find that?
Christian Scheuer @chrscheuer2025-03-31 10:32:54.644Z
You can see it in this thread - the link is directly to the post in that thread with the solution that worked for Ryan:
- RRyan Franks @Ryan_Franks
Thank you @chrscheuer i missed this message until just now. @Jonathan_Johnson the great thing about this script and Reaper is that since Reaper does pretty much anything and everything via the actions list, you can simply select or create any action, cycle action or script and then just copy the name of it from the action list and paste it between the ' ' marks in the script and you're done. really handy!
- In reply toRyan_Franks⬆:Kitch Membery @Kitch2025-03-31 20:58:21.748Z2025-04-29 00:18:45.344Z
Hi @Ryan_Franks
Let's start by adding a script to ensure that your Master deck is only relaunched if none of the other decks in the local package are currently being displayed.
To do this, follow these steps
- Create a new package that contains all your Reaper Decks and Commands. (Note: Only the Master Deck and associated Sub-Decks deck should reside in this package.)
- Remove any triggers from your Master Deck that are being used to show the deck.
- Create a new script named "Show Reaper Master Deck" in the SoundFlow Reaper package and add the following code.
const targetDeviceName = "Add Name of iPad Here"; const masterDeckId = "Add Master Deck Command ID Here"; /** @type {AxDeckOrPreset} **/ const targetDeck = sf.decks.get(masterDeckId).deck; /** @type {AxDeckHostDevice} **/ const targetDevice = sf.devices.mobile.allDevices.find(d => d.name === targetDeviceName); // Find the target device by name const associatedPackageKey = event.trigger.commandId.split(":")[1]; // Local package ID try { // Exit early if no target device is found if (!targetDevice) throw 0; let doOpen = true; // Handle single-instance devices if (targetDevice.instanceManagement === 'SingleInstance') { const lastEntry = targetDevice.history[0]; const lastLoadedDeck = lastEntry && lastEntry.deck; if (lastLoadedDeck) { const packageKey = lastLoadedDeck.deckId.split(':')[1]; // If the last loaded deck is from the same package, skip opening if (packageKey === associatedPackageKey) { doOpen = false; } } } if (doOpen) { targetDeck.open({ device: targetDevice }); } } catch (err) { // Fail silently }
- Update the
targetDeviceName
at the top of the script. If you don't know your device name, you can use the following script to list all attached device names.
const attachedDeviceNames = sf.devices.mobile.allDevices.map(device => device.name); log(attachedDeviceNames);
- Update the
masterDeckId
const at the top of the script. To do this, select your Master deck in the package then click "Command"=>"Copy Command ID" from the SoundFlow menu. This will copy the full command ID to the clipboard, you can then paste it into the script. - Next, add an application trigger to the "Show Reaper Master Deck" script.
- For any buttons on the master deck that open sub-decks, have them set to "Open on Same Device". To do this, select each of these buttons on the Master Deck and then click the "Open on Same Device" in the footer of the deck designer.
Now, when you navigate away from Reaper and back, it will only load the Master Deck if none of the decks that reside in the folder are currently being displayed on devices.
Let me know if you get stuck with this or have any questions... I'd be happy to walk you through it over a quick Zoom call. :-)
I'll do my best to get the deck navigation tutorial done in the next couple of days.
Rock on!
- RRyan Franks @Ryan_Franks
hi @Kitch thank you so much for this, it looks awesome! i'm really excited to try it, however, could you first help me through a little panic moment? I created a new package called Reaper Deck Package and moved my decks but i seem to have broken them in the process. i thought once they were all moved they would re-link but now i'm missing a lot of buttons and hitting 'back' doesn't seem to undo what i did. can i get my decks back by moving them back to their prior location? that was dumb of me, but i don't want to do anything else to make sure i don't mess this up. Which brings up another thought. is there a way to make local backups of one's decks? Thanks! Hi @chrscheuer I wanted to add you too just in case.
- RRyan Franks @Ryan_Franks
hi @Kitch i just rebuilt my broken connections in the decks. Not too bad, but a little tedious since each page is setup to navigate to any other page. But i have recovered from my mistake!
However, this time i tried copying my decks to the new package and the result is the same. It seems like anything that leaves my Reaper Commands package loses any connections to other pages for that deck. Would you let me know what i'm doing wrong and how to create the new package with working copies of my decks? Thanks! - In reply toRyan_Franks⬆:
Kitch Membery @Kitch2025-04-02 23:20:14.565Z
Hi @Ryan_Franks
Sorry for the delay in getting back to you... Are you able to jump on a quick Zoom call?
If so, please send an email to support@soundflow.org, and I'll send you a Zoom link.
- In reply toRyan_Franks⬆:
Kitch Membery @Kitch2025-04-02 23:26:57.663Z
Hi @Ryan_Franks
If you don't have time for a Zoom call, we take backups of your entire account every 24 hours. You can restore your account to a backup from here:
https://soundflow.org/account/backups
Please note: If you restore a backup, it'll restore your entire account to the state it was in when the backup was taken.
- RRyan Franks @Ryan_Franks
Thanks a lot, Kitch. I don't think i need to backup on this one, but I didn't realize there were accessible backups. great to know. I emailed you at support@soundflow.org in case it went to junk though I spelled your name wrong 🤪 I'll look forward to speaking when you're available.
- In reply toKitch⬆:RRyan Franks @Ryan_Franks
Hi @Kitch Sorry for the extreme lag. I had a series of quick turnaround projects and haven't gotten to spend much time with creating this new setup. I am working on it now though.
I Created a new Package that contains only Decks for Reaper. The one and only non-deck file is the script you created. Should that script be housed within this Reaper Package?
I pasted into the const targetDeviceName the name of my ipad "<Phfraiengngchkxzcs's iPad>" and then the masterDeckID. Within the new package, i selected the master/top-most deck and chose Copy command ID and pasted it.
upon running the script I get this error and was hoping you could tell me what i need to do:24.04.2025 08:14:25.93 [Backend]: !! Command Error: Show Reaper Master Deck [user:cm8zvnvzl00007i10mx9te8fy:cm9vbduf6000027106ut6xh39]:
Wrong command path: user:cm8zvnvzl00007i10mx9te8fy:cm9h39rjg0000b710pav7cofg (Show Reaper Master Deck: Line 5)
- In reply toKitch⬆:RRyan Franks @Ryan_Franks
Hi @Kitch I wanted to follow up on this again. I just took another stab at it and i can't figure out what i'm missing. it seems simple enough, but i'm still getting the error of wrong command path. Please let me know if you would be available to jump on a quick call or message with me Monday or Tuesday about this. i'm leaving town on Wednesday for a week and would love to try to get this working before i leave if possible. thanks!
Kitch Membery @Kitch2025-04-28 18:52:30.122Z
Hi @Ryan_Franks
If you're free this afternoon, let me know and we can organize a quick Zoom to get it sorted. :-)
- RRyan Franks @Ryan_Franks
Hi @Kitch, thanks! yes, i'm available you still are.
Kitch Membery @Kitch2025-04-29 00:02:25.148Z
Hi @Ryan_Franks
I just sent you a Zoom link via Email. :-)
- RRyan Franks @Ryan_Franks
great! be on in a sec
Kitch Membery @Kitch2025-04-29 00:20:39.710Z
Hi @Ryan_Franks
I've updated the script with the "<>" characters removed, for anyone else trying it out. :-)
- RRyan Franks @Ryan_Franks
@Kitch Yeah that worked great. One other thing, and you can correct me if i'm wrong, but I think the reaper master deck/package needs to be located outside of the default package. After we spoke, i tried switching the script to work with my old deck and package and never could make it happen, but switching to the new package that I created outside of the default folder works great as far as triggering the script to load my reaper master deck.
i may need a little more guidance on how to make sure that when the master deck is relaunched, it goes back to the same page. I know that is what the script is for, but for some reason mine is going back to the master deck page.
I checked that all sub decks are set to "open on same device", and. just to be safe, moved them to a separate folder so that the only things in the main folder are the master deck and the script. thought that's probably not the issue.Kitch Membery @Kitch2025-04-29 23:01:30.953Z
Hi @Ryan_Franks
Ah yes, as I originally suggested. The optimum way to set this up is to have a standalone "Reaper" package that houses all your Reaper SoundFlow commands, command templates, decks, and surfaces. The script to launch the master deck should be in this package also. There should be no Decks in the Reaper package that are not Reaper decks. (From the looks of the screenshot, it looks like you've set it up that way. Which is great)
The expected behavior for the script we worked on is as follows.
- Reaper is activated
- The Master deck is shown on your device.
- Manually select a Reaper sub-deck.
- Navigate away from Reaper, to an app that does not have an application trigger showing another deck.
- Navigate back to Reaper - Your sub deck will persist (Instead of relaunching the Master deck)
- Navigate to an app that opens a deck from another package.
- Navigate back to Reaper - The Master deck will be shown.
The script, unfortunately, does not keep in memory which Reaper deck was last opened. I'll have to put on my thinking cap to work out a way that restoring the last opened deck from the package might be possible.
- RRyan Franks @Ryan_Franks
Hi @Kitch ! Thanks for your response. i just got back in town and am catching up. Ah, I see what you're saying now. So this does solve one of the issues i was having, for example, when i would click over to Splice to grab a sample, and then come back to Reaper,. That's great. I hadn't thought about the fact that there would be a difference when it comes to other apps that trigger different decks. That would be super helpful if you figure it out, because in addition to using a sample library or something, I often jump between things like notation software and come back. In an ideal world, having a script, in my case, for Reaper and a script for Dorico that keep those apps' decks focused on the correct subdecks when jumping between would be great. My setup is currently triggering a "finder" deck anytime i click the desktop which is what was throwing me. That's probably not so essential and i can remove the trigger from that deck for now. Please let me know if you determine a way for that to work though, because SF is so function for me that I would like to use it across all the main apps that i use and the auto-switching element is a definite time saver. take care!
Kitch Membery @Kitch2025-05-10 01:30:35.081Z
Hi @Ryan_Franks
I'll keep you posted if I find a solution for this.
- RRyan Franks @Ryan_Franks
Thanks @Kitch
also, random question so I can start another thread, but didn't see anything about it. There wouldn't be chance be a way to batch update macros in a folder to deal with program updates, would there? Kind of annoyingly, Steinberg just released Dorico 6, and instead of just calling it Dorico, the app that used to be Dorico 5 is now called Dorico 6. So i just manually updated a bunch of macros. I had a similar issue with some commands in Reaper with a coder changed all of the scripts from Track_Inspector_2 to TI2, and all those had to be updated manually too. Thanks!Kitch Membery @Kitch2025-05-12 23:29:32.341Z
Hi @Ryan_Franks,
Unfortunately, when an app is renamed, unless we have an inbuilt API for the app, any macros will need to have their app properties reselected.
If many of your macros are using similar macro actions and only the property values are changing, you may want to convert them into a command template, so you'd have one script with multiple presets. That way, you'd only have to change the app reference in one place.
You can learn how to create command templates here.
https://soundflow.org/docs/how-to/custom-commands/command-templates- RRyan Franks @Ryan_Franks
Hi @Kitch helpful as always! thank you. i think this will work (hope) and it could potentially help speed up the process of making some of these repeated scripts that i use, but need a little help. for example, I'm using the Reaper action script that you all made for me:
var commandName = `Script: HeDa_TI_Tags Mute Winds.lua`; var cmd = sf.app.reaper.getAllCommands().commands.find(c => c.name === commandName); if (!cmd) throw `Command "${commandName}" was not found`; var cmdId = cmd.commandId; sf.app.reaper.runCommand({ commandId: cmdId, });
In this case
Script: HeDa_TI_Tags Mute Winds.lua
; the basic script i'm running in Reaper is HeDa_TI_Tags but then there is additional text as part of that action name which would be specified per preset. in this example, i'm running a command to select my woodwind midi/audio and mute it. That might be changed to HeDa_TI_Tags Bypass StgMidi A or HeDa_TI_Tags TCP Brass etc... Is there a way to use the template to create variations where what i'm adding is text to the primary action that is being activated?
Script: HeDa_TI_Tags Mute Winds.lua
;Kitch Membery @Kitch2025-05-15 20:32:13.653Z
Hi @Ryan_Franks
This can certainly be done.
In non-templated script form, the script would look like this...
const reaperScriptName = `HeDa_TI_Tags`; const action = `Mute`; const instrumentGroup = `Winds`; const commandName = `Script: ${reaperScriptName} ${action} ${instrumentGroup}.lua`; const cmd = sf.app.reaper.getAllCommands().commands.find(c => c.name === commandName); if (!cmd) throw `Command "${commandName}" was not found`; const commandId = cmd.commandId; sf.app.reaper.runCommand({ commandId });
You can then convert the
action
andinstrumentGroup
constants into command template properties, with the two Property Types set tostring
.const { action, instrumentGroup } = event.props; const reaperScriptName = `HeDa_TI_Tags`; const commandName = `Script: ${reaperScriptName} ${action} ${instrumentGroup}.lua`; const cmd = sf.app.reaper.getAllCommands().commands.find(c => c.name === commandName); if (!cmd) throw `Command "${commandName}" was not found`; const commandId = cmd.commandId; sf.app.reaper.runCommand({ commandId });
The "Templates" tab should look like this...
And you could then make presets like this, for example.
I hope that helps. Let me know if you need any further guidance on this. :-)
- RRyan Franks @Ryan_Franks
Awesome! I am going to try this out. Thank you very much, @Kitch
- In reply toKitch⬆:RRyan Franks @Ryan_Franks
hi @Kitch
Could you explain a bit about how to adapt this to different groups. do i need different templates or just different presets?
for example, i made a new preset to control visibility for Keys. the base command is the same: Script: Heda_TI_Tags but then instead of Mute Winds, it's TCP Key. so i tried just duplicating the preset you made for Mute Winds (which works). the new one just says Action: TCP, Instrument Group Key. However, when i trigger it, it just mutes the winds again. so i'm missing something for sure. Thanks!Kitch Membery @Kitch2025-05-21 21:21:42.252Z
Hi @Ryan_Franks
Sure... To help me illustrate how to do this, can you provide the two scripts that you have working?
Thanks in advance.
- RRyan Franks @Ryan_Franks
sure. but sorry. which two scripts do you mean? the scripts i'm running in reaper or the scripts for the presets in SF? if you're referring to SF. I only have 1 script, which may be the problem. I was thinking i could just change out the action and instrument group in the preset. There are about 4-8 actions and 12-15 instrument groups that i'll set this up for. happy to provide anything you want.
Kitch Membery @Kitch2025-05-22 00:32:50.648Z
Hi @Ryan_Franks
Sorry for the confusion. :-)
For this original script that you were using, can you give me two or three examples of what you would enter as the
commandName
eg
Script: HeDa_TI_Tags Mute Winds.lua
var commandName = `Script: HeDa_TI_Tags Mute Winds.lua`; var cmd = sf.app.reaper.getAllCommands().commands.find(c => c.name === commandName); if (!cmd) throw `Command "${commandName}" was not found`; var cmdId = cmd.commandId; sf.app.reaper.runCommand({ commandId: cmdId, });
Once I have those, I'll have a better understanding of how the newer version should be tailored.
- RRyan Franks @Ryan_Franks
ahhh, yes. These give a decent idea.
These show Online, Select, Solo and (toggle) TCP (visibility). There's also Offline, Archive, Scroll, Mute etc.
and a lot of instrument groups like Stg1, Stg2, Stg3, StgSolo, Prc1, Prc2, Prc3, Drum, SynSoft, SynHard etc.Script: HeDa_TI_Tags Online Key.lua
Script: HeDa_TI_Tags Select OrchAll.lua
Script: HeDa_TI_Tags Solo Misc2.lua
Script: HeDa_TI_Tags TCP Ptch.luaKitch Membery @Kitch2025-05-23 17:35:36.961Z
Hi @Ryan_Franks
Thanks for your patience with this...
Think of Command Template as one script that can have multiple presets, each preset has the same editable properties that can be assigned different values.
Here is how you'd set up a command template to run various reaper scripts
Create a new script and add the following code.
const { reaperScriptName, action, instrumentGroup } = event.props; // Construct the full script label used to identify the REAPER command const scriptLabel = `Script: ${reaperScriptName} ${action} ${instrumentGroup}.lua`; // Look up the command object by matching its label const command = sf.app.reaper.getAllCommands().commands.find(c => c.name === scriptLabel); // Stop execution if no matching command was found if (!command) throw `REAPER command not found: "${scriptLabel}"`; const commandId = command.commandId; // Execute the found command by its ID sf.app.reaper.runCommand({ commandId });
Next, convert the script into a Command Template by clicking the "Convert to Template" button in the header of the code editor.
Select the "Template" tab and add the following properties. Each with their type set to "String"
Once that's done, you can create presets for each ".lua" script
Here are examples of the first two from the list you provided.
I've not tested the script, as I've not got Reaper installed, but let me know if you get stuck.
For more information about Command Templates, please see the following link.
https://soundflow.org/docs/how-to/custom-commands/command-templatesI hope that helps!
- RRyan Franks @Ryan_Franks
Awesome! @Kitch. i just tried that out on a very basic level, but it seems to work. Thank you very much. I will start working with it more in depth and let you know if I run into anything. This is really cool.
- In reply toRyan_Franks⬆:RRyan Franks @Ryan_Franks
hi @Kitch i also wanted to add a possible alternate version. the root of this group of scripts is really HeDa_TI_
"tags" is just a part of it. If is there a way to have 3 variables. So, the scripts above which are Script: HeDa_TI_ with "Tags" "Action" "Instrument Group" as well as other scripts like
Script: HeDa_TI_Toggle Enlarge Track.lua
Script: HeDa_TI_Toggle Envelopes Track.lua
Script: HeDa_TI_Render To New Version (selected area stereo stems).luaKitch Membery @Kitch2025-05-27 17:15:04.836Z
Hi @Ryan_Franks
Before we move on to the alternate version, were you able to get the script in the above thread working?
- RRyan Franks @Ryan_Franks
Hi @Kitch ! I hadn't seen your latest post when i responded to your last. But yes, it's working great. i setup 6 basic commands and it's all working smoothly so far. Thanks!
Kitch Membery @Kitch2025-05-27 18:55:52.481Z
Great to hear! :-)
- In reply toKitch⬆:RRyan Franks @Ryan_Franks
Hi @Kitch I just had a thought about this and was wondering if there might be a way to make it work with manual triggers. Instead of setting the show master deck script to trigger automatically when switching to the app, could it be possible to just have buttons with a combined action: switch to Reaper and then "show reaper [master] deck" that would allow you to jump back to the same deck you were on? Wondering if there's any way to store the last active subdeck within a package so that when navigating back manually, you could land on the last active page.
- RRyan Franks @Ryan_Franks
hi @ Kitch just wanted to follow up on this.
Kitch Membery @Kitch2025-06-06 22:17:33.278Z
Hi @Ryan_Franks
Sorry for the delay, it's on my list of things to investigate further. I'll see if I can figure something out early next week.
- RRyan Franks @Ryan_Franks
Thank you!