NumberEditor:
Filter:
Classes (extension) | Libraries > crucial > Editors

NumberEditor : Editor : Object
ExtensionExtension

holds a float value with a spec, editable with a gui

Description

This is the default control for a StaticSpec.

If used in a Patch, it will return its initial value when the patch starts, but will not be modulateable after that. See KrNumberEditor for modulateable.

NumberEditor can also be used in Pbind, since it returns its float value in response to .next or .value

Class Methods

NumberEditor.new(value: 1.0, spec: 'amp')

Arguments:

value

initial value

spec

ControlSpec or StaticSpec

NumberEditor.bind(model, varname, spec, layout, bounds, labelWidth: 100)

Arguments:

model
varname
spec
layout
bounds
labelWidth

Inherited class methods

Instance Methods

.spec

.spec = aspec

Arguments:

aspec

.init(val, aspec)

Arguments:

val
aspec

.value

.value_(v, change: true)

From superclass: Editor

Arguments:

v
change

.setUnmappedValue(unipolar, change: true)

Arguments:

unipolar
change

.unmappedValue

.rand(standardDeviation: 0.15, mean)

Arguments:

standardDeviation
mean

.numChannels

.addToSynthDef(synthDef, name)

Arguments:

synthDef
name

.instrArgFromControl(control)

Arguments:

control

.rate

.copy

.guiClass

Inherited instance methods

Examples

control-drag up/down in the number box scales the value shift-control-drag for finer control

option click on the number box to reset the value to the spec's default

Note that if this slider is used in a Patch then it sends the .set message to the synth on the server only when .changed is invoked this is because neither the Patch nor the NumberEditor does the sending its a separate utility object that is a registered dependent of the NumberEditor

Putting them on a Sheet

Putting them on a PageLayout

Putting them on normal windows

using a PageLayout on a window

put them on a FlowView