Wave-class {tuneR}R Documentation

Class Wave and constructors

Description

Class “Wave” and its constructor functions

Usage

Wave(left, ...)
## S4 method for signature 'numeric':
Wave(left, right = numeric(0), samp.rate = 44100, bit = 16, ...)

Arguments

left, right, samp.rate, bit See Section “Slots”.
... Further arguments to be passed to the default method Wave.default.

Objects from the Class

Objects can be created by calls of the form new("Wave", ...), or more conveniently using the function Wave.

Slots

left:
Object of class "numeric" representing the left channel.
right:
Object of class "numeric" representing the right channel, NULL if mono.
stereo:
Object of class "logical" indicating whether this is a stereo (two channels) or mono representation.
samp.rate:
Object of class "numeric" - the sampling rate, e.g. 44100 for CD quality.
bit:
Object of class "numeric", common is 16 for CD quality, or 8 for a rather rough representation.

Author(s)

Uwe Ligges, ligges@statistik.uni-dortmund.de

See Also

writeWave, readWave

Examples

# constructing a Wave object (1 sec.) containing sinus sound with 440Hz:
x <- seq(0, 2*pi, length = 44100)
channel <- round(32000 * sin(440 * x))
Wobj <- Wave(left = channel)
Wobj

[Package Contents]