Options
All
  • Public
  • Public/Protected
  • All
Menu

AFOnset (Audio File Onset) encapsulates a techniques.AudioFile instance, dividing the underlying source audio file into three regions delimited by onsetSeconds and releaseSeconds.

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

Using this technique in a score shifts the resulting audio item to the left on the timeline such that the audio file onset coincides with the the start of the event. This is useful for audio samples that have an "appoggiatura" that "leads in" to the musical onset of the sample.

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new AFOnset(audioFileTechnique: AudioFile, onsetSeconds?: number, releaseSeconds?: number): AFOnset
  • Note that .fadeInSeconds and .fadeOutSeconds, on the input file will be swapped when the audio file is reversed.

    Parameters

    • audioFileTechnique: AudioFile
    • Optional onsetSeconds: number
    • Optional releaseSeconds: number

    Returns AFOnset

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