This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
Name | Waveform |
||||
---|---|---|---|---|---|
Examples | import processing.sound.*; SoundFile sample; Waveform waveform; int samples = 100; public void setup() { size(640, 360); background(255); sample = new SoundFile(this, "beat.aiff"); sample.loop(); waveform = new Waveform(this, samples); waveform.input(sample); } public void draw() { background(0); stroke(255); strokeWeight(2); noFill(); waveform.analyze(); beginShape(); for(int i = 0; i < samples; i++) { vertex( map(i, 0, samples, 0, width), map(waveform.data[i], -1, 1, 0, height) ); } endShape(); } | ||||
Description | This is a Waveform analyzer. It returns the waveform of the of an audio stream the moment it is queried with the analyze() method. | ||||
Constructor | Waveform(parent, nsamples) | ||||
Parameters |
|

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.