WaveMC: Constructors and coercion for class WaveMC objects

Description Usage Arguments Value Author(s) See Also Examples

Description

Constructors and coercion for class WaveMC objects

Usage

1
2
3
WaveMC(data, ...)
## S4 method for signature 'matrix'
WaveMC(data = matrix(numeric(0), 0, 0), samp.rate = 44100, bit = 16, pcm = TRUE, ...)

Arguments

data

Except for a numeric matrix, the argument data can also be a numeric vector (for one channel), data.frame (columns representing channels), list (elements containing numeric vectors that represent the channels), or Wave object.

samp.rate, bit, pcm

See Section “Slots” on the help page WaveMC-class.

...

Further arguments to be passed to the matrix method.

Value

An object of WaveMC-class.

Author(s)

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

See Also

WaveMC-class, Wave-class, writeWave, readWave

Examples

1
2
3
4
5
# constructing a WaveMC object (1 sec.) containing sinus sound with 440Hz:
x <- seq(0, 2*pi, length = 44100)
channel <- round(32000 * sin(440 * x))
WMCobj <- WaveMC(data = channel)
WMCobj

Example output

Warning messages:
1: In .local(data, ...) : 'samp.rate' not specified, assuming 44100Hz
2: In .local(data, ...) : 'bit' not specified, assuming 16bit

WaveMC Object
	Number of Samples:      44100
	Duration (seconds):     1
	Samplingrate (Hertz):   44100
	Number of channels:     1
	PCM (integer format):   TRUE
	Bit (8/16/24/32/64):    16 

tuneR documentation built on May 2, 2019, 6:15 p.m.

Related to WaveMC in tuneR...