View Source X32Remote.Commands.MainOut (x32_remote v0.1.0)
Commands that query or modify how channels are routed to the main output.
For all functions, the channel argument must be a valid channel name, in
"type/##" format. See X32Remote.Types.Channel for a list of valid channels.
All functions in this module take the process ID or name of an
X32Remote.Session process as their first argument. For more convenient
versions that omit this first argument, see X32Remote.Mixer.
Link to this section Summary
Functions
Disables sending a channel's audio to the mono ("MONO/C") main output.
Disables sending a channel's audio to the stereo ("LR") main output.
Enables sending a channel's audio to the mono ("MONO/C") main output.
Enables sending a channel's audio to the stereo ("LR") main output.
Gets the main mono ("MONO/C") output level setting for a channel.
Query if a channel is sending audio to the mono ("MONO/C") main output.
Query if a channel is sending audio to the stereo ("LR") main output.
Sets the main mono ("MONO/C") output level setting for a channel.
Link to this section Types
@type channel() :: X32Remote.Types.Channel.channel()
@type mono_level() :: X32Remote.Types.mono_level()
@type session() :: X32Remote.Session.session()
Link to this section Functions
Disables sending a channel's audio to the mono ("MONO/C") main output.
Returns :ok immediately. Use main_mono_out?/2 if you need to check if
the change occurred.
example
Example
iex> X32Remote.Commands.MainOut.disable_main_mono_out(session, "ch/09")
:ok
iex> X32Remote.Commands.MainOut.main_mono_out?(session, "ch/09")
false
Disables sending a channel's audio to the stereo ("LR") main output.
Returns :ok immediately. Use main_stereo_out?/2 if you need to check if
the change occurred.
example
Example
iex> X32Remote.Commands.MainOut.disable_main_stereo_out(session, "bus/06")
:ok
iex> X32Remote.Commands.MainOut.main_stereo_out?(session, "bus/06")
false
Enables sending a channel's audio to the mono ("MONO/C") main output.
Returns :ok immediately. Use main_mono_out?/2 if you need to check if
the change occurred.
example
Example
iex> X32Remote.Commands.MainOut.enable_main_mono_out(session, "ch/06")
:ok
iex> X32Remote.Commands.MainOut.main_mono_out?(session, "ch/06")
true
Enables sending a channel's audio to the stereo ("LR") main output.
Returns :ok immediately. Use main_stereo_out?/2 if you need to check if
the change occurred.
example
Example
iex> X32Remote.Commands.MainOut.enable_main_stereo_out(session, "bus/05")
:ok
iex> X32Remote.Commands.MainOut.main_stereo_out?(session, "bus/05")
true
Gets the main mono ("MONO/C") output level setting for a channel.
On X32 consoles, this setting is stored as an integer between 0 (silent)
and 160 (maximum). This function just returns a normalised approximation
of that. To get the internal setting, multiply the result from this function
by 160 and then use Kernel.round/1.
Returns a value between 0.0 (no output) and 1.0 (maximum output).
example
Example
iex> X32Remote.Commands.MainOut.get_main_mono_level(session, "ch/17")
0.5625
Query if a channel is sending audio to the mono ("MONO/C") main output.
Returns true if sending, false otherwise.
example
Example
iex> X32Remote.Commands.MainOut.main_mono_out?(session, "ch/03")
false
iex> X32Remote.Commands.MainOut.enable_main_mono_out(session, "ch/03")
:ok
iex> X32Remote.Commands.MainOut.main_mono_out?(session, "ch/03")
true
Query if a channel is sending audio to the stereo ("LR") main output.
Returns true if sending, false otherwise.
example
Example
iex> X32Remote.Commands.MainOut.main_stereo_out?(session, "bus/03")
false
iex> X32Remote.Commands.MainOut.enable_main_stereo_out(session, "bus/03")
:ok
iex> X32Remote.Commands.MainOut.main_stereo_out?(session, "bus/03")
true
@spec set_main_mono_level(session(), channel(), mono_level()) :: :ok
Sets the main mono ("MONO/C") output level setting for a channel.
On X32 consoles, this setting is stored as an integer between 0 (silent)
and 160 (maximum). You can specify level as either an integer in this
range, or as a floating point between 0.0 and 1.0.
Returns :ok immediately. Use get_main_mono_level/2 if you need to check if the
change occurred. (Due to rounding, you should not expect that this will match
the value you gave to this function.)
example
Example
iex> X32Remote.Commands.MainOut.set_main_mono_level(session, "ch/18", 30)
:ok
iex> X32Remote.Commands.MainOut.get_main_mono_level(session, "ch/18")
0.1875