Mono-Stereo

0th

Percentile

Converting (extracting, joining) stereo to mono and vice versa

Functions to extract a channel from a stereo Wave object, and to join channels of two monophonic Wave objects to a stereophonic one.

Keywords
manip, utilities
Usage
mono(object, which = c("left", "right", "both"))
stereo(left, right)
Arguments
object

Object of class Wave.

which

Character, indicating whether the “left” or “right” channel should be extracted, or whether “both” channels should be averaged.

left

Object of class Wave containing monophonic sound, to be used for the left channel.

right

Object of class Wave containing monophonic sound, to be used for the right channel (if missing, the left channel is duplicated). If right is missing, stereo returns whether left is stereo (TRUE) or mono (FALSE).

Details

For objects of WaveMC-class, a mono channel can be created by simple matrix indexing, e.g. WaveMCobject[,2] selects the second channel.

Value

An object of class Wave.

If argument right is missing in stereo, a logical values is returned that indicates whether left is stereo (TRUE) or mono (FALSE).

See Also

Wave-class, Wave

Aliases
  • mono
  • stereo
Examples
# NOT RUN {
Wobj <- sine(440)
Wobj
Wobj2 <- stereo(Wobj, Wobj)
Wobj2
mono(Wobj2, "right")
# }
Documentation reproduced from package tuneR, version 1.3.3, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.