MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / send

Method send

src/main/java/trace/sound/OSCOut.kt:28–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 var al = ArrayList<Any>()
27 when (d) {
28 is Number -> {
29 val f = d.toFloat()
30 al.add(f)
31 }
32 is Vec2 -> {
33 val f = d.x
34 al.add(d.x.toFloat())
35 al.add(d.y.toFloat())
36
37 }
38 is Vec3 -> {
39 al.add(d.x.toFloat())
40 al.add(d.y.toFloat())
41 al.add(d.z.toFloat())
42
43 }
44 is Vec4 -> {
45 al.add(d.x.toFloat())
46 al.add(d.y.toFloat())
47 al.add(d.z.toFloat())
48 al.add(d.w.toFloat())
49 }
50 is String -> {
51 val message = OSCMessage(name, mutableListOf<Any>(d))
52 oout.send(message)
53 return@send d
54 }
55
56 }
57
58 val message = OSCMessage(name, al)
59 oout.send(message)
60
61 return d
62 }
63
64 fun sendList(name: String, dd: List<Any>) {
65 print("OSC $name, $dd")
66
67 var al = ArrayList<Any>()
68 for (d in dd) {
69 when (d) {
70 is Number -> {

Callers 15

include.jsFile · 0.45
preamble2.jsFile · 0.45
instantiate.jsFile · 0.45
performCommandFunction · 0.45
doubleshift.jsFile · 0.45
boxbrowser.jsFile · 0.45
CnFunction · 0.45
AutocompleteFunction · 0.45
copyFunction · 0.45
cutFunction · 0.45
preamble.jsFile · 0.45

Calls 1

addMethod · 0.45

Tested by

no test coverage detected