View Source X32Remote.Types (x32_remote v0.1.0)
Guards and functions relating to X32 argument and return types.
Link to this section Summary
Types
Mono level, as integer (0 to 160) or float (0.0 to 1.0)
Panning (left to right), as integer (0 to 100) or float (0.0 to 1.0)
Fader volume, as integer (0 to 1024) or float (0.0 to 1.0)
Functions
Returns true if term is an X32 mono level; otherwise returns false.
Returns true if term is an X32 panning value; otherwise returns false.
Returns true if term is an X32 fader volume; otherwise returns false.
Takes a list with a single 0/1 integer, and returns false/true respectively.
Takes a list with a single float, and returns that float.
Link to this section Types
Link to this section Functions
Returns true if term is an X32 mono level; otherwise returns false.
X32 mono levels are represented as either an integer between 0 (silent)
and 160 (max volume), or a float between 0.0 (silent) and 1.0 (max
volume).
Commands that get mono levels will always return the float value. Commands that set mono levels can accept either value.
Allowed in guard tests.
Returns true if term is an X32 panning value; otherwise returns false.
X32 panning levels are represented as either an integer between 0 (full left)
and 100 (full right), or a float between 0.0 (full left) and 1.0 (full right).
The middle (balanced) value is 50 or 0.5, respectively.
Commands that get panning values will always return the float value. Commands that set panning values can accept either type.
Allowed in guard tests.
Returns true if term is an X32 fader volume; otherwise returns false.
X32 fader volumes are represented as either an integer between 0 (silent)
and 1023 (max volume), or a float between 0.0 (silent) and 1.0 (max
volume).
Commands that get volume will always return the float value. Commands that set volume can accept either value.
Allowed in guard tests.
@spec to_boolean([0..1]) :: boolean()
Takes a list with a single 0/1 integer, and returns false/true respectively.
This is a convenience function, due to how many X32 commands return this as their arguments.
Takes a list with a single float, and returns that float.
This is a convenience function, due to how many X32 commands return this as their arguments.