User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
events [2019/01/17 14:34]
admin [Using Global Variables as Parameter]
events [2020/09/24 19:03] (current)
Line 106: Line 106:
 Condition = true Condition = true
 </​code>​ </​code>​
 +First notice the last line, '​Condition = true'. Here we define that the condition is allways true, no matter what controller change message is received. If you expect controller change messages from other controllers than controller 1 on channel 1 you have to change this. e.g.
 +dim Controller, Channel as string
 +controller = NthField(onControllerChange,":",​1)
 +channel = NthField(onControllerChange,":",​2)
 +if Controller = "​0"​ and Channel = "​0"​ then Condition is true
 +Now lets look how we extract the volume level and use it as parameter:
 +Dim v as string
 +v = NthField(onControllerChange,":",​3)
 +the variable v receives the volume level. This level is the strored in the global variable Volume.
 +Make sure that the 'After Fired Block for ms' value is set to 0 to allow quick volume changes.
 +{{ ::​blockafterfired.png |}}
 +Now we link the Event to a script.
 +{{ ::​eventparameter2.png |}}
 +This script simply reads the global Volume variable and inserts it in an OSC Command
 ===== Calendar Events ===== ===== Calendar Events =====
events.1547732067.txt.gz ยท Last modified: 2020/09/24 19:00 (external edit)