data2WaveR Documentation

Convert data into a Wave object

Description

Make a sequence of data into a normalised Wave object.

Usage

data2Wave(
  left,
  samp.rate = 44100,
  bit = 16,
  remove.offset = TRUE,
  normalise = TRUE
)

Arguments

left

Data for audio channel

samp.rate

Sampling rate for Wave object

bit

Bit depth of Wave object

remove.offset

If TRUE any DC offset is removed

normalise

IF TRUE the output Wave is normalised using tuneR

Value

A mono Wave object.

Examples

pattern <- seq(from=-1, to=1, length.out=100)
data <- rep.int(pattern, 100)
w <- data2Wave(data)