JInTController

Superclass: Object

/**

2006  Till Bovermann (IEM)

*/


Imagine a Faderbox or a GamePad, or …

In general there are a fixed number of controls which behave in different ways.

there are e.g.

Fader (1 DOF)

Knob (1 DOF)

Pad (1 DOF)

2D Fader (joystick) (2 DOF)

tangible rigid object (6 DOF)

pen on graphics-tablet (5 DOF)

...

This class is a general representation of one of these controllers.

Subclasses implement the dedicated semantics.

JInTC_<lowercase> – abstract class

JInTC_<Uppercase> – usable class


a = JInTController.new


Methods



rawVals

array of raw controller values. 

No specs assigned. 

One for each dimension.


value(i)

returns array of current normed values of controller.

if i is Integer:

returns current normed value i of controller.


numDOF

number of available degrees of freedom


description

a String describing the functionality

semantics

array of arrays containing symbols for each DOF:

[values]

\discrete [discrete values]

\continuous [contiuous values]

[what happens if user lets go controller?]

\snapBack [snaps back into a predefined state]

\sticky [remains in last state]

[]

\range [m .. n]

\ring [modulo ring]

[active or passive?]

\passive

\settable


specs

for each dimension one ControlSpec. nil: [0,1,'linear'].asSpec



1-DOF


JInTC_onoff : JInTController

simple one-DOF controller with on/off


a = JInTC_onoff.new;

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;


JInTC_Button : JInTC_onoff

Button (on/off) with snap back ("Taster")


a = JInTC_Button.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;


JInTC_linear : JInTController

simple one-DOF contiuous controller (abstract)


a = JInTC_linear.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;



JInTC_linearSnapper : JInTController

simple one-DOF contiuous controller, snapping back into default position


a = JInTC_linearSnapper.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;


JInTC_Fader : JInTC_linear

simple one-DOF Fader


a = JInTC_onoff.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;



JInTC_Knob : JInTC_linear

simple knob to turn


a = JInTC_onoff.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;



n-DOF


I decided to not build trees of 1-DOF JInTController, since the definition of a controller 

(see above) says, that a controller is something stick together, where it is near to 

impossible to change one dimension without changing the others.

Therefore it is not intendet to use one (of many) DOF for a single parameter.


JInTC_composite : JInTController

A composite of several controllers. Should not be used (abstract class)



a = JInTC_composite.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;


JInTC_ThumbStick : JInTC_composite

small two DOF analog joystick with an additional knob-functionality by pressing it. Normally actuated by thumb.


a = JInTC_ThumbStick.new

a.numDOF;

a.description;

a.semantics;

a.specs.do{|a| a.asCompileString.postln};

a.inspect;


Examples