as.soundSample: Cast to a sound sample

View source: R/class_soundSample.R

as.soundSampleR Documentation

Cast to a sound sample

Description

Convert a tuneR::Wave object into a soundSample.

Usage

as.soundSample(w, pan = 0)

Arguments

w

tuneR Wave object

pan

Numeric in [-1;1], panoramic. -1 (resp. 1) only select the left (resp. right) channel of w (if the latter is stereo). 0 averages both channels

Value

An object of class 'soundSample'.

Examples

w <- tuneR::Wave(left=sin(2*pi*seq(0,1,,44100)*440)) # 1-second A
sam <- as.soundSample(w)
plot(sam)

benRenard/sequenceR documentation built on Jan. 11, 2025, 2:33 a.m.