A live onParamChanged registration. More...
#include <param_subscription.hpp>
Public Attributes | |
| std::uint32_t | id = 0 |
| Handle returned to JS. | |
| state::ParamID | param_id = 0 |
| resolved once at subscribe time | |
| std::string | param_name |
| echoed in the payload | |
| float | last_value = 0.0f |
| Seeded from the store at subscribe time so subscribing is not itself reported as a change. | |
| float | last_modulated = 0.0f |
| bool | has_playing = false |
| The value a modulator is playing (StateStore::displayed_modulation), normalized; has_playing false when nothing modulates the parameter. | |
| float | last_playing = 0.0f |
A live onParamChanged registration.
The handler itself stays in JS — CHOC's NativeFunction cannot carry a JSValue — so this holds only what the native side needs to decide whether to dispatch, and the id that keys the handler in the engine's __callbacks__ table.
| bool pulp::view::ParamSubscription::has_playing = false |
The value a modulator is playing (StateStore::displayed_modulation), normalized; has_playing false when nothing modulates the parameter.
| std::uint32_t pulp::view::ParamSubscription::id = 0 |
Handle returned to JS.
Monotonic and never reused, so a stale offParamChanged() from a torn-down view cannot cancel a live subscription that happened to land in the same slot. Zero is never issued, and marks an entry tombstoned by a handler that unsubscribed mid-dispatch; those compact at the end of the pass.
| float pulp::view::ParamSubscription::last_modulated = 0.0f |
| float pulp::view::ParamSubscription::last_playing = 0.0f |
| float pulp::view::ParamSubscription::last_value = 0.0f |
Seeded from the store at subscribe time so subscribing is not itself reported as a change.
NaN would defeat that — NaN != NaN would dispatch on the first frame.
| state::ParamID pulp::view::ParamSubscription::param_id = 0 |
resolved once at subscribe time
| std::string pulp::view::ParamSubscription::param_name |
echoed in the payload