Wave

0th

Percentile

Constructors and coercion for class Wave objects

Constructors and coercion for class Wave objects

Keywords
methods
Usage
Wave(left, ...)
# S4 method for numeric
Wave(left, right = numeric(0), samp.rate = 44100, bit = 16, pcm = TRUE, ...)
Arguments
left, right, samp.rate, bit, pcm

See Section “Slots” on the help page Wave-class. Except for numeric, the argument left can also be a matrix (1 or 2 columns), data.frame (1 or 2 columns), list (1 or 2 elements), or WaveMC (1 or 2 channels) object representing the channels.

...

Further arguments to be passed to the numeric method.

Details

The class definition has been extended in tuneR version 1.0-0. Saved objects of class Wave generated with former versions can be updated with updateWave to match the new definition.

Value

An object of Wave-class.

See Also

Wave-class, WaveMC-class, writeWave, readWave, updateWave

Aliases
  • Wave
  • Wave,ANY-method
  • Wave,WaveMC-method
  • Wave,numeric-method
  • Wave,matrix-method
  • Wave,data.frame-method
  • Wave,list-method
  • [,Wave-method
  • coerce,matrix,Wave-method
  • coerce,data.frame,Wave-method
  • coerce,list,Wave-method
  • coerce,numeric,Wave-method
  • coerce,Wave,data.frame-method
  • coerce,Wave,matrix-method
  • coerce,WaveGeneral,list-method
  • coerce,Wave,WaveMC-method
Examples
# NOT RUN {
# 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)
# }
Documentation reproduced from package tuneR, version 1.3.3, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.