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

Link to this section Functions

Link to this function

disable_main_mono_out(session, channel)

View Source
@spec disable_main_mono_out(session(), channel()) :: :ok

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
Link to this function

disable_main_stereo_out(session, channel)

View Source
@spec disable_main_stereo_out(session(), channel()) :: :ok

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
Link to this function

enable_main_mono_out(session, channel)

View Source
@spec enable_main_mono_out(session(), channel()) :: :ok

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
Link to this function

enable_main_stereo_out(session, channel)

View Source
@spec enable_main_stereo_out(session(), channel()) :: :ok

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
Link to this function

get_main_mono_level(session, channel)

View Source
@spec get_main_mono_level(session(), channel()) :: float()

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
Link to this function

main_mono_out?(session, channel)

View Source
@spec main_mono_out?(session(), channel()) :: boolean()

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
Link to this function

main_stereo_out?(session, channel)

View Source
@spec main_stereo_out?(session(), channel()) :: boolean()

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
Link to this function

set_main_mono_level(session, channel, level)

View Source
@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