data2Wave: Convert data into a Wave object

Description Usage Arguments Value Examples

View source: R/data2Wave.R

Description

Make a sequence of data into a normalised Wave object.

Usage

1
2
3
4
5
6
7
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

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

sonicscrewdriver documentation built on May 2, 2021, 5:06 p.m.