2. Why ModulatorP5?
Inspired by my experience as an electronic musician.
Driven out of creating sketches for a performance at
the Milwaukee Avenue Arts Fest.
I missed LFO’s (Low Frequency Oscillators.)
Also wanted an easy way to “tap in” to audio analysis
data without a lot of work.
3. Why a Processing library?
Building a Processing library isn’t nearly as hard as it
might look.
It pushes all the boilerplate repetitive code out of your
sketch, and into one definitive place.
An easy way to get access to the power of Java, while
keeping your sketches feeling “light-weight.”
4. What can it do?
Sine/Cosine and Perlin Noise LFO-type Modulators
with adjustable rate and modulation amount.
Audio Analysis Modulator with adjustable frequency
range, easing and modulation amount.
Add a control UI for any Modulator in one line of code.
7. The Code - Setup
// “this” is a reference to the sketch (PApplet)
minim = new Minim(this);
input = minim.getLineIn();
controlP5 = new ControlP5(this);
modP5 = new ModulatorP5(this, controlP5, minim, input);
9. The Code - Control Panel
modP5.createControlPanel(20, 200, "P-Size (Osc)", sizeOsc);
10. No other code is needed!
I wanted ModulatorP5 to require a fair amount of
configuration and setup in setup() up front.
Once it is up and running, nothing needs to be done in
the draw() loop.
That’s not quite true - behind the scenes ModulatorP5
taps into the draw() loop, but it’s hidden from your
sketch.
11. Audio Analysis
One caveat. There is a lot of room for improvement in
the current version of the Audio Analysis code, both in
the API and under the hood.
Audio Analysis comes down to picking a frequency
range, easing, and modulation amount.
Currently supported frequency ranges are: sub-bass,
bass, mids and highs.
15. Plans for the future
Remove the ControlP5 dependency and replace with a
custom UI.
Support more diverse waveforms like Saw, Square,
Sample-and-hold, and maybe simple FM synthesis.
More sophisticated audio analysis, including setting
frequency start and end bands, and multi-band
analysis returning an array of values.
16. Don’t be afraid to dive in
and build your own library.
Even if you’re the only one who is ever going to use it.
Push overly complicated logic out of your sketches.
Reuse your code!
Get more ambitious with your architecture, with Java
you get generics, interfaces, enums and more.
The Processing Library Template for Eclipse gets you
up and running quickly.