User Guide

11. OSW Tutorial Patches

Note: OSW must be running in order for tutorial-patch links to function properly.

Audio

audio/additive.osw
A simple harmonic additive synthesizer in which the frequency of each partial is a multiple of the fundamental. Use the sliders to increase or decrease the contribution of each partial to the overall sound.
audio/allpass_filter.osw
Demonstrates use of feed-forward and feedback comb filters to create allpass filter. This patch is intended for tutorial purposes. For real applications, use the Allpass transform.
audio/am.osw
The amplitude of a sine wave is modulated by another waveform. The user can change both the shape and frequency of the modulator. At low frequencies, the result is a tremolo effect. At higher frequencies, the modulation becomes part of the timbre of the source signal; this technique is known as ring modulation.
audio/amplifier.osw
Two methods for amplifying/attenuating a signal: the multiplication operator and the Gain transform.
audio/amp_envelope.osw
Use of the Lines transform to create a simple amplitude envelope.
audio/biquad_explore.osw
Use the sliders to change the values of the biquad coefficients and observe on the scope how the frequency response changes.
audio/calc_bandpass.osw
Calculate biquad coefficients for a 2nd order bandpass filter. This patch uses the same formula as the Bandpass transform.
audio/calc_notch.osw
Calculate biquad coefficients for a 2nd order notch filter.
audio/decaying_pulses.osw
A delay line is used to create a sequence of decaying pulses. If the delay time is short enough, then the pulses will be heard as a single sound with a fundamental pitch period (inverse of the frequency) equal to the delay time.
audio/dust.osw
This patch uses a comparison operator on a noise source to create "extremeley low-passed noise". The result sounds like scratches or dust on a vinyl record. The "dust" signal can also be used as a random-time series of pulses to excite resonators, etc.
audio/dust_demo.osw
A demo patch that uses the dust signal generator described above.
audio/echo_machine.osw
Use of a feedback delay line to create an "echo" effect.
audio/fast_convolution.osw
Using multiplication of frequency-domain spectra for fast convolution of signals.
audio/feedback_loop.osw
audio/feed_back.osw
A feedback delay line.
audio/feed_forward.osw
A feed-forward delay line.
audio/flanger1.osw
Flanger with a single comb-filter stage.
audio/flanger_demo.osw
Demo patch that incorporates flanger tutorial. For real applications requiring a flange effect, use of the fx::Flanger transform is recommended.
audio/fm.osw
A phase-modulation synthesizer, often referred to as "frequency modulation". A sinusoid called a modulator is used to alter the perceived frequency of another signal called a carrier by changing the phase input to a wavetable. The amplitude of modulator determines how much modulation is applied to the carrier, and it's frequency is set as a user-set proportion of the current carrier frequency.
audio/lfo_filter_sweep.osw
Use of an LFO to sweep the center frequency of a bandpass filter. Experiment with different LFO waveforms and frequencies. It's fun!
audio/lofi_crusher.osw
Lower the effective sample rate and bit resolution of a signal. This simple "lo-fi" effect is currently quite popular in electronic music.
audio/looping.osw
Playback and control of a sample loop. Includes time/pitch scaling via time machines.
audio/mixing_two_signals.osw
Using the synchronous addition operator to mix two signals. In general, use of Mixer is preferred.
audio/noisy_resonances.osw
A noise signal is used to excite a bank of resonant filters. The effect sounds vaguely like blowing into a resonant chamber. Replace the noise with an impulse to hear how the same resonant system sounds when struck.
audio/phaser1.osw
Phase shifter with single allpass stage.
audio/phaser6.osw
Phase shifter with six allpass stages. Similar to fx::PhaseShifter transform.
audio/phase_shifter_1_demo.osw
Demo using single-stage phase-shifter patch.
audio/phase_shifter_6_demo.osw
Demo using six-stage phase-shifter patch.
audio/pulse_train.osw
Using the sinc table to produce a pseudo-pulse-train signal.
audio/pwm.osw
A classic "pulse-width modulation" effect using the Square transform.
audio/recording.osw
A simple example of recording audio input to a file in OSW.
audio/ring_modulator.osw
This patch multiplies an incoming signal by a sinewave of variable frequency. The result is a classic "ring modulation" effect. Note that because two synchronous signals are being multiplied, the synchronous multiplication operator '* is used.
audio/signal_compare.osw
Use of a comparison operator with signals.
audio/signal_exp.osw
Applying the exponentiation operator (^) to signals. Note the behavior of even and odd exponents on a sinewave input.
audio/signal_sym_shift.osw
As the source signal is bit-shifted in one direction and then another, information from the original signal is lost. Large bit shifts create a "lo-fi" effect.
audio/signal_xor.osw
Application of the bitwise XOR operator to signals.
audio/simple_fm.osw
Simple FM synthesis in which a sinusoid modulates the frequency of the another sinusoid.
audio/step_modulated_pulses.osw
Use of the step modulator to select frequencies for a sequence of notes synthesized using the decaying pulses algorithm.
audio/step_modulated_sinewave.osw
Application of the step modulator to the frequency of a sinewave.
audio/step_modulator.osw
A modulation algorithm that returns random integers within a specified range at a variable frequency. This is similar to the "random" waveform in the LFO transform.
audio/swiss_cheese.osw
Application of a bit mask to a signal via the bitwise-AND operator.
audio/tanh_distortion.osw
Simple saturation/distortion by applying Tanh to signals.
audio/time_varying_sinusoid.osw
Sinusoid with variable frequency and amplitude.
audio/variable_allpass_demo.osw
Demo that incorporates allpass tutorial patch. Phase-scaling (delay) properties of allpass are demonstrated by changing allpass coefficient input.
audio/waveshaping_synthesis.osw
Using the WaveTable transform for more general waveshaping synthesis.

