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

KrNumberEditor : NumberEditor : Editor : Object
ExtensionExtension

a number box and slider for editing a float value [\kr rate]
Subclasses: PopUpEditor

Description

A number box and a slider control for editing a float value.

This is the default control for any modulateable control input (ControlSpec). It is most commonly seen in Patches where it shows up as the default control for many parameters. When you move the slider, it sends messages to the Patch's Synth.

Class Methods

KrNumberEditor.defaultLag

KrNumberEditor.defaultLag = value

Inherited class methods

Instance Methods

.lag

.lag = value

.init(val, aspec)

Arguments:

val
aspec

.canDoSpec(aspec)

Arguments:

aspec

.addToSynthDef(synthDef, name)

Arguments:

synthDef
name

.instrArgFromControl(control)

Arguments:

control

.makePatchOut

.connectToPatchIn(patchIn, needsValueSetNow: true)

Arguments:

patchIn
needsValueSetNow

.copy

.guiClass

.addToDefName(stream)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc

Arguments:

stream

Inherited instance methods

Internals

if a KrNumberEditor is in a Patch, and that Patch is playing on a server, the message to the server happens when the KrNumberEditor gets the .changed message and sends .update to all its depedants. This includes any NumberEditorGui and also any UpdatingScalarPatchOut, which is what actually sends the message to the server.

Lag

KrNumberEditors support lag. This means that the control messages received by the Synth are smoothed by a Lag.kr You can set lag to nil for no Lag.

Alternatively see NoLagControlSpec, whose defaultControl sets the lag to nil.

the keys \binary, \loop (as looked up in the Spec dictionary) are registred as NoLagControlSpec, and thus don't use any lag at all.

I would prefer to just have a lag preference in ControlSpec (clients that do lag eg. sliders can tell from the spec if they should do lag or not).

You can register others, or use a NoLagControlSpec when writing the Instr.