Functions to control the global volume of a module, or that of specific channels in the module.

channel_mute_status(mod, channel, ...)

channel_mute_status(mod, channel, ...) <- value

channel_volume(mod, channel, ...)

channel_volume(mod, channel, ...) <- value

global_volume(mod, ...)

global_volume(mod, ...) <- value

Arguments

mod

A tracker module object of class openmpt.

channel

Channel index (integer starting at 0) for which to request or control the volume.

...

Ignored

value

Replacement value. In case of 'status' functions a logical value, in case of 'volume' functions a numeric value.

Value

Returns the volume (status), or the updated object in case of an assign operation (<-).

Examples

mod <- demo_mod()

channel_mute_status(mod, 0L)
#> [1] FALSE

## Mute the first channel in the module
channel_mute_status(mod, 0L) <- TRUE

## Second channel volume at 50%
channel_volume(mod, 1L) <- 0.5
channel_volume(mod, 1L)
#> [1] 0.5

## global volume at 90%
global_volume(mod) <- 0.9
global_volume(mod)
#> [1] 0.8984375