Interface SettableRangedValue
- All Superinterfaces:
AbsoluteHardwarControlBindable,DoubleSupplier,HardwareBindable,RangedValue,RelativeHardwarControlBindable,Subscribable,Value<DoubleValueChangedCallback>
- All Known Subinterfaces:
Parameter,RemoteControl,Send
public interface SettableRangedValue
extends RangedValue, AbsoluteHardwarControlBindable, RelativeHardwarControlBindable
Instances of this interface represent numeric values that have an upper and lower limit.
- Since:
- API version 1
-
Method Summary
Modifier and TypeMethodDescriptiondefault AbsoluteHardwareControlBindingaddBinding(AbsoluteHardwareControl hardwareControl) Binds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way.addBinding(RelativeHardwareControl hardwareControl) Binds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way.addBindingWithRange(AbsoluteHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue) Binds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way.default RelativeHardwareControlBindingaddBindingWithRange(RelativeHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue) addBindingWithRangeAndSensitivity(RelativeHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue, double sensitivity) addBindingWithSensitivity(RelativeHardwareControl hardwareControl, double sensitivity) Binds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way.voidinc(double increment) Increments or decrements the value by a normalized amount assuming the whole range of the value is 0 ..voidIncrements or decrements the value according to the given increment and resolution parameters.voidincRaw(double delta) Increments / decrements the internal (raw) value.voidset(double value) Sets the value in an absolute fashion as a value between 0 ..voidSets the value in an absolute fashion.voidsetImmediately(double value) Sets the value in an absolute fashion as a value between 0 ..voidsetRaw(double value) Set the internal (raw) value.Methods inherited from interface com.bitwig.extension.controller.api.RangedValue
addRawValueObserver, addValueObserver, discreteValueCount, discreteValueNames, displayedValue, get, getAsDouble, getOrigin, getRawMethods inherited from interface com.bitwig.extension.controller.api.Subscribable
isSubscribed, setIsSubscribed, subscribe, unsubscribeMethods inherited from interface com.bitwig.extension.controller.api.Value
addValueObserver, markInterested
-
Method Details
-
set
void set(double value) Sets the value in an absolute fashion as a value between 0 .. 1 where 0 represents the minimum value and 1 the maximum. The value may not be set immediately if the user has configured a take over strategy for the controller.- Parameters:
value- absolute value [0 .. 1]- Since:
- API version 2
-
setImmediately
void setImmediately(double value) Sets the value in an absolute fashion as a value between 0 .. 1 where 0 represents the minimum value and 1 the maximum. The value change is applied immediately and does not care about what take over mode the user has selected. This is useful if the value does not need take over (e.g. a motorized slider).- Parameters:
value- absolute value [0 .. 1]- Since:
- API version 4
-
set
Sets the value in an absolute fashion. The value will be scaled according to the given resolution. Typically the resolution would be specified as the amount of steps the hardware control provides (for example 128) and just pass the integer value as it comes from the MIDI device. The host application will take care of scaling it.- Parameters:
value- integer number in the range [0 .. resolution-1]resolution- the resolution used for scaling @ if passed-in parameters are null- Since:
- API version 1
-
inc
void inc(double increment) Increments or decrements the value by a normalized amount assuming the whole range of the value is 0 .. 1. For example to increment by 10% you would use 0.1 as the increment.- Since:
- API version 2
-
inc
Increments or decrements the value according to the given increment and resolution parameters. Typically the resolution would be specified as the amount of steps the hardware control provides (for example 128) and just pass the integer value as it comes from the MIDI device. The host application will take care of scaling it.- Parameters:
increment- the amount that the current value is increased byresolution- the resolution used for scaling- Since:
- API version 1
-
setRaw
void setRaw(double value) Set the internal (raw) value.- Parameters:
value- the new value with double precision. Range is undefined.- Since:
- API version 1
-
incRaw
void incRaw(double delta) Increments / decrements the internal (raw) value.- Parameters:
delta- the amount that the current internal value get increased by.- Since:
- API version 1
-
addBinding
Description copied from interface:AbsoluteHardwarControlBindableBinds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way. When the binding is no longer needed theHardwareBinding.removeBinding()method can be called on it.- Specified by:
addBindingin interfaceAbsoluteHardwarControlBindable- Returns:
- The newly created binding
-
addBindingWithRange
AbsoluteHardwareControlBinding addBindingWithRange(AbsoluteHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue) Description copied from interface:AbsoluteHardwarControlBindableBinds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way. This target will be adjusted within the supplied normalized range. When the binding is no longer needed theHardwareBinding.removeBinding()method can be called on it.- Specified by:
addBindingWithRangein interfaceAbsoluteHardwarControlBindable- Returns:
- The newly created binding
-
addBinding
default RelativeHardwareControlToRangedValueBinding addBinding(RelativeHardwareControl hardwareControl) Description copied from interface:RelativeHardwarControlBindableBinds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way. When the binding is no longer needed theHardwareBinding.removeBinding()method can be called on it.- Specified by:
addBindingin interfaceRelativeHardwarControlBindable
-
addBindingWithRange
default RelativeHardwareControlBinding addBindingWithRange(RelativeHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue) -
addBindingWithRangeAndSensitivity
RelativeHardwareControlToRangedValueBinding addBindingWithRangeAndSensitivity(RelativeHardwareControl hardwareControl, double minNormalizedValue, double maxNormalizedValue, double sensitivity) -
addBindingWithSensitivity
default RelativeHardwareControlToRangedValueBinding addBindingWithSensitivity(RelativeHardwareControl hardwareControl, double sensitivity) Description copied from interface:RelativeHardwarControlBindableBinds this target to the supplied hardware control so that when the user moves the hardware control this target will respond in a meaningful way. When the binding is no longer needed theHardwareBinding.removeBinding()method can be called on it.- Specified by:
addBindingWithSensitivityin interfaceRelativeHardwarControlBindable
-