Options
All
  • Public
  • Public/Protected
  • All
Menu

AFReverse (Audio File Reverse) encapsulates the techniques.AudioFile instance passed in to the constructor. Like AFOnset, AFReverse divides the underlying source audio file into three regions delimited by onsetSeconds and releaseSeconds.

      onsetSeconds
├──────────┘         releaseSeconds
├───────────────────────────┘
├──attack──┼──────body──────┼─────────decay─────────┤

Using AFReverse as a technique will insert a reversed copy of the input audio file into the session. The reversed copy will be aligned such that the onset of the sound corresponds with the end of the triggering event.

This means that In the hypothetical example below, the onset of the sound would alight with the second beat in the measure. In practice, when you want to just insert a reversed audio file you can ignore this detail. However, if you want to precisely position the attack of a reversed sound, it can be helpful to specify a non-zero onsetSeconds in the AFReverse constructor.

const score = {
  r:      '1 + 2 + ',
  cymbal: ' a--    ',
}

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new AFReverse(audioFileTechnique: AudioFile, onsetSeconds?: number, releaseSeconds?: number): AFReverse

Properties

audioFile

audioFile: AudioFile

Accessors

onsetSeconds

  • get onsetSeconds(): number
  • set onsetSeconds(seconds: number): void
  • Time at which the sample's "body" begins, relative to the start of the source audio file.

    Returns number

  • Time at which the sample's "body" begins, relative to the start of the source audio file.

    Parameters

    • seconds: number

    Returns void

releaseSeconds

  • get releaseSeconds(): number
  • set releaseSeconds(seconds: number): void
  • Time at which the sample's "decay" begins, relative to the start of the source audio file.

    Returns number

  • Time at which the sample's "decay" begins, relative to the start of the source audio file.

    Parameters

    • seconds: number

    Returns void

Methods

use