Actions Configuration
OScofo support actions as consequences of EVENTS, these actions are very tied with the program where OScofo is running and for now just are supported on PureData.
The actions can be run immediately after the EVENT detection or after some delay specified using the delay keyword. There are two types of actions for now sendto and luacall. Both functions can be delay specified as followed:
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 receivere1sendto 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 OScofo 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
}