
Generated time-shifted versions of a Wave-like object
Source:R/generateTimeShift.R
generateTimeShift.RdGiven 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")Arguments
- wave
A Wave or WaveMC object, or a list of such 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
typeis "silent". One of "start", "end", or "both". If "both" two versions are generated for each amount.
Details
Each shifted wave is a process of its own, so a TaggedWave or
TaggedWaveMC gives back waves that each record the shift that made them,
as described in tagApply().