Warning: session_write_close(): write failed: Disk quota exceeded (122) in /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/doku.php on line 117

Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/doku.php on line 117

Warning: Cannot modify header information - headers already sent by (output started at /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/doku.php:117) in /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/inc/actions.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/doku.php:117) in /kunden/276601_40217/hosting/200533/A2176/v-control.com/wiki/lib/tpl/dokuwiki/main.php on line 12
events []

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:33]
admin [Using Global Variables as Parameter]
events [2019/01/17 13:47] (current)
admin [Using Global Variables as Parameter]
Line 94: Line 94:
  
 {{ ::​eventparameter.png |}} {{ ::​eventparameter.png |}}
 +
 +The Event Script
 +
 +<​code>​
 +//If onControllerChange = then Condition = true
 +Dim onControllerChange as Variant
 +onControllerChange = GetDeviceVar("​MIDI","​onControllerChange"​)
 +Dim v as string
 +v = NthField(onControllerChange,":",​3)
 +SetGlobalVar("​Volume",​v)
 +Condition = true
 +</​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.1547732007.txt.gz ยท Last modified: 2019/01/17 13:33 by admin