ParamView: table of contents
Classes | Libraries > JITLib

ParamView : Object

show a parameter of a JITLib process


ParamView displays a parameter value, and switches representation as appropriate for value: A single number is shown by an EZSlider, a pair of numbers by an EZRanger, and anything else as code on an EZText.

First examples:

w = Window("test", Rect(20, 820, 400, 100)).front;
~pv = ParamView(w, Rect(20, 20, 360, 20));
~pv2 = ParamView(w, Rect(20, 20, 360, 40));

// not working properly yet
~pv.bounds_(Rect(4, 4, 300, 40));

~pv.viewType_(0); // EZNumber
~pv.viewType_(1); // EZRanger
~pv.viewType_(2); // EZText

~pv.spec_(\freq);  // needs spec for EZSlider

// switches to EZRanger
~pv.value_([200, 2000]);
// 3 numbers -> switches to EZText
~pv.value_([20, 200, 2000]);
// anything else -> EZText
~pv.action = { |pv| pv.value.postcs };

Class Methods, bounds, label, spec, action, initVal, initAction: false)

create a new ParamView with



the parent window or view


the bounds of the view


a label to display


a controlspec for the value


an action to do when the value changes


an initial value


a boolean whether to perform the action on init.

Inherited class methods

Instance Methods


.label = alabel

get and set the view's label


.spec = newspec

get and set the view's control spec


.action = value

get and set the paramview's action





the 3 ezviews between which the ParamView switches


the currently shown view of these


.value = val

get and set value

.valueAction = val

get and set value and do action


do the view's action


.viewType_(newType: 0, force: false)

get and set the view's type: 0 is single number -> EZSlider, 1 is pair of numbers -> EZRanger, 2 is anything else


determine viewType for a given value


.background = col

get and set background color

Inherited instance methods

Undocumented instance methods


.bounds = bounds


.enabled = bool: true


.useRanger = value


.visible = bool: true