Batch Programming Buttons
3 posters
Page 1 of 1
Batch Programming Buttons
Is there any way of batch programming buttons? I am building a large, flexible video player for Isadora with 4 possible tracks each on their own profile. Each track has a possible 9 pages of 32 buttons. I have used the following scheme for programming midi in my host application:
Track 1/CH1/Page 2, CC#1-32; Page 3, CC#33-64; Page 4 CC#65-96; CH2/Page 5, CC#1-32 [...]
Track 2/CH4 etc.
It's a lot of buttons (576) to program by hand. I am considering scripting the buttons and iterating the scripts in an excel spreadsheet so it will fill in the Channel and CC#s for me. I will then either copy/paste the script into each button, or save them out as individual files and populate the pulldown with the scripts one page at a time and use the pulldown.
They're all toggles that will need to respond to incoming midi, too. In addition, each button will hopefull init to a unique custom icon (a thumbnail from the video with a set naming scheme).
If there was a way of programming buttons with a batch script or programmatically it would save me grinding this out.
Track 1/CH1/Page 2, CC#1-32; Page 3, CC#33-64; Page 4 CC#65-96; CH2/Page 5, CC#1-32 [...]
Track 2/CH4 etc.
It's a lot of buttons (576) to program by hand. I am considering scripting the buttons and iterating the scripts in an excel spreadsheet so it will fill in the Channel and CC#s for me. I will then either copy/paste the script into each button, or save them out as individual files and populate the pulldown with the scripts one page at a time and use the pulldown.
They're all toggles that will need to respond to incoming midi, too. In addition, each button will hopefull init to a unique custom icon (a thumbnail from the video with a set naming scheme).
If there was a way of programming buttons with a batch script or programmatically it would save me grinding this out.
jtints- Posts : 37
Join date : 2024-01-22
Re: Batch Programming Buttons
You can Create an XML file and save it under PredefinedScripts folder and save it in the Trevliga Spel folder in your documents.
Sample script would be like this
Then you can pull it for each Script buttons out in the Pre defined scripts in the button editor.
Sample script would be like this
- Code:
<?xml version="1.0" encoding="utf-8" ?>
<Scripts>
<Category name="CC Assignments">
<Script name="CC5,_1">[(press){cc:5,1,127}]</Script>
<Script name="CC5,_2">[(press){cc:5,2,127}]</Script>
<Script name="CC5,_3">[(press){cc:5,3,127}]</Script>
<Script name="CC5,_4">[(press){cc:5,4,127}]</Script>
<Script name="CC5,_5">[(press){cc:5,5,127}]</Script>
<Script name="CC5,_6">[(press){cc:5,6,127}]</Script>
<Script name="CC5,_7">[(press){cc:5,7,127}]</Script>
<Script name="CC5,_8">[(press){cc:5,8,127}]</Script>
<Script name="CC5,_9">[(press){cc:5,9,127}]</Script>
</Category>
</Scripts>
Then you can pull it for each Script buttons out in the Pre defined scripts in the button editor.
arbibarbarona- Posts : 99
Join date : 2021-05-16
jtints likes this post
Re: Batch Programming Buttons
I know of no tools that enable batch creation of Stream Deck buttons. It is, in theory, possible to duplicate an existing page folder and use a text editor to change all involved json files. I'm pretty familiar with the structure of the json files for profiles, but I would hesitate to do such a thing; there are too many things that can go wrong, and there’s an obvious risk you spend more time troubleshooting than it would have taken creating the pages the official way.
BarRaider has created a tool with which you can copy columns from one profile to another, but I don’t know if that helps.
BarRaider has created a tool with which you can copy columns from one profile to another, but I don’t know if that helps.
jtints likes this post
Re: Batch Programming Buttons
Both of these tips will cut down on the work. Thank-you..
jtints- Posts : 37
Join date : 2024-01-22
Re: Batch Programming Buttons
Amazing. With the help of ChatCGT, I will be able to create the buttons in 32 button groups having the Chat do the work of acending numbers with the patterns required for each page. I just did a small test and it worked perfectly. Thanks for your help.
This is the sctipt I am using for the video player toggles. They call an image for the thumbnail, and display "ON" when toggled on. The filenames, midi channel, and CC# are a patterns than can be calculated from the profile (which I am using for 4 different video tracks), page and button#.
Is there any way to adjust the text size or colour?
This is the sctipt I am using for the video player toggles. They call an image for the thumbnail, and display "ON" when toggled on. The filenames, midi channel, and CC# are a patterns than can be calculated from the profile (which I am using for 4 different video tracks), page and button#.
- Code:
[(init){image:%thumbs%\tn\T01_P02_B01_C01.jpg}]
[ (press) {cc:1,3,127} ]
[ (release) {text:ON} ]
[ (press) {cc:1,3,0} ]
[ (release) {text:#none#} ]
[ (cc:1,3,0) {text:#none#} {nextpress:1}]
[ (cc:1,3,127) {text:ON} {nextpress:2}]
Is there any way to adjust the text size or colour?
jtints- Posts : 37
Join date : 2024-01-22
Re: Batch Programming Buttons
jtints wrote:Is there any way to adjust the text size or colour?
You can't control size or color from the script, but you can use the font controls in the editor.
jtints likes this post
Similar topics
» Transport Buttons Ableton
» Maintaining state of cycle buttons over multiple pages
» Banks and track change buttons not working
» Increment/Decrement Program Change buttons
» Script working but unstable when replicated in several buttons
» Maintaining state of cycle buttons over multiple pages
» Banks and track change buttons not working
» Increment/Decrement Program Change buttons
» Script working but unstable when replicated in several buttons
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum