Actions
OpenScofo support actions as consequences of EVENTS, these actions are very tied with the program where OpenScofo is running and for now just are supported on PureData and Max.
There are currently two types of actions: sendto and luacall. Actions can be executed immediately after the EVENT detection or after a delay specified using the delay keyword.
Delayed Messages
Absolute time delay
Absolute time are clock time, and they don't change if the performer plays your must faster or slower, always have the same duration.
delay 2000 ms: Has a delay of 2 seconds after theEVENTdetection.delay 2 sec: Has a delay of 2 seconds after theEVENTdetection.
For example:
NOTE C4 2
delay 2000 ms sendto e1 [1 2 3 4]
The syntax highlight of the Editor make this easier to read!!!
Will send the list 1 2 3 4 to the receiver e1 after 2 seconds.
Relative time delay
Relative time are music time, they change if the performer plays your must faster or slower.
delay 1 tempo: Has a delay of 1 tempo after theEVENTdetection.delay 0.5 tempo: Has a delay of 0.5 tempo after theEVENTdetection.
Actions
sendto
sendto e1: Send a bang to the receivere1.sendto myreceiver [hello world]: Sendhello worldto the receivermyreceiver.delay 1 tempo sendto e1: Send a bang to the receivere1after the duration on 1 tempo.
luacall
Advanced Users
This is designed for advances users, but if you are starting you can ask questions using the OpenScofo Github Discussions.
Lua function are executed immediately after the event detection of after some delay time.
luacall(myluafunc("hello world"): Execute the functionmyluafuncimmediately.delay 1 tempo luacall(myluafunc("hello after 1 tempo"): Execute the function after 1 tempo.
Lua Functions definition
Lua Functions must be defined inside the LUA {}, for example:
LUA {
function myluafunc(s)
pd.post(s)
end
}