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
Returns the volume (status), or the updated object in case
of an assign operation (<-
).
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