This page is available in English only

Non-linear knob

Scaled knob with direct value input

(6 Votes)
minortom
1.2 (Updated 9 months ago)
44.9kB
December 26, 2021
Reaktor 6

DESCRIPTION

Enter scaled values directly by double-clicking the value field.

Looks and feels like a regular humble knob, but the value is output, displayed and edited in exponential domain. Mapping range and curvature adjustable via input parameters. Adaptable to other non-linear curves.

There are two knob macros, one unstyled and one graphical, showing the actual response curve.

-----
v1.2:

Greatly simplified input structure, everything but `Scl` is now a constant inside.

* Improved: knob position responds immediately to `Scl` changes
* Fixed: reinit (like restarting audio engine) no longer resets knob
* Fixed: disconnecting `Scl` input could break value mapping until a forced reinit

Thanks to Colin Brown and EvilDragon for constructive arguments :)

-----
v1.1:

* Added: a macro variant that displays the response curve. The curve responds to parameter changes immediately (max/bias/scale).
* Changed: `scl` input is now exponential
* Fixed: parameters were not correctly generating events in default cases

Thanks to Jonathan Tremblay and Colin Brown for help with debugging events and learning to draw.

-----
v1.0:
Exponential knobs are useful for controlling frequency, etc..

Scaling a value from a linear knob in one direction is easy. The key here is that the mapped/scaled value can be entered directly in the knob's value field (AFAIK the only way to type in an exact value in Reaktor GUI), and both the knob and the exponential value display/entry field are fully synchronised.

Internally this is done with two cleverly cross-modulated knobs (one displaying the knob and another the value field) and a bi-directional morphism to map between linear and non-linear domains.

Note: bi-directional control works only when audio engine is running.

To extend:
- Go into "scaler" and change the mapping transformation. One leg of the transformation must be the inverse of the other.
- Displayed range is 0 to 999, this has effect on the number of decimal places shown (in this case, 2). When changing, pay attention to the final scaling before "knob send", it has to match the range.

COMMENTS  (5)

Artur Nowak
8 months ago
Very useful, thanks!
Jonathan Tremblay
9 months ago
Glad I could help :)
Herbert Breunung
9 months ago
yes seems to solve an issue i already had more than once
minortom
9 months ago
Of course. The disadvantage of the simple approach, if I understand the description correctly, is the lack of bidirectional synchronisation: the meter will correctly display the scaled knob value, but if the value were changed directly (by double-clicking and typing) it will not reflect back on the knob. Next time the knob is moved, the meter value will jump to the current knob value. Attempting to cross-modulate in both directions will cause an event feedback loop if the conversion is not precisely idempotent. This knob macro solves that problem: it actually is a linear knob and another meter as you described, and they are always in sync: entering a value updates the knob, moving the knob updates the value, without feedback loops.
Herbert Breunung
9 months ago
Can you please explain what is the advantage of not just having a normal linear knob, a simple math macro (mostly only one primary automation or multiplication (with 2,3,4 inputs) element) and a meter for digital value output? Thanks
now