All Implemented Interfaces:
Modulator

This is a volume analyzer. It tracks the peaks of an input signal, which is a simple measure of the overall amplitude of that signal.

  • Constructor Summary

    Constructors

  • Method Summary

    float

    analyze()

    Queries a value from the analyzer and returns a float between 0.

    void

    halfLife(float value)

    Sets the half-life of this amplitude analyzer.

    void

    Define the audio input for the analyzer.

  • Constructor Details

    • Amplitude

      public Amplitude(PApplet parent)

      Parameters:
      parent - typically use "this"
  • Method Details

    • halfLife

      public void halfLife(float value)

      Sets the half-life of this amplitude analyzer. The output approaches zero based on the value on halfLife. The default value is 0.1.

    • analyze

      public float analyze()

      Queries a value from the analyzer and returns a float between 0. and 1.

      Returns:
      amp An amplitude value between 0-1.
    • input

      Define the audio input for the analyzer.

      Overrides:
      input in class Analyzer
      Parameters:
      input - the input sound source. Can be an oscillator, noise generator, SoundFile or AudioIn.
    • getModulator

      Specified by:
      getModulator in interface Modulator