Scripting newbie
Posted: 08 Oct 2013 22:01
Im trying to solve a problem. To do this I suppose I need to understand some basic scripting, but Im unsure of how to get there...
I'll try to explain what I want to do and why in this particular case, perhaps someone will be able to point me in the right direction. It may be a bit hard to understand why if you arent familiar with Nuendo as this specific behavior is to my knowledge unique to Nuendo.
Background explanation if you want to know WHY I want to do this:
In Nuendo there are quite a few limitations to what I can control with bidirectional communications. Some things can only be controlled sending commands to the DAW, but there is no way to get the set status back out again.
So in this particular case I have a few buttons/functions that have three possible states (example: Fill loop, used to record static automation between Left and Right markers, useful when doing automation for a whole scene):
Off
One shot mode: The first "mouse click/command trigger" sets up the loop mode in a one shot fashion, meaning that after automating anything and then pressing stop (or locating in the project some other way) it will revert to its off position.
Locked mode: The next second "mouse click/command trigger" will LOCK the function in a permanent mode, so the function stays active, until it is again changed with a third "mouse click/command trigger" thus turning it all off.
I rarely use the one shot mode, so I'll start by trying to avoid it
So what I want to be able to do is:
On Lemur "button" press 1: send two midi note on commands with a slight delay between them and illuminate Lemur "button" keeping it lit (switch mode style).
On Lemur "button" press 2: send one midi note on command, and change the lit status of the Lemur "button" so it is no longer lit.
So basically I want it to work just like a regular switch, BUT every time it is activated it should send two note on messages, and when it is turned off just one.
Any takers on how to do this?
I will keep digging through the manual and the forums to see if I can figure it out by myself, but I don't mind some assistance
I guess I'll have to create some kind of variable that needs to be updated each time the button is touched. If the counter is set to 0, then change to 1, if it is 1 change to 0. Pretty basic, but I have yet to figure out how to do that.
That will give me a counter that can be referenced wether it should send out a additional midi note on (or not) as the button itself is issuing the basic note on each time anyway.
So I need to figure out how to first script a counter.
Then I need to figure out how to read the counter and use that in a argument that should result in a midi msg being sent out.
I'll try to explain what I want to do and why in this particular case, perhaps someone will be able to point me in the right direction. It may be a bit hard to understand why if you arent familiar with Nuendo as this specific behavior is to my knowledge unique to Nuendo.
Background explanation if you want to know WHY I want to do this:
In Nuendo there are quite a few limitations to what I can control with bidirectional communications. Some things can only be controlled sending commands to the DAW, but there is no way to get the set status back out again.
So in this particular case I have a few buttons/functions that have three possible states (example: Fill loop, used to record static automation between Left and Right markers, useful when doing automation for a whole scene):
Off
One shot mode: The first "mouse click/command trigger" sets up the loop mode in a one shot fashion, meaning that after automating anything and then pressing stop (or locating in the project some other way) it will revert to its off position.
Locked mode: The next second "mouse click/command trigger" will LOCK the function in a permanent mode, so the function stays active, until it is again changed with a third "mouse click/command trigger" thus turning it all off.
I rarely use the one shot mode, so I'll start by trying to avoid it
So what I want to be able to do is:
On Lemur "button" press 1: send two midi note on commands with a slight delay between them and illuminate Lemur "button" keeping it lit (switch mode style).
On Lemur "button" press 2: send one midi note on command, and change the lit status of the Lemur "button" so it is no longer lit.
So basically I want it to work just like a regular switch, BUT every time it is activated it should send two note on messages, and when it is turned off just one.
Any takers on how to do this?
I will keep digging through the manual and the forums to see if I can figure it out by myself, but I don't mind some assistance
I guess I'll have to create some kind of variable that needs to be updated each time the button is touched. If the counter is set to 0, then change to 1, if it is 1 change to 0. Pretty basic, but I have yet to figure out how to do that.
That will give me a counter that can be referenced wether it should send out a additional midi note on (or not) as the button itself is issuing the basic note on each time anyway.
So I need to figure out how to first script a counter.
Then I need to figure out how to read the counter and use that in a argument that should result in a midi msg being sent out.