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

NumberEditor
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

.new

Arguments:

value

initial value

spec

ControlSpec or StaticSpec

.bind

Arguments:

model
varname
spec
layout
bounds
labelWidth

Instance Methods

.spec

Arguments:

aspec

.init

Arguments:

val
aspec

.value

Arguments:

v
change

.setUnmappedValue

Arguments:

unipolar
change

.unmappedValue

.rand

Arguments:

standardDeviation
mean

.numChannels

.addToSynthDef

Arguments:

synthDef
name

.instrArgFromControl

Arguments:

control

.rate

.copy

.guiClass

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