forked from okyeron/oscgrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load_arc.lua
49 lines (34 loc) · 854 Bytes
/
load_arc.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- oscgrid/oscarc loader
-- run this to load oscgrid and oscarc into memory
-- you can also use this directly in another script
-- replace grid.connect() with include('lib/oscgrid')
-- and you're off to the races
-- ar = arc.connect()
-- local ar = include('lib/oscarc')
local touchoscsourceip = "10.0.1.11"
local touchoscsourceport = 9000
local ar
function init()
connect()
screen.aa(0)
redraw()
end
function connect()
arc.update_devices()
ar = include('lib/oscarc')
local ar_id = 2
ar.arc.add(ar_id, "m54321", "oscarc", {})
ar.delta = oscarc_delta
ar.oscdest = {touchoscsourceip,touchoscsourceport}
osc.event = ar.osc_in
end
function oscarc_delta(n, delta)
--print (n , delta)
end
function redraw()
screen.clear()
screen.level(15)
screen.move (0,10)
screen.text('oscarc loaded')
screen.update()
end