Pitch Contour Graphic Score — Contemporary Notation
Transforms a sound's continuous pitch into a performable graphic score in the idiom of Ligeti / Crumb / Berberian / Aperghis: real 5-line staff with clefs, glissando contours, noteheads with accidentals, proportional time axis, and dynamic ribbon.
What this does
This script transforms a sound's continuous pitch and intensity into a performable graphic score in the tradition of contemporary vocal/instrumental notation (Ligeti, Crumb, Berberian, Aperghis). The output is a high-resolution PNG (optional) or Praat Picture that can be printed or embedded in a video.
- Real 5-line staff — treble, bass, or grand staff with clefs and ledger lines; pitch height maps to true staff position.
- Glissando contour — where pitch stabilises it becomes a notehead (with accidental); where it moves it becomes a slide line between noteheads.
- Proportional / spatial time — seconds, not metered bars; performer reads gestures left to right in real time.
- Dynamic ribbon — continuous hairpin envelope derived from intensity, with pp..ff reference band.
Key Features:
- 6 Notation Presets — Balanced, Sparse, Dense, Pure Glissando, Vocal, Custom
- Auto pitch range detection — two-pass analysis measures input and sets optimal floor/ceiling (Hirst method)
- Hold vs. glide segmentation — identifies sustained pitches vs. sliding gestures via tolerance + minimum duration
- Staff systems — treble, bass, or grand staff; proportional time axis with second marks
- Dynamic ribbon — intensity mapped to vertical band, log-compressed for musical loudness perception
- PNG export — 300/600 dpi, phrase-by-phrase export (render window) for multi-page scores
- Multiple orientations — Portrait (print/scroll) or Landscape HD 16:9 (video frame)
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
Pitch_Contour_Graphic_Score.praat. - Choose a notation preset (Balanced, Sparse, Dense, Pure Glissando, Vocal, or Custom).
- Select Staff_system (Treble only / Bass only / Grand staff).
- Select Orientation (Portrait for printing, Landscape HD for video).
- Optionally set Render_from_seconds and Render_to_seconds for phrase-by-phrase export.
- Set Seconds_per_system (default 6.0 s per horizontal system).
- Enable Save_png and choose a folder for high-resolution PNG output.
- Click OK — script analyses pitch, segments gestures, and draws the score.
6 Notation Presets
Hold vs. Glide Segmentation
Gesture segmentation algorithm
Contiguous voiced frames are analysed for holds (sustained pitches) and glides (sliding movements).
A hold is a maximal span where every frame's pitch deviation from the span's running mean is ≤ hold_tolerance_semitones AND the span duration ≥ min_hold_seconds.
If a segment fails either condition, all frames are classified as glide (drawn as continuous contour line).
Holds receive:
- A notehead (filled circle) at the mean pitch
- A sustain bar connecting noteheads across the hold duration
- Accidental (#) if the pitch class is sharp (C#, D#, F#, G#, A#)
- Optional note name text (e.g., "C4")
hold_tolerance_semitones— pitch stability threshold (0.3–0.5 semitones typical). Lower = stricter hold detection.min_hold_seconds— minimum duration for a hold (0.07–0.30 s). Longer = only sustained notes become noteheads.smoothing— pre-filter to reduce micro-fluctuation before segmentation.
Score Layout & Aesthetics
Staff system
- Treble only — for soprano, alto, violin, flute
- Bass only — for bass, cello, trombone
- Grand staff — treble + bass for piano or wide-range sources
Proportional time
- Horizontal axis = seconds (real time)
- Grey vertical ticks at integer seconds
- No barlines or time signatures — spatial reading
- Performers follow left-to-right as audio plays
Dynamic ribbon
- Purple contour under the staff
- Height = intensity (log-compressed for loudness perception)
- "pp" to "ff" reference band (intensity range adjustable)
- Continuous hairpin effect
Orientation & size
- Portrait — 8" wide, tall stacking for print/scroll
- Landscape HD 16:9 — 16"×9", ideal for video embedding
- Staff size — Small/Medium/Large
Render_from_seconds and Render_to_seconds to export only a window of the score (e.g., 0–30 s, then 30–60 s). The staff layout (clefs, pitch range) is computed from the entire file, so adjacent windows align perfectly — their staves share the same vertical pitch mapping, and second marks are continuous across exports. This allows you to generate multi-page PDFs or frame-accurate video overlays.
Applications
Contemporary classical composition
Use case: Notate an electroacoustic piece's pitch contour for live instrumentalist + fixed media.
Settings: Grand staff, Balanced preset, Portrait orientation. Export as PDF for the performer — they follow the glissando contour and noteheads while listening to the original recording.
Vocal transcription / pedagogy
Use case: Transcribe a sung melody into a performable vocal score.
Settings: Treble staff, Vocal preset (narrow tolerance, moderate hold duration). The score shows sustained pitches as noteheads (with accidentals) and portamenti as slides — exactly what a singer needs to interpret a rubato melody.
Music analysis / research
Use case: Visualise microtonal inflections, vibrato depth, or intonation drift in a corpus.
Settings: Pure Glissando preset (no noteheads), Dense detail, export as high-res PNG. The contour line shows every pitch fluctuation without interpretive segmentation.
Video score / performance documentation
Use case: Embed a synchronised graphic score in a video performance recording.
Settings: Landscape HD 16:9, Render window = video segment, PNG export at 300 dpi. Overlay the PNG as a picture-in-picture or full-screen during the performance.
Workflow: Voice → Vocal score for singer
Source: Soprano aria recording (monophonic).
Settings: Treble staff, Vocal preset (tolerance=0.3 st, min hold=0.18 s), Portrait orientation.
Result: A clean, readable score with noteheads for sustained pitches, glissandi for portamenti, dynamic ribbon for expression, and second marks for timing.
Workflow: Cello improvisation → graphic score for video
Source: Free improvisation on cello (wide range, glissandi).
Settings: Bass staff, Pure Glissando preset (no noteheads), Landscape HD, PNG export.
Result: A continuous sliding line matching the cello's pitch, synced with the audio — perfect for a performance video overlay.
Workflow: Long field recording → multi-page score
Source: 10-minute environmental recording with changing pitch content.
Settings: Grand staff, Balanced preset. Run script multiple times with Render windows: 0–60s, 60–120s, etc.
Result: Several PNGs that tile together perfectly (staff lines continuous, second marks sequential). Print them as a booklet.
• Score shows no noteheads (only glissando line): Increase min_hold_seconds or decrease hold_tolerance_semitones. The input may have continuous vibrato or pitch movement. Try Vocal preset for finer tolerance, or Dense preset for shorter holds.
• Noteheads placed at wrong pitch / wrong staff position: The script uses diatonic step mapping (C major ladder). Sharps are drawn with "#" accidental. For flat keys, edit the accidental logic in the script.
• Dynamic ribbon is flat / unresponsive: Adjust intensity_min_db and intensity_max_db (script defaults 40–80 dB). Use log compression for musical loudness.
• PNG export fails (file not written): Check that the folder exists and is writable. The folder chooser dialog helps avoid path errors.
• Auto pitch range produces strange floor/ceiling: If the sound is highly percussive or has very low/high pitch, the quartiles may be outliers. The script clamps to probe_floor/ceiling (50–800 Hz) as safety.
Technical notes: Pitch to staff mapping
- Each octave = 7 diatonic steps (C,D,E,F,G,A,B).
- Sharps share the line/space of their natural pitch, with "#" added.
- Continuous glissando lines interpolate between diatonic steps (fractional staff-Y).
- Staff range is autoscaled to the input's detected pitch range, with 2 semitone padding.