Wave {tuneR}R Documentation

Constructors and coercion for class Wave objects

Description

Constructors and coercion for class Wave objects

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.

Value

An object of Wave-class.

Author(s)

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

See Also

Wave-class, 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

# or more easily:
Wobj <- sine(440, bit = 16)

[Package tuneR version 0.2-10 Index]