The trapezoid~ object outputs a trapezoidal shape, rising linearly from 0 to 1 in a certain fraction of its time, then staying at 1, then falling linearly back to 0 in a fraction of its time. Its timing is driven by a control signal at its input, one that goes in a straight line from 0 to 1; so a phasor~ or a line~ is the obvious choice for input to trapezoid~. As the input goes from 0 to 1, the output draws the designated trapezoidal shape.
The phasor~ object produces a linear control signal that goes repeatedly from 0 to 1. That's demonstrated in the upper left part of this patch. In general, a control signal that goes gradually in a straight line from one value to another is quite useful, but you don't always want it to repeat over and over the way that phasor~ does.
Two oscillators with a ratio of frequencies that's an irrational number will never have exactly the same phase relationship. So, phasor~ objects that have an irrational frequency relationship, when combined, will create a rhythm that never exactly repeats. In this example, you can hear that the sum of the two phasor~ objects with a constantly changing relationship will create a constantly changing rhythm.
If you scale a one cycle of cosine wave by a factor of -0.5 and offset it by 0.5 you get a "Hanning function", which goes from 0 to 1 and back to 0 as smoothly as possible. That can be used to shape the amplitude of a sound, turning it on and off smoothly, or it can be used to modulate any characteristic of the sound.
This patch demonstrates wave interference with two cycle~ objects, and offers two ways of visualizing the audio signal, with scope~ or by creating your own scope with Jitter.
There are certain wave types that are historically used in electronic music, known as "classic" waveforms: sine, sawtooth, square, and triangle. These are the four waveforms generated by the classic Moog synthesizer oscillators, and are still quite useful in computer music.
The amplitude of a sound is controlled by multiplying the sound wave by a certain factor. A multiplier of 1 represents "unity gain", meaning no change. Multiplying by a factor between 0 and 1 reduces the amplitude of the sound. However, if the multiplier is changed very suddenly and significantly, it may create a sudden discontinuity in the waveform which will be heard as a high-frequency click.
This example demonstrates an easy setup for creating a testing tone. It has the ability to alter the tone's frequency and amplitude.
The trapezoid~ object allows you to make a control signal that rises to a certain level, stays there, then falls back to its initial level. That shape can be ueseful as an amplitude envelope or a filter envelope, for example. At its input trapezoid~ needs to be driven by a signal, usually a control signal that progresses from 0 to 1 in a straight line, such as phasor~ or line~.