Skip to contents

Given a Wave-like object (or list of Wave-like objects), this function generates time-shifted versions of the object. The time-shifted versions are generated by adding a constant amount of time to the start or end of the object. This is achieved by either inserting silence and truncating the object to the original length, or by rotating the audio within the object.

Usage

generateTimeShift(
  wave,
  type = "silent",
  amount = c(1, 2),
  where = "start",
  output = "list"
)

Arguments

wave

A Wave-like object or list of Wave-like objects.

type

The type of time-shift to apply. Either "silent" or "rotate".

amount

Vector of amount of time to shift by (seconds).

where

Where to insert silence if type is "silent".

output

Return a list.

Value

A Wave-like object or list of Wave-like objects.