Stockhausen Studie II Generator — User Guide
A dual-mode generator inspired by Karlheinz Stockhausen's Studie II (1954). Serial mode is a historically informed model built from an 81-degree exponential scale, five-sine tone mixtures, five-part grouping, and tape-time references; Random mode reuses related materials for stochastic composition.
What this does
The script synthesizes mono compositions from five-sine Tongemische (tone mixtures). Each mixture contains five frequencies selected from a fixed 81-degree scale. The scale itself is exponential rather than octave-tempered.
Random mode: creative stochastic generator using related scale, mixture-width, envelope, and grouping ideas.
No input Sound is required. Both modes generate the event plan first, then globally rescale event times to fit the requested output duration before rendering the audio.
Quick start
- Run
Stockhausen_Studie_II_Generator.praat. - Choose Random or Serial.
- Set the requested Duration.
- Enable Edit details to change sample rate, base frequency, amplitude range, Random-mode group count, Serial rotation offset, reverb model, partial-level model, Output peak, or Random seed.
- Run the script. The score can be drawn and the final mono Sound can be played automatically.
The 81-degree frequency scale
The generator builds 81 frequencies from:
With the historical-style default Base frequency of 100 Hz, the scale runs from 100 Hz to approximately 17.25 kHz.
5^(1/25).
The script requires the highest of all 81 scale frequencies to remain below 95% of Nyquist. If the complete scale is unsafe at the selected Sample rate, generation stops rather than truncating or rescaling the upper degrees.
Five-sine tone mixtures
Every event contains five sinusoidal components chosen from the 81-degree scale.
In Serial mode, a mixture is centered on one selected scale degree and uses one of five width classes:
The spacing is therefore equal in scale-degree distance and geometric in Hz.
Partial levels
Equal partial levels is enabled by default. All five sine components then receive the same event amplitude.
If this option is disabled, the script applies the older AudioTools center-weighted model:
The equal-level setting is the historically motivated choice; the center-weighted option is retained as a creative alternative.
Serial mode — historically informed model
Serial mode is deterministic in its musical event generation. It begins with the five-number seed:
The script rotates this row to form a 5×5 square and cycles through the resulting token stream. Tokens are reused for mixture width, number of mixtures, pitch register, duration class, amplitude class, envelope direction, gaps, and vertical staggering.
Formal hierarchy
The intended structural hierarchy is:
Mixture width is held constant inside a group and changes from group to group.
| Section | Current model behavior |
|---|---|
| I | Horizontal, linked mixtures. |
| II | Vertical, overlapping mixtures. |
| III | Horizontal mixtures separated by serially derived gaps. |
| IV | Vertical, overlapping mixtures. |
| V | Alternates linked-horizontal and vertical groups. |
Explicit model choices
The script itself marks several places where the Serial mode deliberately simplifies the historical composition:
- Pitch register: one of five fixed center indices — 15, 28, 41, 54, or 67 — selected from the token stream. This is not the historical starting-degree series.
- Duration classes:
1, 2, 4, 8, 16 × baseTimeUnit. This compact five-class model is not the historical duration table. - Envelope mapping: the five-valued token is reduced to two idealized directions: falling or rising.
- Requested Duration: the generated structure is globally time-scaled to occupy about 98% of the user-selected output duration.
Random mode
Random mode keeps the same 81-degree frequency pool and five-component mixture concept but replaces the serial scheduler with stochastic groups.
For each group:
- group type is randomly horizontal or vertical;
- number of mixtures is uniformly chosen from 1–5;
- mixture width is uniformly chosen from 1–5 scale degrees;
- starting scale region is randomized within a safe middle range;
- amplitude is drawn uniformly between Minimum and Maximum event amplitude;
- one of five creative envelope types is chosen;
- horizontal groups use sequential events and random gaps;
- vertical groups use overlapping events with random stagger.
Random-mode groups are generated until either the requested group count is exhausted or the time cursor reaches the requested Duration. The complete event plan is then globally time-scaled to fill approximately 98% of the Duration.
Event envelopes
Random mode
Random mode chooses among five envelope classes:
| Type | Actual implementation |
|---|---|
| 1 | Flat body with short fade-in and fade-out. |
| 2 | Linear rise to full level over 72% of the event, then short 10 ms fade-out. |
| 3 | Exponential decay with short onset and closing fades. |
| 4 | Triangular envelope peaking at the event midpoint. |
| 5 | Nearly gated shape with very short attack and release. |
Serial mode
Serial mode uses two idealized reverberant-envelope directions:
For the rising version, the sine phase is shifted by the event duration so the synthesized component follows the time-reversed envelope model without otherwise changing its frequency.
Post-mix reverb models
Default: light dry + taps
With Wet-only reverb model = off, the output is a creative post-mix effect:
This is a short feed-forward delay treatment, not a reconstruction of the historical reverberation chamber.
Wet-only model
When enabled, the dry signal is removed and replaced by twelve attenuated delayed copies, spanning approximately 23–144 ms, followed by a short 20 ms output fade-in.
This setting is conceptually closer to the historical removal of the direct signal, but the code explicitly treats it as a creative digital approximation, not a model of the actual room, microphones, tape path, or roughly ten-second reverberation decay used in the original realization.
Controls
Main page
| Control | Default | Meaning |
|---|---|---|
| Generation mode | Random | Random creative mode or Serial historically informed model. |
| Duration | 10 s | Final Sound duration and target span for global time scaling. |
| Edit details | off | Opens model/audio controls. |
| Draw score | on | Draws the two-system score/QC visualization. |
| Play result | on | Plays the generated Sound. |
Details page
| Control | Default | Meaning |
|---|---|---|
| Sample rate | 44100 Hz | Direct synthesis and final output rate; minimum 8000 Hz. |
| Base frequency | 100 Hz | Degree 1 of the 81-tone scale. |
| Minimum / Maximum event amplitude | .10 / .30 | Random-mode amplitude range; Serial mode maps tokens across the same interval. |
| Random-mode groups | 7 | Requested group count in Random mode. |
| Serial rotation offset | 0 | Changes the starting row of the simplified five-number token square; effectively reduced modulo 5. |
| Wet-only reverb model | off | Selects the twelve-tap no-dry model instead of the default light dry+tap treatment. |
| Equal partial levels | on | Historical-style equal level for all five sine components. |
| Output peak | .95 | Final target peak normalization. |
| Random seed | 0 | 0 = unpredictable Random-mode realization; positive = repeatable Random-mode realization. |
Serial musical content is deterministic for a fixed rotation offset; Random seed primarily matters to Random mode.
Timing, tape reference, and final level
Tape-time reference
The script retains the historical tape-speed reference:
Serial-model duration classes and several gaps/staggers are derived from this base unit before the global fit-to-Duration scaling is applied.
Global time fitting
After event generation, the script measures the latest event end. If that span differs from the requested Duration, all event onsets and durations are multiplied by one common scale factor so the generated span becomes approximately 98% of the output duration.
This means the final timing is not a literal tape-time realization even in Serial mode.
Output level
After the selected post-mix reverb model, the complete non-silent mono Sound is always:
This is target peak normalization, not a down-only protection ceiling.
Score visualization
The current score is deliberately modeled after the two-system logic of the published realization score while also making the script's model choices visible.
Upper system — tone mixtures
- Vertical axis is logarithmic frequency across all 81 scale degrees.
- Every mixture is a box spanning its five component frequencies and its actual scheduled duration.
- Five horizontal rules inside each box show the five sine components.
- In Serial mode, the five sections are banded and marked I–V.
- Color has exactly one semantic role: it identifies mixture width class I–V. The historical score itself was monochrome.
Tape ruler
A separate middle strip shows the same horizontal span as both centimetres of tape at 76.2 cm/s and seconds.
Lower system — amplitude
One amplitude shape is drawn for each mixture in dB, using the same width-class color as the upper system.
Fidelity / QC strip
The bottom strip explicitly separates FROM THE SOURCES from MODEL CHOICES. It also reports event count, tape-span equivalent, final peak, and RMS.
Among the model choices displayed there are the five fixed pitch registers, compact duration classes, and idealized envelope directions.
Historical context
Stockhausen composed and realized Studie II in Cologne in 1954. The Stockhausen-Verlag catalogue identifies it as work 3/II and gives the authorized duration as approximately 3 minutes 20 seconds. A realization score was subsequently published by Universal Edition in 1956.
The work is notable for building its sonic material from a deliberately constructed frequency system rather than from equal temperament. The 81-degree scale begins at 100 Hz and advances by the fixed ratio 5^(1/25), reaching roughly 17.2 kHz. Tone mixtures contain five sine components separated by one of five scale-degree widths, and the five-part formal design extends the pervasive role of the number five.
The original realization was inseparable from studio practice. The sine components were recorded and processed through a reverberation chamber; sources discussing the realization describe Stockhausen's instruction for a long, regular reverberation response and the removal of the direct sine-wave portion so that the reverberant result became the usable material. Modern re-realizations have shown that these apparently precise instructions still leave substantial technical and interpretive decisions.
Further reading
- Stockhausen, K. (1954). Studie II, work 3/II. Current score edition listed by Stockhausen-Verlag. The Verlag catalogue identifies the work as electronic music and gives a duration of 3′20″.
- Toop, R. (1979). “Stockhausen and the Sine-Wave: The Story of an Ambiguous Relationship.” The Musical Quarterly, 65(3), 379–391. DOI: 10.1093/mq/LXV.3.379.
- Heintz, J. (2010). “Re-Generating Stockhausen's Studie II in Csound: A Study About Algorithmic Composition.” Proceedings of the Linux Audio Conference 2010, 64–74.
- Williams, S. (2016). “Interpretation and Performance Practice in Realizing Stockhausen's Studie II.” Journal of the Royal Musical Association, 141(2), 445–481. DOI: 10.1080/02690403.2016.1216059.