Return to IcarusMoth.com





Hover over the buttons to learn.

Oscillator Frequency

Created with the p5.js sound library, user can control an Oscillator and view the waveform, a Sin wave in this case, using FFT, a function which returns results from the frequency spectrum.

MouseX is mapped to frequency, mouseY is mapped to amplitude. 

Composition with P5

An Envelope is a series of fades, defined as time / value pairs.

In this example, the envelope will be used to "play" a note by controlling the output amplitude of an oscillator, using an oscillator that comes with the P5.js library.

The p5.Oscillator sends its output through an internal Web Audio GainNode (p5.Oscillator.output). By default, that node has a constant value of 0.5. It can be reset with the osc.amp() method. Or, in this example, an Envelope takes control of that node, turning the amplitude up and down like a volume knob.


Hover over the buttons for different scales and compositions.

A chord, in music, is any harmonic set of pitches consisting of multiple notes (also called "pitches") that are heard as if sounding simultaneously.

For many practical and theoretical purposes, arpeggios and broken chords (in which the notes of the chord are sounded one after the other, rather than simultaneously), or sequences of chord tones, may also be considered as chords.