User Tools

Site Tools


events

Differences

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 13:34]
admin [Using Global Variables as Parameter]
events [2019/01/17 13:47] (current)
admin [Using Global Variables as Parameter]
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.
 +<​code>​
 +dim Controller, Channel as string
 +controller = NthField(onControllerChange,":",​1)
 +channel = NthField(onControllerChange,":",​2)
 +if Controller = "​0"​ and Channel = "​0"​ then Condition is true
 +</​code>​
 +
 +Now lets look how we extract the volume level and use it as parameter:
 +<​code>​
 +Dim v as string
 +v = NthField(onControllerChange,":",​3)
 +SetGlobalVar("​Volume",​v)
 +</​code>​
 +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: 2019/01/17 13:34 by admin