Class Amplitude

java.lang.Object
processing.sound.Analyzer
processing.sound.Amplitude
All Implemented Interfaces:
Modulator

public class Amplitude extends Analyzer implements 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 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

      public void input(SoundObject 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

      public UnitOutputPort getModulator()
      Specified by:
      getModulator in interface Modulator