Flute-like KlattGrid Serial Melody — User Guide
A twelve-tone melody generator coupled to a flute-like KlattGrid voice. A fixed 12-pitch-class seed is transformed, placed into a bounded tessitura, mapped to a five-value rhythmic palette, and rendered with a pitch-tracking source/filter model, vibrato, breath noise, first-note chiff, and true onset-preserving legato overlap.
What this does
Flute-like KlattGrid Serial Melody combines two mechanisms: a twelve-tone pitch/rhythm generator and a synthetic flute-like voice. In Melody mode it creates a 12-note phrase; with Melody mode off it renders one 2.5-second note at the exact Seed frequency.
Twelve-tone pitch process
The fixed seed row is:
These are pitch classes relative to C. The row contains all 12 pitch classes exactly once, but it is not an all-interval row. The older guide's “Webern Op.24 style / all-interval” description was incorrect.
What Seed frequency means in Melody mode
Seed frequency is a pitch-class anchor, not necessarily the first sounding frequency. The script converts the entered frequency to the nearest equal-tempered MIDI note and uses that note's pitch class to transpose the seed row. Base octave then controls the register used for the first transformed row member.
For Prime and Inversion, the transformed row begins on the anchor pitch class. Retrograde and Retrograde-Inversion begin with the final member of the corresponding forward row, so their first sounding pitch class is not the seed pitch class.
Row forms
| Form | Operation |
|---|---|
| Prime | The transposed seed row. |
| Inversion | Each transposed pitch class is reflected around the seed pitch-class anchor. |
| Retrograde | The transposed Prime row in reverse order. |
| Retrograde-Inversion | The transposed Inversion row in reverse order. |
Register placement
The 12 pitch classes are converted to equal-tempered MIDI pitches. After the first pitch is placed from Base octave, each following pitch class is placed in the nearest octave to the preceding note; if the direct placement is more than six semitones away, the script shifts it by an octave. The final tessitura is constrained to MIDI 48–96 (C3–C7).
Interval-derived rhythm
The rhythm is serially related to the transformed pitch row, but it is not a direct proportional mapping from semitone size to duration. The script first creates five evenly spaced rhythmic values between Min IOI and Max IOI:
palette = [Min,
Min + 1/4 range,
Min + 2/4 range,
Min + 3/4 range,
Max] × Duration scale
The directed pitch-class interval to the next row member then chooses one of those five values:
| Directed interval | Rhythm palette value |
|---|---|
| 1–2 semitones | 1st / shortest |
| 3–4 | 2nd |
| 5–7 | 3rd |
| 8–9 | 4th |
| 10–11 | 5th / longest |
For notes 1–11, the selected value is the true onset-to-onset interval (IOI). Note 12 uses the directed cyclic interval back to row member 1 to select the final duration of the phrase.
IOI + crossfade, while the next note still begins exactly one IOI after the previous onset.
Flute-like KlattGrid voice
Each note receives its own KlattGrid. Pitch is placed in the KlattGrid pitch tier, with a small first-note approach to the target and sampled sinusoidal vibrato. Voicing, aspiration, breathiness, and flutter are controlled by their corresponding KlattGrid tiers.
Pitch-tracking resonance ladder
The oral resonances are intentionally tied to F0 rather than representing measured fixed flute resonances:
| Resonance | Center | Bandwidth |
|---|---|---|
| 1 | 1.0 × F0 | 0.25 × F0 |
| 2 | 2.0 × F0 | 0.35 × F0 |
| 3 | 3.5 × F0 | 350 Hz |
| 4 | 5.5 × F0 | 500 Hz |
| 5 | 8.0 × F0 | 700 Hz |
The script works at a fixed 44.1 kHz sample rate and reserves practical headroom at 0.45 × Fs. A single note, or any generated melody, is rejected if the 8×F0 resonance would exceed that limit.
After KlattGrid synthesis the main tone is Hann-band filtered from 40 Hz to an adaptive upper frequency: the larger of 8 kHz or approximately 1.12× the fifth resonance, capped at the practical headroom frequency.
Vibrato and note envelopes
Pitch vibrato is specified in semitones and converted multiplicatively to frequency. The amplitude vibrato is correctly applied as an additive dB deviation around Voicing level rather than multiplying the absolute dB value.
The first note has a short pitch approach, voicing/aspiration/breathiness attack, sustain, and release inside its KlattGrid. Later legato notes begin at their sustain levels immediately; their inter-note fade is supplied by the external overlap window. The final note is ended by the script's short phrase-edge protection fade.
First-note chiff
Chiff is added only when do_attack is true — the first note of a melody, or the standalone note in single-note mode. Later legato notes contain no new chiff.
| Layer | Current implementation |
|---|---|
| Chiff A | Gaussian turbulence filtered from approximately 0.7×F0 to 4×F0. Its duration is short-note-safe: up to 20 ms, then exponentially decayed and peak-calibrated to Chiff A peak. |
| Chiff B | A second two-resonance KlattGrid that sweeps from 0.60×F0 to F0 over up to 60 ms, with a brief voicing envelope. It is peak-calibrated to Chiff B peak. |
| Chiff C | High-frequency Gaussian frication, filtered up to 9 kHz/practical headroom, lasting up to 15 ms and exponentially decayed before peak calibration. |
The three layers are summed directly into the mono main tone by sample index. There is no temporary multichannel combine/downmix trick in the current version.
Random seed controls all stochastic breath/chiff synthesis. Zero uses an unpredictable state; a positive seed makes the stochastic components reproducible, after which Praat's unpredictable random initialization is restored.
Legato overlap and phrase timing
The crossfade is:
min(50 ms, 20% of the minimum scaled IOI)
For every note except the last, that overlap is added to the note's sounding duration. The next note is nevertheless shifted to its true serial onset, so the two sounds overlap for the crossfade interval.
The amplitude windows are complementary raised-cosine curves:
fade in = 0.5 - 0.5*cos(pi*t/X) fade out = 0.5 + 0.5*cos(pi*t/X)
They sum to 1 at corresponding positions. This is a smooth complementary amplitude crossfade; it should not be confused with the sin/cos equal-power panning law used in some other AudioTools processors.
Presets
Presets set the seed/register, IOI range, Duration scale, KlattGrid voice controls, and chiff balances. They do not change Melody mode, Row form, Normalize output, Draw visualization, or Play result.
| Preset | Seed / octave | IOI range | Open phase | Vibrato rate / depth | Voice / aspiration sustain | Chiff A/B/C |
|---|---|---|---|---|---|---|
| Balanced Flute-like | 523.25 Hz / 5 | 0.20–0.80 s | 0.90 | 5.3 Hz / 0.25 st | 90 / 54 dB | 0.060 / 0.040 / 0.020 |
| Soft Historical Tone | 440 Hz / 4 | 0.22–0.75 s | 0.85 | 5.0 / 0.14 | 88 / 49 | 0.035 / 0.055 / 0.010 |
| Bright Folk Tone | 587.33 Hz / 5 | 0.15–0.50 s | 0.92 | 6.5 / 0.38 | 92 / 56 | 0.095 / 0.045 / 0.030 |
| Breathy Low Tone | 392 Hz / 4 | 0.30–1.20 s | 0.95 | 4.5 / 0.20 | 82 / 62 | 0.025 / 0.018 / 0.045 |
| High Bright Tone | 1046.50 Hz / 6 | 0.10–0.40 s | 0.88 | 7.2 / 0.30 | 94 / 48 | 0.075 / 0.060 / 0.040 |
| Mellow Low Tone | 261.63 Hz / 4 | 0.35–1.40 s | 0.96 | 4.0 / 0.15 | 85 / 58 | 0.018 / 0.018 / 0.010 |
| Glassy Air Tone | 523.25 Hz / 5 | 0.25–1.00 s | 0.98 | 3.0 / 0.08 | 79 / 65 | 0.010 / 0.010 / 0.055 |
All current presets use Duration scale = 1.0. They also set amplitude-vibrato depth, aspiration attack peak, and breathiness level; those values remain editable on the advanced page.
Controls
Compact launcher
| Control | Default | Meaning |
|---|---|---|
| Preset | Custom | Loads a voice/tessitura/rhythm configuration. |
| Melody mode | yes | 12-note serial phrase when on; exact-frequency 2.5 s standalone note when off. |
| Seed frequency | 523.25 Hz | Melody: nearest-MIDI pitch-class transposition anchor. Single note: exact F0. |
| Base octave | 5 | Register reference for the first transformed row member. |
| Row form | Prime | Prime, Inversion, Retrograde, or Retrograde-Inversion. |
| Min / Max IOI | 0.20 / 0.80 s | Endpoints of the five-value rhythmic palette. |
| Duration scale | 1.0 | Multiplies every palette value and therefore the phrase timing. |
| Edit voice and chiff | off | Opens the advanced page after preset application. |
| Normalize output | yes | Optional final phrase/single-note target peak normalization to 0.92. |
| Draw visualization | yes | Draw mechanism and measurement panels. |
| Play result | yes | Play final Sound. |
Advanced voice/chiff page
The advanced page exposes Open phase, pitch-vibrato rate/depth, amplitude-vibrato depth in dB, voicing level, aspiration sustain and attack peak, breathiness level, three chiff peak values, and Random seed. It opens after the selected preset is loaded, so it fine-tunes that preset rather than replacing it with generic defaults.
Level, channels, and output
Each synthesized note is intentionally peak-calibrated to 0.72 before overlap. This is a per-note calibration step, not the final phrase normalization. Chiff A, B, and C are also individually peak-calibrated to their requested peak values before they are mixed with the main first-note tone.
After the phrase is assembled, a short outer linear fade of at most 8 ms protects the beginning and end. If Normalize output is enabled, the complete result then receives Scale peak: 0.92, i.e. target peak normalization. With normalization disabled, the post-overlap raw phrase level is retained.
| Property | Behavior |
|---|---|
| Channels | Mono. |
| Sample rate | Fixed 44,100 Hz. |
| Melody duration | Sum of the 12 serial rhythmic cells; overlap does not extend the nominal phrase beyond the 12th cell. |
| Single-note duration | Fixed 2.5 s. |
| Melody name | flute_serial_melody. |
| Single-note name | flute_like_<nearest MIDI note name>; synthesis F0 still uses the exact entered frequency. |
Visualization and QC
| Panel | What it shows |
|---|---|
| A — Pitch + Rhythm | Actual note onset timing on a log-F0 axis. Each horizontal bar spans the serial rhythmic cell (IOI); note names are shown in Melody mode. |
| B — Source–Filter Model | The five actual pitch-tracking oral-resonance targets: 1×, 2×, 3.5×, 5.5×, and 8× F0. |
| C — Model → Measurement | Measured final-output spectrogram with actual nominal F0 guides overlaid. |
| D — Measured Output | Waveform after note overlap, edge protection, and the final level stage. |
The QC strip reports the KlattGrid mechanism, row form and 12/12 pitch-class uniqueness, phrase duration and overlap, vibrato, aspiration, seed state, and pre/post-normalization levels.
Further Reading
- Klatt, D. H. & Klatt, L. C. (1990). “Analysis, synthesis, and perception of voice quality variations among female and male talkers.” Journal of the Acoustical Society of America, 87, 820–857. DOI: 10.1121/1.398894. Relevant to the Klatt source/filter parameter family on which Praat's KlattGrid is based.
- Praat Manual — KlattGrid. Documents KlattGrid as a time-varying source/filter model with pitch, phonation/noise, and vocal-tract filter tiers.