Arc and Supercollider

Hi there,

I’m looking for a controller to play with granular synth stuff, coded up in Supercollider (in macos). Arc looks like the go. I can code stuff up, but I’d really rather just play the music. My questions are:

  • Is there already Supercollider code that can interface with Arc?

I can see there is Grid stuff for Supercollider, but I’ve seen no evidence of Arc code. My other question is:

  • is the structure for lighting up the Arc leds already coded up (in serialOSC or some other lib) …or will I have to write code that does stuff like abstract led light triggers into circles and stuff? To what extent is the function of Arc already coded as 2-way … and to what extent will I need to write it?

Etienne

4 Likes

there are two basic ways to interface with an arc or grid from supercollider.

the first is via OSC with the serialosc app/daemon running.

here is a class that provides an absratcion for Arcs using OSC:

the other way is with a raw serial connection (SerialPort). this is less flexible but more portable (doesn’t depend on serialosc or libmonome or anything.) this is the way i usually talk to monome devices from supercollider. i don’t have an Arc but here is a class i 've used for grids:

you’d have to “code this up” for arc instead. good news is that the serial interface is quite simple. the entire interface for all monome devices is described in this document, which looks complicated because it is exhaustive. (you need only the stuff corresponding to the /enc/... and /ring/... OSC paths, for gestures and lights respectively.)

relevant excerpt for you

---------------------------------------------------------------------
5 encoder
---------------------------------------------------------------------

from device:
------------

OSC:
/enc/delta n d
	mapped to 0x50
/enc/key n [0/1]
	mapped to 0x51 and 0x52

0x50 enc / delta
bytes: 3
structure: [0x50, n, d]
n = encoder number
	0-255
d = delta
	(-128)-127 (two's comp 8 bit)
description: encoder position change

0x51 enc / switch up
bytes: 2
structure: [0x51, n]
n = encoder number
	0-255
description: encoder switch up

0x52 enc / switch down
bytes: 2
structure: [0x52, n]
n = encoder number
	0-255
description: encoder switch down


---------------------------------------------------------------------
9 variable 64led ring
---------------------------------------------------------------------

to device:
----------

OSC:
/ring/all n a
	mapped to 0x90
/ring/set n x a
	mapped to 0x91
/ring/map n d[64]
	mapped to 0x92
/ring/line n x1 x2 a
	mapped to 0x93

0x90 set single led
bytes: 4
structure: [0x90, n, x, a]
n = group number
x = led number
a = value
description: set led x of group n to value a

0x91 set all to a
bytes: 3
structure: [0x91, n, a]
n = group number (led ring number)
a = value
description: set entire group to value a

0x92 set all values to d (64)
bytes: 66
structure: [0x92, n, d0..63]
n = group number
d = array of 64 values
description: set all values of group to d (array)

0x93 set range of elements to a
bytes: 5
structure: [0x93, n, x1, x2, a]
n = group number
x1 = start position
x2 = end position
a = value
description: set range x1-x2 (inclusive) to a. wrapping supported, ie. set range 60,4 would set values 60,61,62,63,0,1,2,3,4. always positive direction sweep. ie. 4,10 = 4,5,6,7,8,9,10 whereas 10,4 = 10,11,12,13...63,0,1,2,3,4



will I have to write code that does stuff like abstract led light triggers into circles and stuff?

well, yes. the arc display surface is simple. its just 64 LEDs. the serial protocol includes commands for setting all leds to one level, level of a single LED, a range of LEDs to one level, or all leds to arbitrary levels by sending a buffer. (/ring/led, /ring/line, /ring/map.)

To what extent is the function of Arc already coded as 2-way

input and output are completely decoupled. the device implements no internal logic connecting them. that is the basic philosophy of monome’s controllers. it means they are completely flexible but also that the answer is mostly “you have to code it.” many people have developed abstraction libraries for creating “widgets” and “affordances” for different languages. (mostly max, javascript, norns-lua.) i’m not aware of anything like that for SC/Arc but i certainly don’t know everything.

hope that helps!

2 Likes

Thankyou, that helps tremendously … and confirms my suspicion that there will be a lot of coding to abstract UIs over SC/arc.

Now, to decide whether I want to go there …

1 Like