OSC Protocol

 
On the Open Sound Control, the addresses are allocated to
the functions such as "Push a button" or "Light a LED". And
the users send and receive osc messages to these addresses.
These addresses are also like a URLs format. Additionaly,
the developpers of the software can set uniquely.
Please refer to opensoundcontrol.org for more information
about osc.
 
The followings are the osc messages of PICnome or PICratchBOX.
 
About [prefix]
The per-software(or program) unique string is put in the [prefix].
For example, mlr is "/mlr" and 64step is "/box". both programs are
made by Max/MSP.
 
From Device To Software
 
press – ON / OFF Control of Single Button

[prefix]/press [x] [y] [state]

x, y : buttuns position(0 – 7)
state : buttons state (1 is down, 0 is up)

 
 adc – Get Analog Input Value

[prefix]/adc [pin] [value]

pin : analog pin id ( 0 – 6 )
value : analog value (0.0 – 1.0)

 
 fader – Get Fader Value(ONLY PICratchBOX)

[prefix]/fader [id] [value]

id : fader id( 0 – 2 )
value : analog value(0.0 – 1.0)

 
 vol – Get Volume Value(ONLY PICratchBOX)

[prefix]/vol [ch] [pin] [value]

ch : volume channel id( 0 – 1 )
id : volume id in each channels( 0 – 3 )
value : analog value(0.0 – 1.0)

 
From Software To Device
 
led – ON / OFF Control of Single LED

[prefix]/led [x] [y] [state]

x, y : LED position (0 – 7)
state : LED state ("1" is ON、"0" isOFF)

 
led_col – LED Pattern Control of Each Column

[prefix]/led_col [column] [data]

column : column id(0 – 7)
data : lighting pattern (0x00 – 0xFF、"1" is ON、"0" isOFF)

 
led_row – LED Pattern Control of Each Row

[prefix]/led_row [row] [data]

row : row id(0 – 7)
data : lighting pattern (0x00 – 0xFF、"1" is ON、"0" is OFF)

 
frame – All LED Pattern Control

[prefix]/frame [A] [B] [C] [D] [E] [F] [G] [H]

[A] – [H] : lighting pattern (0x00 – 0xFF "1" is ON、"0" is OFF)

 
clear – All LED ON / OFF Control

[prefix]/clear [state]

state : all LEDs state
("1" is all lighting、"0" or no argument are all extinction) 

 
adc_enable(or adc/enable) – Toggle for Analog In.

[prefix]/adc_enable [id] [state]

id : setting pin id ( 0 – 8 )
state : toggle for analog inputs ("1" is enable、"0" is disable) 

 
adc/type – Input Type for Analog Inputs

[prefix]/adc/type [id] [type]

id : setting pin id ( 0 – 10 )
type : Input type for analog inputs ( 0 – 2 Details are here)

 
adc/curve – Input Curve for Analog Inputs

[prefix]/adc/curve [id] [curve]

id : setting pin id( 0 – 10 )
curve : Input curve for analog inputs( 0 – 7 Details are here)
※* Second argument can be abbreviated and current curve value is returned.

 
oscconfig – Lump Configuration for OSC Setting

/sys/oscconfig [prefix] [hport] [device] [haddress]

prefix : prefix string
hport : host port number
device : device id
haddress : host address (omissible)

 
device – Switch Displayed Device Settings

/sys/device [id]

id : id number connected devices(0, 1)

 
devices – Confirm Connected Devices Num.

/sys/devices

no args : return the number of connected devices

 
type – Confirm Connected Device Type

/sys/type

no args : return the type(64, 128 or PrB) of connected device

 
prefix – Change Prefix of OSC Command

/sys/prefix [string]

string : string of osc command prefix
no args : return the prefix string of connected devices

 
offset – Insert Offset Value to LED Position

/sys/offset [xoffset] [yoffset]

xoffset, yoffset :  column and row offset value

 
cable – Change Upper Base of LED Pads

/sys/cable [orientation]

orientation :  "Left" is Default Value(left, right, up, down)
no args : return the cable orientaion of connected devices

 
intensity – LED Intensity Control

/sys/intensity [value]

value : Intensity Register for MAX7219(0x00 – 0x0F)

 
test – Set Display Test Register

/sys/test [state]

state : Display Test Register for MAX7219 (0 – 1)

 
shutdown – Set Shutdown Mode Register

/sys/shutdown [state]

state : Shutdown Mode Register for MAX7219 (0 – 1)

Language: