stereo: Create a Stereo Sample Object from Two Mono Samples

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/sound.R

Description

Create a stereo Sample object, given the two channels as Sample objects or wav files.

Usage

1
stereo(sLeft, sRight, pan=50)

Arguments

sLeft

a Sample object or a string giving the name of a wav file. Used for the left channel.

sRight

a Sample object or a string giving the name of a wav file. Used for the right channel.

pan

a number between -50 and 50 describing the distance between the two sound sources.

Details

If abs(pan)<50, mixtures of the two sources are used for the left and the right channel so that they appear closer to the center. For pan=0, both sounds are at the center. If pan<0, left and right channel are interchanged afterwards.

If the samples have different sample parameters (bits, rate and channels), the command codefitSampleParameters is called to adjust them before the two samples are combined.

Value

a stereo Sample object.

Author(s)

Author: Matthias Heymann <mail@MatthiasHeymann.de>

Maintainer: Stefan Langenberg <langenberg@uni-bonn.de>

See Also

left, right, as.Sample, panorama

Examples

1
2
3
4
5
6
7
## Not run: 
sLeft <- Sine(440,1)
sRight <- Sine(220,1)
s <- stereo(sLeft,sRight)
play(s)

## End(Not run)

sound documentation built on May 2, 2019, 2:10 a.m.

Related to stereo in sound...