Package dev.turboism.sdk.event.cubism
Class ParameterValueEvent.Before
java.lang.Object
dev.turboism.sdk.event.cubism.ParameterValueEvent.Before
- All Implemented Interfaces:
ParameterValueEvent,EventBus.TurboismEvent,TurboismEvent
- Enclosing interface:
- ParameterValueEvent
Synchronous state published before the host write.
Subscribers may replace the current candidate. The
Runtime validates and checkpoints each subscriber's change.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne Runtime-owned mutable callback scope.Nested classes/interfaces inherited from interface dev.turboism.sdk.event.cubism.ParameterValueEvent
ParameterValueEvent.After, ParameterValueEvent.Before, ParameterValueEvent.On -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopenCallback(Parameter parameter, float requestedValue, float value) Opens one Runtime-controlled callback scope.floatvoidsetValue(float value) Replaces the current candidate value for this callback.floatvalue()
-
Constructor Details
-
Before
-
-
Method Details
-
openCallback
public static ParameterValueEvent.Before.Callback openCallback(Parameter parameter, float requestedValue, float value) Opens one Runtime-controlled callback scope.Each subscriber receives a distinct event instance. The candidate is mutable only on the opening thread and only until the returned scope is closed, so retaining the event cannot mutate a later host operation.
- Parameters:
parameter- detached parameter projection for the operationrequestedValue- value originally requested by the callervalue- current valid candidate before this subscriber- Returns:
- the callback scope and its event
-
parameter
- Specified by:
parameterin interfaceParameterValueEvent- Returns:
- the parameter participating in the operation
-
requestedValue
public float requestedValue()- Returns:
- the value originally requested before any subscriber transformation
-
value
public float value()- Returns:
- the current candidate value
-
setValue
public void setValue(float value) Replaces the current candidate value for this callback.The Runtime validates the candidate after the subscriber returns; non-finite values are discarded without changing the preceding valid candidate.
- Parameters:
value- replacement candidate
-