10#ifndef __AUDIO_CONTROL_PORT_H__
11#define __AUDIO_CONTROL_PORT_H__
69 const Port *
const self,
70 float normalized_val);
87#define control_port_is_val_toggled(val) (val > 0.001f)
92#define control_port_is_toggled(self) \
93 (control_port_is_val_toggled (self->control))
int control_port_get_int(Port *self)
Gets the control value for an integer port.
NONNULL float control_port_real_val_to_normalized(const Port *const self, float real_val)
Converts real value (eg.
int control_port_get_int_from_val(float val)
Gets the control value for an integer port.
void control_port_set_real_val(Port *self, float val)
Get the default real value of the control.
NONNULL float control_port_normalized_val_to_real(const Port *const self, float normalized_val)
Converts normalized value (0.0 to 1.0) to real value (eg.
float control_port_get_default_val(Port *self)
Get the default real value of the control.
void control_port_set_toggled(Port *self, bool toggled, bool forward_events)
Wrapper over port_set_control_value() for toggles.
float control_port_get_snapped_val(Port *self)
Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
float control_port_get_val(Port *self)
Get the current real value of the control.
HOT NONNULL void control_port_set_val_from_normalized(Port *self, float val, bool automating)
Updates the actual value.
void control_port_set_real_val_w_events(Port *self, float val)
Get the default real value of the control and sends UI events.
float control_port_get_snapped_val_from_val(Port *self, float val)
Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
float control_port_get_unsnapped_val(Port *self)
Get the current real unsnapped value of the control.
float control_port_get_normalized_val(Port *self)
Get the current normalized value of the control.
Used for queueing changes to be applied during processing.
PortIdentifier::Flags2 flag2
Flag to identify the port the change is for.
float real_val
Real (not normalized) value to set.
PortIdentifier::Flags flag1
Flag to identify the port the change is for.
Must ONLY be created via port_new()
Object to hold information for the Tempo track.