Learn R Programming

tuneR (version 0.2-6)

Wave-class: Class Wave and constructors

Description

Class Wave and its constructor functions

Usage

Wave(left, ...)
## S3 method for class '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.

concept

  • Wave
  • channel
  • sampling
  • sampling rate
  • bit
  • stereo
  • mono
  • music
  • speech

See Also

writeWave, readWave

Examples

Run this code
# 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)

Run the code above in your browser using DataLab