OscSlot A wrapper class for OSCresponderNodes


Inherits from: Object


Sets up an OSCresponderNode for a given key and optionally scales it based on minimum and maximum input received so far. 


This class is designed to mimmic GeneralHIDSlot


See also: OSCHID GeneralHIDSlot OSCresponderNode



Creation / Class Methods


*new (type, osckey, action, index )

Create a new Slot

type - \relative for inputs that should be scaled. \button for inputs that should not be. 

osckey - The OSC message to listen for.

action - The action to call upon receiving a new OSC message. Default value is nil.

index - The index of the message to listen for. In most cases this will be one, but if your device bundles x, y z coordinates together and you want to listen for y, this would be 2. Or for z, it would be 3.

// Example

w = OSCHID.new.spec_((

ax: OscSlot(\relative, '/wii/acc', nil, 1),

ay: OscSlot(\relative, '/wii/acc', nil, 2),

az: OscSlot(\relative, '/wii/acc', nil, 3)

));


Accessing Instance and Class Variables

action_(func)

Sets the action for the slot.  This will not get called for \relative slots until the calibration is set to false


// Example

w = OSCHID.new.spec_((

ax: OscSlot(\relative, '/wii/acc', nil, 1)));

w.spec[\ax].action = { | val | val.value.postln; };

w.calibrate = false;


createBus (s)

Create a control bus on the specified server, and map the incoming values to this bus.


bus

Returns the bus to which this slot is mapped, if a bus has been created.


freeBus ()

Free the bus on the server


kr ()

JitLib support