Commit 77ea53d9 authored by Hanspeter Portner's avatar Hanspeter Portner

templates: add OSC Responder template.

parent 04e73bc6
......@@ -300,3 +300,10 @@ moony:bank-template_part-2
pset:bank moony:bank-template;
rdfs:label "Template 2: Time Responder" ;
rdfs:seeAlso <presets.ttl> .
moony:bank-template_part-3
a pset:Preset ;
lv2:appliesTo moony:a1xa1 ;
pset:bank moony:bank-template;
rdfs:label "Template 3: OSC Responder" ;
rdfs:seeAlso <presets.ttl> .
......@@ -783,3 +783,26 @@ function run(n, seq, forge, control, notify)
timeR(from, n, forge) -- call responder for remaining frames
end"""
] .
moony:bank-template_part-3
a pset:Preset ;
doap:license lic:Artistic-2.0 ;
state:state [
moony:code """-- Template 3: OSC Responder
-- define an OSCResponder object
local oscR = OSCResponder({
['/ping'] = function(self, frames, forge, fmt, ...)
--TODO
end,
['/pong'] = function(self, frames, forge, fmt, ...)
--TODO
end
})
function run(n, seq, forge, control, notify)
for frames, atom in seq:foreach() do -- iterate over incoming events
local handled = oscR(frames, forge, atom) -- call responder for event
end
end"""
] .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment