Trevliga Spel forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Increment/Decrement Program Change buttons

2 posters

Go down

Increment/Decrement Program Change buttons Empty Increment/Decrement Program Change buttons

Post by AntonioSage Fri Jan 06, 2023 7:24 am

Hello, I am new here and very impressed with the Midi capability of this plug-in.
I am interested in creating two Program Change buttons. A simple increment and decrement.

 I read through the creation of an XML file, and I am confused by it all. 

Is there a simple explanation for creating this file so I can scroll through the sounds on my softsynths that support Program Change? I am on a Mac and I am using Streamdeck+

Thank you,

AntonioSage

Posts : 1
Join date : 2023-01-06

Back to top Go down

Increment/Decrement Program Change buttons Empty Re: Increment/Decrement Program Change buttons

Post by Admin Fri Jan 06, 2023 9:34 am

Hi,

You cannot do that with Program Change buttons since they do not react to Program Change commands  themselves (both buttons would independently move up/down and be stuck at the endpoints.)

You can do it, though, with Script buttons. In its simplest form, you can use these two scripts:

[(press){@Program:#@Program + 1#}{pc:1,#@Program#}]
[(pc:1, 0-127){text:#@Program#}]

[(press){@Program:#@Program - 1#}{pc:1,#@Program#}]
[(pc:1,0-127){text:#@Program#}]

If you want the buttons to display something else than raw midi values, you need to add multiple commands that react to changes to incoming Program Change commands, like:

[(pc:1,0){text:My first program}]
[(pc:1,1){text:Program 1}]
[(pc:1,2){text:This is cool}]
[(pc:1,3-127){text:#@Program#}]

(I discovered a bug when making this example; the scripts can step the @Program variable outside the 0-127 Midi value range, something that shouldn't happen. I'll fix this in the next release)
Admin
Admin
Admin

Posts : 954
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum