Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

volume

Default playback volume of PTSample


Description

Extract or replace the default volume of a PTSample.

Usage

## S4 method for signature 'PTSample'
volume(sample)

## S4 replacement method for signature 'PTSample,numeric'
volume(sample) <- value

Arguments

sample

A PTSample for which the default volume needs to be extracted or replace.

value

A numeric value ranging from 0 up to 64, representing the volume level.

Details

PTSamples have a default playback volume, ranging from 0 (silent) up to 64 (maximum volume). This method can be used to extract this value, or to safely replace it.

Value

For volume the volume value, represented by an integer value ranging from 0 up to 64, is returned.

For volume<- A PTSample sample, updated with the volume value, is returned.

Author(s)

Pepijn de Vries

See Also

Examples

data("mod.intro")

## get the volume of the first sample of mod.intro:

volume(PTSample(mod.intro, 1))

## Let's lower the volume of this sample to 32
## (or as a hexadecimal: 0x20):

volume(PTSample(mod.intro, 1)) <- 0x20

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.