Control Flow

control/activepassive.osw
This patch demonstrates the different behaviors of active and passive inlets using an arithmetic operator.
control/detecting_change.osw
The patch detects when there is a change in a stream of input events.

Lists

list/duplicate_elements.osw
Use list transforms to remove duplicate elements.
list/empty_lists.osw
Defining empty lists and applying common list transforms to them.
list/list_arithmetic.osw
Apply arithmetic operators to lists. This results in the list containing the rsults of the operator applied to each element. Operations with two list inputs perform element-by-element operations on both lists.
list/list_cons_expr.osw
Using expressions in the Expr transform to construct lists.
list/list_cons_simple.osw
Compare list definition with Expr and List.
list/list_index_expr.osw
Extracting elements from lists via expressions.
list/list_singleton.osw
A list with a single element.
list/series_approx_1.osw
Approximation of the power series (1/2)n.
list/series_approx_2.osw
Approximation of the series (1/n)2. It's actually rather interesting.
list/series_approx_general.osw
Generalized power-series approximation.
list/sum.osw
A handy little patch that accepts lists and outputs the sum of all the elements in the list. The list::Fold transform is used.

Arithmetic and Mathematical

math/approx_e.osw
A Taylor-series approximation of e.
math/bessel_function.osw
This patch calculates Bessel functions of the 1st kind using a summation approximation. It is not particularly efficient, but demonstrates the use of list transforms in approximate calculations.
math/factorial.osw
Use the This transform to create a recursive patch that implements factorial. This technique is intended as a tutorial, for efficient factorial use the "!" operator of Expr.
math/fib.osw
Use the This transform to create a recursive patch that calculates fibonacci numbers. This technique is more pedagogical than practical; to calculate fibonacci numbers efficiently use the well-known formula based on exponentiation of the golden ratio.
math/hyperb_identities.osw
Various identities on hyperbolic functions.
math/mathexpr1.osw
Compare and contrast two subpatches. One using arithemetic and math-function transforms, one using an expression.
math/slow_bessel_demo.osw
This demo uses the bessel_function tutorial patch. Graphs of resulting Bessel functions are displayed in an inline table. Note: when we say slow we mean it.
math/sum.osw
A handy little patch that accepts lists and outputs the sum of all the elements in the list. The list::Fold transform is used.
math/trig_identities.osw
Various trigonometric identities demonstrated as OSW patches.

MIDI

midi/midi_transpose.osw
Incoming note messages are transposed up a perfect fifth.

Musical-note Processing

music/19_tone.osw
Convert MIDI notes into consecutive pitches in a 19-tone scale. This technique can be easily applied to other equal-temperament scales (e.g., 23-tone, 31-tone, etc.).
music/midi_score.osw
Render an OSW score via MIDI.
music/synth_score.osw
Render an OSW score using synthesis primities (e.g., a Sinewave).

OpenSound Control (OSC)

osc/autoserver.osw
Send messages to the built-in OSC server in OSW.
osc/dumpOSC.osw
A simple OSC server that outputs incoming OSC messages to the console.
osc/invisible_patch.osw
Create an "invisible patch" by sending OSC commands that instantiate and connect transforms.
osc/osc_scriptor.osw
Read a file of OSC commands (address + arguments) and send them to internal server.
osc/osc_server.osw
Create a custom OSC server in OSW.
osc/osc_signal.osw
Send signals via OSC.
osc/sendOSC.osw
Generic OSC client; can be used to control other OSC servers.

Virtual Time and Time Machines

time/rate_controls_pitch.osw
Changing the rate of a time machine that controls a sample player will alter the pitch.
time/switcheroo.osw
Turn various signal generators on or off by rerouting virtual time.

Open Sound World User Guide
© 2000-2004 Amar Chaudhary. All rights reserved.