CCRMA

Music 220b: Lecture Notes 3


Envelopes, SynthPatches, review of Stella's Algorithm


An introduction to Synthpatches

The MusicKit provides us with a scorefile format (complete details of the scorefile format can be found in the MusicKit documentation).

The MusicKit also provides a basic set of prebuilt "instruments" called synthpatches. There are four different kinds of synthpatches:

Wave Table Synthesis
a single cycle of a waveform is stored into a table and "played" over and over again to generate sound. There's a built in sample database you can use.
Frequency Modulation
extreme vibrato... you have synthpatches for one modulator and two modulators (this last case with cascade or parallel arrangements)
Pluck Parameters
an example of physical modeling synthesis, a plucked string.
Waveshaping
this one implements non-linear distortion synthesis, which means that it produces sound by using an oscillator to drive a lookup table
Of course it is also possible to create your own unique synthpatch by using SynthBuilder, but we'll skip that for now...

Envelopes: Amplitude, Frequency and Spectral

Time-varying envelopes for amplitude and frequency can be applied to WaveTable and FM SynthPatches. The application /LocalApps/EnvelopeEd can be used to display and edit envelopes graphically. Spectral envelopes specify the steady-state harmonic content of a WaveTable and can be graphically edited with the application /LocalApps/WaveEdit.app

Envelope data in either application is in the form of text and is copied via cut & paste to your text file (that would usually consist of input to Stella). Before writing MusicKit scores with Stella, it is important to understand release segment timing and "stick points." For review, see LocalLibrary/Documentation/MusicKit/Concepts/MusicData.rtfd (open it in the file browser... it's not working correctly as a hyperlink from this document).

WaveTable Synthesis

wave1.lisp uses a clarinet-like sound in which each note consists only of the first 6 odd-numbered harmonics. The spectral envelope is defined as a MusicKit WaveTable, specified in the lisp file's header expression. The format of a WaveTable is triplets of harmonic {number, amplitude, phase (optional)} for up to 256 harmonics. Note that these are always integer multiples of the fundamental frequency, no non-harmonic partials are possible.

Review: an algorithm in Stella

The same example introduces a new Stella container, algorithm. The structure is:
(algorithm <name of algorithm> <SynthPatch> 
	   (<list of SynthPatch parameters paired with constant values>)
	   (setf <list of SynthPatch parameters paired with values changing note-by-note>) 
	   )
The algorithm will iterate once for each note that it's supposed to create. The number of notes needs to be set to be finite or you will see Stella say...
  Stella [Top-Level]: Warning: A nonterminating algorithm is probably
  being defined. You may have forgotten to specify a kill statement or
  to provide initial values for the end or length slots. Unless you have
  specified some stopping condition, this algorithm will produce
  268435455 notes.

Assignment:

Explore the missing fundamental effect with a wavetable example. See if you can create a recognizable, singable tune with a small group of harmonics above harmonic number 15 (or higher). Move these around in the spectrum and see if the sense of a fundamental remains intact. We'll play some of these mystery tunes in class next week, please submit a version.


©1995 Fernando Lopez-Lezcano. All Rights Reserved.
nando@ccrma.stanford.edu