Package processing.sound
Class Amplitude
java.lang.Object
processing.sound.Analyzer
processing.sound.Amplitude
- 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
-
Method Summary
Modifier and TypeMethodDescriptionfloat
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
input
(SoundObject input) Define the audio input for the analyzer.
-
Constructor Details
-
Amplitude
- 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 is0.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. -
getModulator
- Specified by:
getModulator
in interfaceModulator
-