Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more Waveform analysis examples and class documentation #26

kevinstadler opened this issue Mar 18, 2019 · 1 comment


Copy link

@kevinstadler kevinstadler commented Mar 18, 2019

With the addition of the Waveform analysis class (see #21 and #22) it would be nice to add another example or two with the same simply waveform visualisation but of different inputs, for example an "OscillatorWaveform" example that's parallel to the "OscillatorSpectrum' one, and also an "AudioInputWaveform" one parallel to the existing "AudioInput" one.

In order for the new class' documentation to show up on the website, the corresponding .xml files also still need to be added to

@kevinstadler kevinstadler pinned this issue Mar 18, 2019
@kevinstadler kevinstadler changed the title Add more Waveform analysis examples and class documentation to processing-docs Add more Waveform analysis examples and class documentation Mar 18, 2019

This comment has been minimized.

Copy link

@mhamilt mhamilt commented Nov 8, 2019

I'm not to familiar with the architecture of processing-docs, but is this just a case of pulling in a file Waveform.xml with the content

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>





import processing.sound.*;

SoundFile sample;
Waveform waveform;

int samples = 100;

public void setup()
  size(640, 360);

  sample = new SoundFile(this, "beat.aiff");

  waveform = new Waveform(this, samples);

public void draw()


  for(int i = 0; i < samples; i++)
      map(i, 0, samples, 0, width),
      map([i], -1, 1, 0, height)

  This is a Waveform analyzer. It returns the waveform of the of an audio stream the moment it is queried with the analyze() method.




<mdescription>Define the audio input for the analyzer</mdescription>

<mdescription>Gets the content of the current audiobuffer from the input source, writes it
 into this Waveform's `data` array, and returns it.</mdescription>

<mdescription>Stop the analyzer</mdescription>

<mdescription>`float[]` of sample amplitudes between `-1` and `1`</mdescription>


<cdescription>PApplet: typically use "this"</cdescription>






Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.