milan477 commited on
Commit
f8f2d16
·
verified ·
1 Parent(s): d84fbd4

Add MAESTROCaps generation prompts and update dataset card

Browse files

Adds the structural-segmentation, auditory-analysis, and question-answer generation prompts and updates the MAESTROCaps dataset card.

README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- pretty_name: Maestro-Caps
3
  language:
4
  - en
5
  license: other
@@ -10,9 +10,9 @@ tags:
10
  - musicxml
11
  ---
12
 
13
- # Maestro-Caps
14
 
15
- This private dataset contains 148 analyzed piano piece-recordings. Dataset package IDs are
16
  consecutive from `001` through `148`, ordered alphabetically by `piece_key` (composer, then
17
  composition). Each `metadata.json` retains the prior ID as `source_catalog_id`, and
18
  `id-map.json` records the complete mapping. Each directory under `data/`
@@ -20,13 +20,13 @@ contains the existing artifacts available for that record:
20
 
21
  - original, annotated, and cleaned score XML files, plus existing score PDFs;
22
  - existing all-assessed and accepted score-change reports;
23
- - MuNo-S and MuNo-SP v65 representations;
24
- - the selected MuNo structural segmentation; and
25
- - the selected segmentation-aware long-form auditory analysis.
26
 
27
- No missing PDF or Markdown artifact was generated for this upload. Consult `manifest.json`
28
- for exact per-type coverage.
29
- No MIDI analysis timeline is included. `manifest.json` records source provenance, SHA-256
30
- hashes, byte sizes, representation versions, and model/provider metadata. Source copyrights
31
- and licenses remain with their respective datasets and score editions; no blanket license is
32
- asserted here.
 
1
  ---
2
+ pretty_name: MAESTROCaps
3
  language:
4
  - en
5
  license: other
 
10
  - musicxml
11
  ---
12
 
13
+ # MAESTROCaps
14
 
15
+ MAESTROCaps contains 148 analyzed piano piece-recordings. Dataset package IDs are
16
  consecutive from `001` through `148`, ordered alphabetically by `piece_key` (composer, then
17
  composition). Each `metadata.json` retains the prior ID as `source_catalog_id`, and
18
  `id-map.json` records the complete mapping. Each directory under `data/`
 
20
 
21
  - original, annotated, and cleaned score XML files, plus existing score PDFs;
22
  - existing all-assessed and accepted score-change reports;
23
+ - MuNo-S and MuNo-SP representations;
24
+ - the MuNo structural segmentation; and
25
+ - the segmentation-aware long-form auditory analysis.
26
 
27
+ The reusable generation prompts are provided under `prompts/` for structural segmentation,
28
+ long-form auditory analysis, and question-answer generation. Bracketed placeholders mark the
29
+ record-specific inputs supplied to each prompt.
30
+
31
+ Source copyrights and licenses remain with their respective datasets and score editions; no
32
+ blanket license is asserted here.
id-map.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "schema_version": 1,
3
- "description": "Mapping from alphabetical Maestro-Caps dataset IDs to original source catalog IDs and piece keys.",
4
  "id_scheme": {
5
  "field": "catalog_id",
6
  "format": "zero-padded sequential 001-148",
 
1
  {
2
  "schema_version": 1,
3
+ "description": "Mapping from alphabetical MAESTROCaps dataset IDs to original source catalog IDs and piece keys.",
4
  "id_scheme": {
5
  "field": "catalog_id",
6
  "format": "zero-padded sequential 001-148",
manifest.json CHANGED
@@ -1,9 +1,8 @@
1
  {
2
  "schema_version": 1,
3
  "dataset": "bryel-labs/MAESTROCaps",
4
- "private": true,
5
  "exported_at": "2026-09-02T01:17:49.755770+00:00",
6
- "description": "One package per analyzed Maestro-Caps piece-recording, containing original, annotated, and cleaned score PDF/XML pairs, authoritative change reports, MuNo-S, MuNo-SP, structural segmentation, and long-form auditory analysis.",
7
  "piece_recording_count": 148,
8
  "package_mode": "existing_only",
9
  "id_scheme": {
@@ -14350,5 +14349,23 @@
14350
  }
14351
  }
14352
  }
14353
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14354
  }
 
1
  {
2
  "schema_version": 1,
3
  "dataset": "bryel-labs/MAESTROCaps",
 
4
  "exported_at": "2026-09-02T01:17:49.755770+00:00",
5
+ "description": "One package per analyzed MAESTROCaps piece-recording, containing original, annotated, and cleaned score PDF/XML pairs, authoritative change reports, MuNo-S, MuNo-SP, structural segmentation, and long-form auditory analysis.",
6
  "piece_recording_count": 148,
7
  "package_mode": "existing_only",
8
  "id_scheme": {
 
14349
  }
14350
  }
14351
  }
14352
+ ],
14353
+ "updated_at": "2026-09-15T23:28:05.950087+00:00",
14354
+ "generation_prompts": {
14355
+ "structural_segmentation": {
14356
+ "path": "prompts/structural-segmentation.txt",
14357
+ "sha256": "eabe0d4e740c33e07efb2c0968a83907f8f9e0479cd145d30caad169c5cc92d7",
14358
+ "bytes": 7422
14359
+ },
14360
+ "auditory_analysis": {
14361
+ "path": "prompts/auditory-analysis.txt",
14362
+ "sha256": "fd989da62a4dd1495bd67178131fd0cd3c44ce7cb0b0b21787525bc9af823fb0",
14363
+ "bytes": 22261
14364
+ },
14365
+ "question_answer_generation": {
14366
+ "path": "prompts/question-answer-generation.txt",
14367
+ "sha256": "970bb6873eca4e3f1ce8f059863dbdc0321d016a0220213f11fbc419df19bce4",
14368
+ "bytes": 49606
14369
+ }
14370
+ }
14371
  }
prompts/auditory-analysis.txt ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are writing a long-form, time-grounded auditory analysis of a supplied performance using a MuNo-SP representation of its score and performance.
2
+
3
+ VERIFIED PIECE CONTEXT
4
+
5
+ {
6
+ "composer": "[COMPOSER]",
7
+ "piece": "[TITLE]"
8
+ }
9
+
10
+ Use this verified identity and your prior musical knowledge only when they help resolve melody, harmony, or structure in the supplied performance. Do not include the composer, title, historical facts, or other external factual information in the output.
11
+
12
+ INPUT NOTATION GUIDE
13
+
14
+ - Indentation shows hierarchy: bars contain beats, and beats contain markings, voices, and events.
15
+ - BAR and BEAT timestamps use onset+duration.
16
+ - Labels such as 'v3:' and 'v5:' identify simultaneous musical voices or layers.
17
+ - A note such as 'F#4 half v68 00:07.50+02.64' gives pitch, written duration, performed intensity, performance onset, and sounding duration.
18
+ - A statement such as 'A2 is not played' identifies an expected pitch for which the alignment contains no corresponding performed attack. Treat it as a candidate missed note, not as conclusive proof by itself.
19
+ - Comma-separated pitches form a chord within one voice. Corresponding comma-separated intensities and timestamps describe the individual chord tones.
20
+ - Successive pitched events in the same voice belong to that voice's continuing line. Overlapping sounding durations between successive events in one voice usually represent sustain or legato carryover.
21
+ - Voice labels are authoritative evidence of simultaneous strands. Trace each reported melody within one source voice unless sustained evidence supports a genuine transfer; keep a simultaneous secondary melody separate. A line remains melodic when it moves into a lower register.
22
+ - Read harmony across all simultaneous voices. Use voice membership, onset timing, written note values, and sounding durations together to distinguish structurally active chord tones from passing tones and residual resonance.
23
+ - 'rest' is a written rest. A dash means that the preceding note in that voice continues.
24
+ - '/3:2' indicates a triplet value.
25
+ - Terms such as pianissimo, crescendo, tenuto, arpeggio, and 'slur:start/end' describe musical expression, articulation, or grouping.
26
+ - Pedal events indicate changes in sustain.
27
+ - When a pedal release is followed closely by a reapplication, treat the pair as one pedal refresh. Only if it is musically relevant, mention only the renewed pedal or resonance at the reapplication time, not both mechanical events.
28
+ - At the start of each phrase, carry forward the latest preceding time signature, passage heading, BPM, and dynamic when one is declared. Use these declarations only to interpret audible meter, pacing, character, and intensity; omit any declaration that is unknown, and do not report it merely as notation.
29
+
30
+ INPUT SEGMENTATION GUIDE
31
+
32
+ - 'New section from bar X to bar Y: "name - role"', 'New theme from bar X to bar Y: "name - role"', and 'New phrase from bar X to bar Y: "name - role"' begin structural units.
33
+ - 'End of section: "name - role"', 'End of theme: "name - role"', and 'End of phrase: "name - role"' end them.
34
+ - Every declared bar range is inclusive.
35
+ - '-' separates consecutive phrases and is not an audible event.
36
+ - Treat this segmentation as indicative. Use its hierarchy and boundaries to structure the description, and reproduce every quoted 'name - role' label verbatim whenever naming that unit. Determine audible internal grouping from the music itself, giving particular weight to continuity and, if present, slurs in the principal melodic voice as well as cadence, harmony, repetition, texture, dynamics, and timing.
37
+ - For each phrase, use its active enclosing section and theme, its neighboring phrases, and any child material as structural context. Analyze each phrase's declared range under its own heading; use neighboring material only to clarify continuity, entrances, releases, boundaries, and function.
38
+
39
+ SCOPE AND LENGTH
40
+
41
+ Translate the supplied time-annotated passage into a concise auditory description written like a perceptive human musician. Select the details that define what the passage sounds like rather than inventorying every event. Discuss every declared phrase, including material outside a theme, and use the segmentation only to organize the analysis.
42
+
43
+ Describe each phrase as it unfolds: what is heard initially, what enters or changes next, how intensity or texture develops, and what happens toward its end.
44
+
45
+ Begin with an exactly two-sentence whole-piece overview. After the phrases belonging to a theme, write exactly two synthesis sentences for that theme: one about melodic repetition, variation, or transformation, and one about its harmonic and tension arc. Write exactly two comparable synthesis sentences for every section.
46
+
47
+ The sentence count for every phrase is calculated programmatically as one sentence per inclusive phrase bar, with a maximum of eight sentences per phrase. Follow this exact plan:
48
+
49
+ [PROGRAMMATIC PHRASE SENTENCE PLAN]
50
+
51
+ Within each phrase's assigned sentence count, give the first presentation of its principal melodic idea as a complete ordered pitch path, then follow the recurrence rules below. Explicitly consider any genuinely important secondary melody or embedded melodic subvoice. Give melody, harmony, texture, dynamics, phrasing, rhythm, function, tension and release, and supported performance decisions comparable analytical weight. Devote at least one substantial sentence per phrase to how bass motion, sonority, chromatic color, dissonance, and cadence create tension and release, and connect the melodic layers to their supporting harmony. Integrate locally clear articulation and rubato decisions within the same sentence allowance. Organize longer phrases into musically meaningful stages such as opening statement, continuation, intensification, climax, return, and close.
52
+
53
+ MELODY IDENTIFICATION AND GROUPING
54
+
55
+ Follow these steps in order:
56
+
57
+ 1. PRINCIPAL MELODY
58
+
59
+ Identify the perceived melodic foreground over time; do not assume that one uninterrupted principal melody exists throughout every phrase. Treat encoded voice membership as authoritative, but recognize that one encoded voice can contain more than one perceptual strand and that not every event in it necessarily serves the same musical role. Prefer a continuous principal-melody voice and do not switch merely because another line is temporarily higher, more active, or contains one louder attack.
60
+
61
+ 2. SECONDARY MELODIES AND SUBVOICES
62
+
63
+ After identifying the principal melody, inspect every voice for a secondary melody or a melodic subvoice interleaved with accompaniment. Require multiple cues across a meaningful span: continuity of contour or rhythm, sustained prominence, score markings, registral or metrical recurrence, a returning pattern, or harmonic direction. A melodic subvoice may select recurring attacks while excluding intervening accompanimental events; after a substantially lower-prominence interruption, resume it with the next projected attack when its earlier contour or pattern continues. A candidate subvoice is generally more projected than the local accompaniment baseline, judged within the same register, texture, and recurring passage, though an inner or bass line need not be loudest. Keep each line within one voice, do not duplicate the principal melody, and do not manufacture an unsupported line.
64
+
65
+ 3. EVIDENCE AND PERCEPTUAL STREAMING
66
+
67
+ Use thematic continuity, phrase logic, slurs, duration, meter, repetition, harmonic resolution, timing, and sustained prominence together. Test continuity through corresponding metrical positions, sequences, antecedent-consequent patterns, cadential motion, and recurring contours. Treat score markings, timing, and local velocity balance as mutually informative; no single cue determines melodic status. Verify every selected pitch, voice, attack, and grouping against the supplied score and performance.
68
+
69
+ Inspect velocities systematically. Compare each candidate note with simultaneous and nearby notes in the same register and texture, seeking consistent projection across a complete gesture rather than one isolated loud attack. Do not assume that equal velocities at different pitches produce equal loudness or prominence: widely separated registers may remain distinct with a small velocity difference, while closely spaced notes may fuse or mask one another. Treat MIDI velocity as attack-prominence evidence, not as a universal or linear loudness measure, and apply no fixed global threshold. Large successive leaps still require contour, rhythm, recurrence, or phrase logic to belong to one line.
70
+
71
+ 4. ATTACKS, GROUPING, AND TRANSFERS
72
+
73
+ Treat 'cues-before' as ordered attacks, including those that belong to a selected line. In a melodic chord, select the tone continuing the line and treat the others as harmony unless they form a supported separate strand. Do not repeat a tied or continued tone without a new attack; include every genuine repeated attack.
74
+
75
+ Treat slurs, if any, within a selected melodic voice as strong evidence of gesture grouping, not as automatic proof that each slur is a complete phrase. Preserve slur-defined gestures when they exist, then use harmony, phrasing, timing, and tension-resolution to combine complete gestures into larger melodic sections when appropriate. When no slurs are present, infer gestures from the other musical and performance evidence rather than treating the grouping as indeterminate. A resolution may occur in a later complete gesture; keep the gestures distinct while explaining their larger connection rather than forcing them into one gesture or cutting off the unresolved motion.
76
+
77
+ Report a genuine transfer to another voice only when the new voice continues the thematic or phrase logic, remains prominent across a meaningful span, and the preceding voice stops carrying the melody or clearly becomes accompaniment. Keep simultaneous countermelodies separate. If the evidence does not support a clear principal melody, secondary melody, transfer, or melodic subvoice, do not manufacture one.
78
+
79
+ 5. TRANSCRIPTION ECONOMY
80
+
81
+ Transcribe a melodic idea completely at its first presentation, preserving every selected attack, repeated pitch, ornament, and cue in sounding order. For a later exact or substantially unchanged recurrence, identify its relationship and timestamps without copying the entire pitch path; give only a short identifying incipit and any changed, omitted, added, reharmonized, redistributed, or newly emphasized pitches. When writing any pitch path, never omit internal attacks or use 'etc.', 'and so on', or an ellipsis. This economy rule applies across later phrases and to theme and section syntheses.
82
+
83
+ ANALYTICAL METHOD
84
+
85
+ Use these seven dimensions internally:
86
+
87
+ 1. Melody: apply the identification, secondary-line pass, grouping, and recurrence rules above. Trace the principal and supported secondary lines separately; explain their contour, arrivals, interaction, repetition, variation, return, and transformation without retranscribing a pitch path already given. Use written note values to understand audible relative length but never name those values; for example, say 'the shorter C4 and D4'.
88
+ 2. Harmony/color and tension: combine the notes actually sounding across all voices, using onset, written duration, and sounding duration to distinguish active harmony from passing notes and residual resonance. Trace tonal center, bass or fundamental motion, chord or sonority changes, chromatic inflections, dissonance and resolution, cadential motion, and changing color. Do not mistake a lower melodic note for the bass. Name the chord, harmonic function, bass motion, dissonant interval, chromatic alteration, or resolution responsible for each claim, identifying sounding pitches when useful. If 'cadence' or 'cadential' appears outside a required quoted heading, name the cadence type and tonal goal and give the approach and arrival harmonies with timestamps; if the evidence is insufficient, do not claim a cadence.
89
+ 3. Texture: describe the number, balance, register, and interaction of melody, inner voices, bass, and accompaniment without repeating the melodic or harmonic account.
90
+ 4. Dynamics and phrase shaping: describe how audible intensity, balance, emphasis, note duration, and breathing points shape the phrase. Mention a pedal refresh only when its renewed resonance materially affects phrasing or clarity, and refer only to the reapplication time.
91
+ 5. Function: explain each unit's structural role from its own audible material rather than relying on claims about later events.
92
+ 6. Rhythm and time: broadly describe the general rhythmic patterns and pulse, such as extended notes or accompaniment with a triplet feel, without duplicating local expressive timing observations.
93
+ 7. Particular performance decisions: identify clear locally audible interpretive choices. Look for a meaningful articulation difference, such as detached or staccato attacks contrasted with a connected or legato line, and identify the pitches and timestamps that demonstrate it. Also examine rubato; judge rubato and expression from actual onset spacing, velocities, and timing: where the performer takes extra time, makes a small acceleration, relaxes the pace, accentuates a specific pitch, or gives a note agogic emphasis. When a pitch is explicitly marked 'is not played', inspect the surrounding notes in the same line, their melodic direction and recurring pattern, nearby velocities, onset spacing, and any local hesitation or extra time. If those combined cues strongly support an audible interruption, describe it cautiously as a likely missed note and explain how it disrupts the surrounding line; never mention the score, notation, alignment, data, or the marker in the output, and never state the performer's intention as certain. If the local context does not strongly support that inference, do not report a missed note. If neither articulation nor timing differs materially, state that the delivery remains comparatively even rather than inventing an expressive deviation.
94
+
95
+ Explain tension only through audible evidence such as a named dissonance and its resolution, a specific chromatic alteration, harmonic prolongation, registral expansion, increased performed intensity, acceleration, delayed resolution, or textural thickening. State when the cause begins, when it peaks if applicable, and when it resolves or recedes. Describe the most important climax.
96
+
97
+ Summarize repeated accompaniment patterns as patterns. Name important chord tones together when they clarify a sonority, but otherwise keep nonmelodic pitches selective and do not catalogue every accompaniment event. Do not focus on the precise ending of a note unless it creates or releases a dissonance, articulates a phrase boundary, or exposes a change of harmony or texture.
98
+
99
+ TIME AND EVIDENCE GROUNDING
100
+
101
+ - Use only numeric MM:SS.cc times taken from the supplied data, such as '00:07.50' or '01:03.25'; never spell out times in words.
102
+ - Every sentence must contain at least one numeric MM:SS.cc timestamp or timestamp range.
103
+ - Ground each independent observation at the time it occurs rather than attaching one broad range to a sentence containing several events.
104
+ - Timestamp melodic entrances and changes, harmonic changes, dissonances and resolutions, changes in texture or performed intensity, tension, climaxes, and phrase endings.
105
+ - Every reference to a note or other event must state concrete evidence. For example, replace 'building up' with 'building up towards G5' and give its timestamp.
106
+ - Every written pitch must include its octave number and preserve the pitch spelling supplied in the timed musical data, including pitches in melodic sequences, neighbor-note figures, chord voicings, bass motion, dissonances, and resolutions-for example 'F#4-E4-F#4', never 'F#-E-F#'. Chord names, keys, and Roman-numeral functions such as 'D major', 'A7', or 'V7 of D major' do not take octave numbers, but every individual note cited as evidence does.
107
+ - In prose pitch notation, join sequential melodic notes with an en dash ('F#4-E4-F#4') and simultaneous chord tones or arpeggiated chords with a plus sign ('D4+F#4+A4'). Never use an en dash between tones of a simultaneous or arpeggiated chord, or a plus sign between sequential melodic attacks.
108
+ - Do not use bar numbers or the word 'bar' anywhere in the response, including headings.
109
+ - Within a phrase's analysis, do not mention, anticipate, prepare for, hand off to, or compare it with a later section, theme, phrase, repetition, or event. Later material may be inspected only to clarify the current phrase's boundary and structural identity. Theme and section syntheses may compare material contained within the unit being summarized.
110
+
111
+ AUDITORY INTERPRETATION
112
+
113
+ Use evidence in the supplied timed performance and the score, and translate the input into perceptible musical results:
114
+
115
+ - If a slur is present, it may indicate that a line sounds smoothly legato, but never mention the slur. A slur, usually contained within a single voice, may also inform phrasing and segmentation, especially in the melody. Slurs are numbered by the voice they begin in, such as 'slur:3:start'. Do not ignore a continuous melodic slur merely because an indicative structural span begins or ends there; override that suggested internal boundary when the slur and stronger evidence from cadence, harmony, repetition, texture, dynamics, or timing support a different audible grouping. When no slur is present, rely on voice continuity, phrase logic, harmony, repetition, articulation, timing, and performance prominence.
116
+ - Terms such as staccato and legato may be used only when they describe a difference supported by the audible performance, never merely because the corresponding notation is present.
117
+ - Voicing is important to detect melodies, harmonies, etc.
118
+ - A high velocity may inform you that an attack sounds forceful or strongly projected, but never mention its numerical value.
119
+ - Dynamic, tempo, and articulation information should be expressed as audible intensity, pacing, shaping, touch, and character only when realized in the performance.
120
+ - Mention resonance from pedaling only when it materially affects the audible texture, articulation, harmonic clarity, or phrase boundary.
121
+ - Use timings and relative velocities to identify clearly audible rubato or other expressive moments, but do not overinterpret small differences.
122
+ - Meter is audible and may be described directly. Conventional tempo and character language such as "Andante cantabile" may be used when it plausibly characterizes the audible pacing and expression.
123
+
124
+ Only describe performance technique that can be inferred from the audible result. Do not infer fingering, hand distribution, arm, wrist, finger movement, or bodily gesture.
125
+
126
+ Use literal musical language. Do not substitute atmospheric imagery or unsupported affect for analysis. Descriptive adjectives are permitted only when pitches, register, dynamics, timing, articulation, balance, or resonance support them in the same sentence; avoid generic color words such as darkening the scene, chromatic bite, glow, glowing, luminous, warmth, tender, poignancy, shimmer, smoke, halo, or expectation when a concrete musical event can be stated instead.
127
+
128
+ PROHIBITED OUTPUT
129
+
130
+ Do not mention:
131
+
132
+ - beat annotations
133
+ - markings or score symbols
134
+ - encoding labels or voice numbers ('upper voice' is OK)
135
+ - MIDI velocity numbers
136
+ - written note values such as whole, half, quarter, eighth, or sixteenth notes
137
+ - written accents or accent symbols; describe only the resulting audible emphasis when relevant
138
+ - the name or format of the supplied representation
139
+ - how a musical quality was inferred from the data
140
+ - the composer, title, historical context, hands, fingering, bodily gesture, or anything else that cannot be heard in the performance
141
+ Don't use 'rather than' or other fake contrasts.
142
+
143
+ OUTPUT EXAMPLE
144
+
145
+ At 00:08.50, the opening cantabile melody F#4-E4-F#4 remains clear above an arpeggiated D-major sonority. At 00:10.25, C#4+G4+A4 combines with the melodic E4 to form an A7 color, and the slight easing into the second F#4 at 00:11.04 makes the return sound released. From 00:13.09, the melody descends to B3 and continues C#4-D4-C#4-D4-E4, with the shorter C#4 and D4 attacks at 00:16.85-00:17.14 giving the renewed ascent a more articulated impulse. At 00:13.42 and 00:19.80, the inner layer rises above the melodic register first as D4+A4 and later as C4+A4+D5, and together with the sounding F#4, the latter forms D7, V7 of G major, increasing the pressure toward the arpeggiated F# minor arrival at 00:33.00. At 00:35.29, the intensified gesture returns with reduced chordal density, after which G3+Bb3+D4 at 00:39.22 introduces a G-minor inflection before D3+F#3+A3 restores D major around 00:40.21 in a diminuendo. From 00:40.21, the melody retains a mezzo-forte singing projection, while A#3 at 00:45.91 functions as the leading tone into B minor and the increasing attack weight culminates in the forte arrival at 00:52.36. At 01:02.03, A2 beneath G3+B3+D4+E4 creates an A-dominant suspension whose D4 resolves to C#4, yielding A2+G3+C#4+E4 by 01:10.32 as an A7 sonority. At 01:10.32, the principal theme begins its repetition with the melodic line still foregrounded while soprano triplet decoration adds a more active upper layer.
146
+
147
+ Return Markdown using this hierarchy:
148
+
149
+ # Whole-piece analysis
150
+ ## <quoted SECTION name - role>
151
+ ### <quoted THEME name - role>
152
+ #### <quoted PHRASE name - role>
153
+
154
+ Place phrases outside themes directly under their enclosing section. Cover every declaration exactly once at its appropriate analytical level. Do not reproduce the notation or boundary declarations in the response.
155
+
156
+ SEGMENTED TIMED MUSICAL DATA
157
+
158
+ [SEGMENTED MUNO-SP REPRESENTATION]
159
+
160
+ /Users/milanliessens/miniconda3/lib/python3.13/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.1) or chardet (7.4.3)/charset_normalizer (3.4.4) doesn't match a supported version!
161
+ warnings.warn(
162
+ /Users/milanliessens/miniconda3/lib/python3.13/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.1) or chardet (7.4.3)/charset_normalizer (3.4.4) doesn't match a supported version!
163
+ warnings.warn(
prompts/question-answer-generation.txt ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SYSTEM PROMPT
2
+
3
+ You are a trained musician and critical listener asking another trained musician about the supplied performance. Generate exactly 7 listening questions from that musician's point of view.
4
+
5
+ Write in the natural voice of a musician discussing what is heard. Every question must reflect the genuine inquiry of a musician: it must concern a musically meaningful feature, relationship, interpretation, or listening problem that a trained musician could sincerely want another musician to identify or discuss. Do not create a question merely because the analysis contains a fact that can be extracted. The questioner-not only the respondent-must demonstrate musical understanding through precise, idiomatic framing. Do not sound like a generic quiz writer, annotator, data extractor, or source-text paraphraser.
6
+
7
+ You receive only a time-stamped auditory analysis. Treat it as the complete and exclusive source for question subjects and answers. Do not use prior knowledge or introduce a claim absent from it.
8
+
9
+ -
10
+
11
+ ## OUTPUT FORMAT
12
+
13
+ Return a JSON array of exactly 7 objects:
14
+ [
15
+ {
16
+ "category": "<Melody|Harmony, color, and tension|Texture|Dynamics and phrase shaping|Function|Rhythm and time|Particular performance decisions>",
17
+ "question": "<question text>",
18
+ "answer_format": "<brief description of expected answer format, e.g., 'chord name (e.g., G dominant 7th)', 'time in MM:SS.cc', 'interval name'>",
19
+ "answer": "<concise answer>",
20
+ "reasoning": "<concise explanation of why the evidence supports the answer without introducing facts absent from the analysis>",
21
+ "evidence": "<verbatim excerpt copied from the auditory analysis that contains the source of the question and proves the answer; copy one sentence or a longer contiguous passage as needed>"
22
+ }
23
+ ]
24
+
25
+ -
26
+
27
+ ## CORE REQUIREMENTS
28
+
29
+ **One source only:** Use only the supplied time-stamped auditory analysis. A question subject, correct answer, answer choices, and supporting reasoning must all come from explicit statements in that analysis. Do not supply a fact from prior knowledge or infer a more specific fact than the analysis states.
30
+
31
+ **Answer-first construction:** Select a high-quality answer before writing its question. The answer must be musically meaningful, concise, canonical, and specific enough to grade reliably. Then write a question that requests exactly that answer-no broader explanation and no second property.
32
+
33
+ **Faithful specificity:** Match the answer's precision to the analysis. If the analysis names an octave-qualified pitch, exact chord, timestamp, instrument, count, or structural role, preserve that specificity. If it gives only a perceptual description, use that description or a finite choice set; never manufacture an exact label.
34
+
35
+ **Musician's point of view:** Write every question as one trained musician naturally asking another trained musician about a performance they are listening to. The questioner's wording must reflect genuine musical attention: identify the relevant audible dimension precisely, use idiomatic musical terminology where useful, and assume ordinary concepts such as register, cadence, articulation, pulse, voicing, and phrase shape need no elementary explanation. Do not sound like a generic quiz writer, annotator, data extractor, or source-text paraphraser. Avoid both unnecessary jargon and oversimplified classroom language.
36
+
37
+ **Genuine musical inquiry:** Every question must arise from a musically meaningful feature, relationship, interpretation, or listening problem that a trained musician could sincerely want another musician to identify or discuss. The question must have a musical reason to be asked beyond the fact that its answer appears in the analysis. Reject mechanical fact extraction, arbitrary note retrieval, and source sentences converted into fill-in-the-blank questions when they do not support genuine analytical listening.
38
+
39
+ **Standalone listening question:** Ask directly about audible musical content or performance. Never refer to "the analysis," "the text," what is "described," or how the answer was obtained.
40
+
41
+ **Audible event, not hidden mechanism:** Source support alone is insufficient: the requested event must be distinguishable by listening without a score, MIDI, or controller data. Do not ask about damper/sustain-pedal presses, releases, clearing, changes, or their exact timing, even when the analysis supplies those times. Do not claim that a slowdown is "written-out," notated, or prescribed by the score; ask about the audible spacing of attacks instead. An audible resonance change may be a subject only when the analysis explicitly identifies that perceptual change, never as a proxy for a pedal action. Preserve the scope of the evidence: a repeated foreground note with accompanying chords is not a reduction of the whole texture to one note.
42
+
43
+ **Concrete passage context:** Formal and thematic references such as "the exposition," "the transition," "the recapitulation," "the third return of the theme," or "Piu animato ostinato episode" are allowed. They may stand without a time cue when the audible description clearly and uniquely identifies the intended passage across the supplied analysis. If there is plausible ambiguity, first add distinguishing musical context; include an event-linked timestamp or passage interval only if needed to resolve it. A clear thematic return may need no time cue; a long movement with several similar returns, transitions, or uncertain formal boundaries usually needs more context. Decide from the actual segments and the complete question, not from the composer, piece name, a formal label alone, or the assumption that an ordinal such as "third" is self-evident. Say "the first time" or "the second time" when the source establishes the occurrence, and specify which recognizable melody or gesture recurs. Do not use "the retransition following the developmental sequences," "the storm," or "the lyrical transformation" as a locator without concrete audible identification; a private analysis heading or metaphor is not a listening landmark. For timestamp-answer questions, every stated passage interval must contain the answer strictly between its endpoints. If a local passage ends before the target, use a source-supported theme-level or higher-level interval that includes it, or a clearly identified single-event cue instead; never give a preceding passage range and ask for an answer outside it. A single-event cue may precede or follow the target when the wording makes their order clear. Never give the answer timestamp or its rounded equivalent as context. Prefer plain audible descriptions such as "brief pause" over "agogic break." Specify whether the requested boundary is the start of a note, the start of silence, or the resumption after a pause; never treat these as interchangeable. If the analysis only timestamps a passage containing several such events, choose a different, explicitly timed event instead of assigning its boundary to one of them.
44
+
45
+ **Discrete timestamp targets:** Do not ask when a phrase begins its crescendo or starts a gradual build-up, relaxation, or acceleration: the perceptual onset is too ambiguous for one exact timestamp, even if the analysis places a marking there. Choose a clearly audible, explicitly timed event instead, such as a sudden loud-to-soft change, a distinctive accented attack, a new voice entrance, or the resumption after a clearly identified pause. A high point must identify one particular attack and which occurrence, not merely "the culminating high melodic point" or a broad dynamic peak.
46
+
47
+ **Cross-segment ambiguity review:** Before writing questions, read all supplied analysis segments, not only the excerpt that contains a candidate answer. For each candidate, compare the proposed locator with the other segments, including earlier and later thematic statements, varied returns, similar transitions, and partial recollections. Ask whether a listener could reasonably select any other occurrence or interpret the referenced boundary differently. Omit time guidance only when this whole-analysis check supports one clearly distinguishable target; otherwise add a broad time guide and audible distinguishing context, or select another event. A unique segment heading, or the absence of a second occurrence in the chosen evidence excerpt, is not proof of audible uniqueness. If the supplied coverage is insufficient to assess a potentially ambiguous reference, do not assume it is unique.
48
+
49
+ **Minimal sufficient anchoring:** Use the least amount of neutral musical context needed to isolate exactly one event and one requested property. A clearly unique audible passage needs no time cue. Context timestamps in the question are optional: include them only when the musical wording might otherwise be ambiguous. When needed, tie each timestamp directly to a named, recognizable event or passage, such as a melody entrance, a thematic statement, the development section, or a climax. Stop adding context as soon as another occurrence can no longer be confused with the target. A locator may identify where to listen, but it must not state the musical property being tested. This optionality concerns context in the question, not the required timestamp answer in timestamp-only variants.
50
+
51
+ **Event-grounded timestamps, not artificial windows:** Every context timestamp must be explicitly supported by the supplied analysis as the time of the event named next to it. Every interval must describe the actual source-supported extent of a named musical passage, not an arbitrary stretch of the recording, and a timestamp answer must fall strictly inside every interval in its question. Prefer the theme's or a higher-level section's actual boundaries when a smaller passage would exclude the answer or leave the target ambiguous. Do not prepend bare "Between xx and yy" search windows, invent round-number boundaries, or center a window on the answer. Do not lengthen a passage or move an event time to meet a numerical quota: there is no fixed minimum window length, minimum cue-to-answer distance, or required number of timestamps. Musical boundaries determine the times, not the reverse. If the analysis does not explicitly locate a useful contextual event, use an unambiguous cue-free description or choose another supported target. A context event must differ from the target and must not give away its answer time. In the following example forms, angle-bracket times are placeholders: replace them only with times explicitly attached to the named event in the supplied analysis, or omit the cue when it is unnecessary. Good forms: "During the first full statement of the singing theme, between <theme-start> and <theme-end>, at what timestamp does a second melodic voice enter beneath it?"; "When the melody starts at <melody-entry-time>, at what timestamp does its first upward leap land on the accented high note?"; "The second time the opening melody is played over repeated chords, at what timestamp does the inner line enter?" (if that occurrence is clearly identifiable); "After the climax at <climax-time>, at what timestamp does the detached bass figure return?" These provide musical context rather than artificial numerical hints.
52
+
53
+ **Strict answer-stem separation:** After drafting a question, compare every meaningful word in its stem with the answer. Remove or replace any adjective, label, pitch, count, direction, relationship, choice cue, structural term, or causal description that states or strongly predicts the answer. If asking about dynamic direction, do not say that the sound recedes; if asking about texture, do not state how many layers are active; if asking about function, do not call the passage a transition before asking its role. The question may name the general dimension being tested, but not its value.
54
+
55
+ **Difficulty without ambiguity:** Make a question difficult because it requires precise listening, comparison, recall across a passage, or discrimination among musically plausible alternatives. Never manufacture difficulty by withholding needed time guidance, leaving the target passage undefined, using vague pronouns, failing to identify which recurrence is meant, or asking about a property with several defensible labels. If adding neutral context would resolve ambiguity without revealing the answer, add it. If no such wording exists, reject the candidate.
56
+
57
+ **Single defensible interpretation:** Read the question without consulting the intended answer and list every plausible interpretation. Keep it only if the wording fixes one musical event, one comparison frame, one requested property, one answer granularity, and one response format. "Which note," "what changes," "how is it played," and similar formulations are invalid unless the relevant voice, moment, dimension, and expected specificity are fixed neutrally.
58
+
59
+ **No predictable questions:** Reject questions whose answer follows almost automatically from the stem or common musical expectation-for example, asking what happens dynamically immediately after identifying a climax. Prefer distinctive moments, comparisons, and relationships that demand attentive listening.
60
+
61
+ **Multiple-choice construction:** Every multiple-choice question must contain at least seven mutually exclusive, musically plausible options, and 'answer_format' must repeat the same option set. The correct answer necessarily appears among the options, but the stem and distractors must not reveal or favor it through answer-bearing description, semantic overlap, unequal specificity, unusual length, grammatical mismatch, ordering, or implausible alternatives. Do not use "all of the above" or "none of the above." Do not add weak distractors merely to reach seven. If seven defensible options are unavailable, write a clear non-MCQ question or choose a different target.
62
+
63
+ **Explicit answer contract:** The question itself must state the requested property and answer granularity clearly and neutrally. A musician must know whether to return one octave-qualified pitch, an ordered pitch sequence, one timestamp, a timestamp range, an integer count, a chord name, a cadence type, a register, a texture label, a formal function, or a pacing choice without consulting 'answer_format'. The 'answer_format' field must confirm the contract; it may not repair a vague stem such as "what happens," "what configuration," "how is it played," or "which register" when the relevant layer and granularity are not neutrally defined.
64
+
65
+ **Conventional answer language:** Use established, musician-readable terminology at the precision supplied by the analysis. Do not invent compressed or hybrid labels such as "melody-plus-inner Ab4" unless the analysis itself uses that exact term. If no canonical label is supplied, ask for a concrete constituent property or use a well-constructed seven-option MCQ.
66
+
67
+ **No expectancy leakage:** A neutral locator must not make the answer logically or conventionally predictable. Do not call a passage a conclusion, ending, or closing section before asking whether its function is a coda. Do not identify a climax before asking whether the following dynamics or tempo relax. Do not describe a voice as close-register, upper, secondary, delayed, accented, or friction-producing when asking for that same register, role, timing, emphasis, or effect. Remove the cue, ask a different property, or reject the candidate.
68
+
69
+ **HARD REJECTION - timestamp-answer leakage:** When the expected answer is a timestamp or time range, the question stem must not contain the answer timestamp, either endpoint of the answer range, or an equivalent rounded form of those times. This is a hard failure even if the answer time appears incidentally while describing the event. Compare every timestamp in the completed stem against the completed answer before accepting the item. If any stem timestamp discloses all or part of the answer, discard or rewrite the question. Anchor with a genuinely different preceding or following event, or ask a different property.
70
+
71
+ Bad: 'At what timestamp does the cadence resolve to tonic at 01:21.55?' Answer: '01:21.55.' The question states its answer.
72
+
73
+ Good: 'Following the melody entrance at 01:05.00, at what timestamp does the prolonged dominant preparation beneath it resolve into the decisive tonic arrival?' Answer: '01:21.55.' This form is valid only if the source explicitly places the melody entrance at 01:05.00 and the resolution at 01:21.55, and the entrance cue is needed to distinguish the target. Otherwise omit it; do not copy illustrative times into generated questions.
74
+
75
+ **Reasoning:** The 'reasoning' field must concisely explain why the cited evidence supports the answer and why the question follows from it. It may connect the evidence to the requested musical property, but it must not introduce facts, interpretations, or terminology absent from the supplied analysis. Do not use it as a substitute for the source excerpt.
76
+
77
+ **Verbatim source evidence:** The separate 'evidence' field must copy the exact contiguous part of the supplied auditory analysis from which the question and answer originate. Copy the complete sentence when one sentence is sufficient; copy multiple consecutive sentences or a longer contiguous passage when necessary to preserve the evidence and context. Preserve the source wording exactly-do not paraphrase, summarize, add commentary, splice nonadjacent fragments, or merely say the answer is "stated in the analysis." The copied excerpt must contain the evidence that proves the answer and, when present in the source, its timestamp.
78
+
79
+ **Axis assignment:** Assign each question to exactly one axis according to the property requested: Melody; Harmony, color, and tension; Texture; Dynamics and phrase shaping; Function; Rhythm and time; or Particular performance decisions.
80
+
81
+ **Set quality:** Vary timestamps, passages, answer types, and question directions. Do not produce paraphrases of the same question. Follow the requested category distribution exactly.
82
+
83
+ ## MANDATORY SILENT AUDIT
84
+
85
+ Before returning the JSON, audit every candidate without reporting the audit:
86
+
87
+ 1. **Uniqueness test:** Hide the intended answer and check all supplied analysis segments for competing occurrences, not just the selected evidence excerpt. Can a knowledgeable listener identify exactly one target event and understand exactly what form of answer is requested? If a formal or thematic reference could plausibly identify another passage, supply time guidance; do not require a time cue when the audible reference is already clearly unique.
88
+ 2. **Leakage test:** Compare the stem with the answer. Does any phrase state, paraphrase, narrow to, or make the answer highly predictable?
89
+ 3. **Alternative-answer test:** Could a second answer be defended from the same analysis because the scope, recurrence, voice, comparison, label set, or granularity is unclear?
90
+ 4. **Difficulty test:** Is the challenge musical and perceptual rather than linguistic or underspecified?
91
+ 5. **Repair rule:** Add only neutral anchoring to fix ambiguity; remove answer-bearing description to fix leakage. If both cannot be satisfied at once, discard the candidate and choose a better-supported event.
92
+ 6. **Answer-contract test:** Without reading 'answer_format', is the requested property and required granularity completely clear from the question?
93
+ 7. **Expectancy test:** Does the locator name a climax, ending, return, cadence, register, effect, or other context that makes the answer conventional or logically obvious?
94
+ 8. **MCQ test:** If choices are present, are there at least seven mutually exclusive and plausible options with no cue favoring the correct one?
95
+ 9. **Timestamp-answer test:** For a timestamp or time-range answer, list every timestamp in the stem. Reject the candidate if any listed time equals, rounds to, contains, or gives an endpoint of the answer.
96
+ 10. **Genuine-inquiry test:** Could a trained musician sincerely ask this while listening because the answer illuminates a meaningful musical feature or performance decision? Reject it if its only purpose is extracting an available fact.
97
+ 11. **Audibility and boundary test:** Could a listener locate the requested event without seeing notation or pedal/controller data? Does the evidence explicitly time that event rather than merely a surrounding passage? Reject hidden-mechanism questions, score-only distinctions, unsupported textural reductions, and interchangeable note/pause boundaries. Check that potentially ambiguous formal, thematic, or tempo-label passage references have timestamp context; clearly unique audible references may stand alone after the cross-segment review.
98
+ 12. **Context timestamp test:** Is each context timestamp necessary to resolve a plausible ambiguity? Does the question explicitly name the real event or passage attached to each time, and does the supplied analysis support that exact event-time relationship? Reject arbitrary or artificially widened windows even if their numbers appear elsewhere in the analysis. Permit cue-free thematic references when clearly identifiable. Check that before/after/during wording matches the events' order and that the answer falls strictly inside every stated interval; use a source-supported theme-level or higher-level interval if needed. Identify the first/second occurrence when known. Reject metaphor-only or vague formal locators and gradual crescendo-onset targets. Never reveal the answer time or a rounded equivalent.
99
+
100
+ ## REJECT A CANDIDATE QUESTION WHEN
101
+
102
+ - the answer is absent, hedged, contradictory, or only implied by the analysis;
103
+ - more than one answer would reasonably satisfy the wording;
104
+ - answering requires notation, metadata, historical knowledge, or information outside the analysis;
105
+ - the question asks for multiple properties, causes, or locations;
106
+ - the answer is subjective without a closed choice set;
107
+ - the question merely copies a sentence and removes one obvious word;
108
+ - the event is too dense, subtle, or underspecified for the requested answer; or
109
+ - the answer repeats information already disclosed in the question.
110
+
111
+ -
112
+
113
+ ## CATEGORY DISTRIBUTION
114
+
115
+ Generate exactly 1 questions for each of the seven axes.
116
+
117
+ Before returning the JSON, silently audit every item: (1) ask whether a trained musician could genuinely want to know the answer as part of attentive musical listening, and reject mere fact-extraction questions; (2) hide the answer and ask whether the stem still identifies one event and one task; (3) compare the stem with the answer and remove any phrase that gives the answer away; (4) for every timestamp-answer item, list every time in the stem and reject the item if any one equals, rounds to, contains, or supplies a boundary of the answer; and (5) reject or rewrite any item for which a knowledgeable listener could defend a second answer. Do not include this audit in the output.
118
+
119
+ Make sure you create a varied set of questions.
120
+
121
+
122
+ USER PROMPT
123
+
124
+ Task: Generate exactly 7 listening-comprehension question(s) from the supplied time-stamped auditory analysis.
125
+
126
+ Piece: [COMPOSER] - [TITLE]
127
+
128
+ The auditory analysis below is the only source. Every question and answer must be directly supported by a concrete statement in it. Do not use prior knowledge, reconstruct missing musical facts, or invent details that the analysis does not discuss.
129
+
130
+ Adopt the viewpoint and voice of a trained musician listening analytically to
131
+ the corresponding recording. Each question must sound like a question that one
132
+ musician would naturally ask another musician about what they hear-not like a
133
+ worksheet instruction, a paraphrase of source material, or a question written
134
+ by a data-extraction system:
135
+ - Every question must reflect the genuine inquiry of a musician: it should arise from a musically meaningful feature, relationship, interpretation, or listening problem that a trained musician could sincerely want another musician to identify or discuss. Do not manufacture a question merely because the analysis contains an extractable fact.
136
+ - Use precise, idiomatic musical language when it helps identify the audible property, while avoiding unnecessary jargon.
137
+ - Assume the respondent can recognize ordinary musical concepts by ear; do not explain basic terminology inside the question.
138
+ - Ask directly about the musical event or performance choice. Do not use classroom-management phrases such as "according to the passage" or "select the correct answer."
139
+ - Make it standalone: never refer to "the analysis," "the text," the supplied source, or what is "described."
140
+ - Ask along exactly one of the analysis's seven axes: Melody; Harmony, color, and tension; Texture; Dynamics and phrase shaping; Function; Rhythm and time; or Particular performance decisions.
141
+ - Generate exactly 1 questions for each of the seven axes.
142
+ - Select claims that the analysis states precisely enough to yield one concise, definitive answer.
143
+ - Make the answer capture the exact requested musical property-no extra interpretation, explanation, or bundled second answer.
144
+ - Be especially careful not to disclose or strongly imply the answer in the question. Do not reuse answer-bearing adjectives, labels, pitch names, counts, directions, or structural terms from the source when that same property is being tested.
145
+ - Make the question unambiguous through minimal sufficient musical context. Context timestamps are optional and only needed when the wording might otherwise be ambiguous. Tie every time to a named source-supported event or the actual boundaries of a musical passage; never add an artificial numerical search window. A clearly identifiable thematic statement may be named without timestamps.
146
+ - For timestamp-answer questions, use the shortest natural musical description that leaves exactly one defensible location without access to the auditory-analysis text. If a concise description is already unique, keep it concise. Only when two or more passages could plausibly match should the question add thematic occurrence, melodic or harmonic content, register, texture, affected voice, or a source-timed preceding or following event. A named context passage may precede the answer rather than contain it. Stop adding context as soon as the target is unique; the answer must still be one timestamp.
147
+ - Preserve difficulty without creating ambiguity. Difficulty must come from the listening discrimination required, never from vague wording, missing context, unclear scope, or multiple plausible events.
148
+ - Balance anchoring and leakage: the stem must identify where and what to listen to without stating the property the listener must determine.
149
+ - Prefer distinctive events and relationships that require attentive listening. Avoid vague opinion questions, trivial observations, predictable answers, and claims the analysis presents as uncertain.
150
+ - If the question is multiple choice, include at least seven mutually exclusive, musically plausible options in the question and repeat the same options in 'answer_format'. The correct answer may appear among the options, but neither the stem, option wording, option length, option order, nor surrounding context may signal which option is correct. Do not pad the set with implausible distractors merely to reach seven; if seven defensible choices are unavailable, ask a clear non-MCQ question or choose a different target.
151
+ - Make the expected answer type and granularity explicit in the question itself. State neutrally whether the listener should supply a pitch, pitch sequence, timestamp, count, chord, cadence type, register, textural configuration, formal function, pacing choice, or other specific property. 'answer_format' must confirm that contract, not rescue an unclear stem.
152
+ - Do not invent compressed or hybrid labels such as "melody-plus-inner Ab4" unless the analysis itself uses that exact label. Prefer conventional musician-readable answers, or define a finite choice set when the analysis does not provide a canonical term.
153
+ - Reject questions whose answer is made predictable by the locator or surrounding event. In particular, do not identify a passage as a conclusion and then ask whether it is a coda; do not identify a climax and then ask whether the following pacing relaxes; and do not state a close-register secondary voice and then ask which register it occupies.
154
+ - Bad expectancy example: "As the cadence arrives, how does the tempo change?" A cadence conventionally primes "slows down," making that answer too easy. Use this otherwise predictable question form only when the auditory analysis explicitly states a genuinely contrary result, such as acceleration or unchanged pacing. Keep the stem neutral: never say "unexpectedly," "surprisingly," "rather than slowing," or otherwise signal the contradiction.
155
+ - HARD TIMESTAMP-LEAKAGE RULE: If the requested answer is a timestamp or time range, the stem must not contain the answer timestamp, either boundary of the answer range, or an equivalent rounded form of any of those times. This prohibition applies even when the time appears incidentally inside a phrase describing the target event. Before accepting the item, compare every timestamp in the stem against the answer character by character and semantically. If any timestamp discloses all or part of the answer, discard or rewrite the question. Use a genuinely different timestamp as a neutral preceding or following anchor, describe a different audible cue, or ask a different property.
156
+ - Bad: "At what timestamp does the cadence resolve to tonic at 01:21.55?" Answer: "01:21.55." The stem states the answer.
157
+ - Good: "At what timestamp does the dominant sonority heard at 01:20.89 resolve to tonic?" Answer: "01:21.55." The timestamp in the stem identifies a different event.
158
+ - Vary the events, time spans, question forms, and axes across the set.
159
+
160
+ -
161
+
162
+ ## CATEGORY-SPECIFIC GUIDELINES
163
+
164
+ ## MELODY
165
+
166
+ Choose an explicit claim about a clearly audible melodic strand: an ordered pitch path, arrival pitch, registral turn, recurrence, variation, countermelody, or transfer of the melodic foreground.
167
+
168
+ High-quality answers include:
169
+ - one octave-qualified pitch at a uniquely identified arrival;
170
+ - a short, complete pitch sequence stated in the analysis;
171
+ - one register or instrument carrying the line;
172
+ - one stated transformation of a returning idea; or
173
+ - one timestamp marking a melodic entrance, turn, or transfer.
174
+
175
+ Ask for only the melodic property the analysis states. Do not reconstruct omitted notes, combine separate lines, infer a melody from harmony, or request an exact pitch when the analysis gives only contour or register. For comparisons, specify one dimension such as pitch content, register, or direction.
176
+
177
+ Avoid bare "does it rise or fall?" questions unless the contour is genuinely distinctive and the choices are necessary. Avoid questions whose stems name the melodic goal, reveal the direction being tested, or contain most of the requested pitch sequence.
178
+
179
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple melodic passages could plausibly match should the question become context-heavy, adding the thematic occurrence, melodic content, register, accompanying texture, a surrounding event, or-if still needed-a broad search interval. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
180
+
181
+ Example forms:
182
+ - "Which octave-qualified pitch completes the opening foreground gesture before its first rest?"
183
+ - "Which pitch sequence is heard in the foreground gesture beginning at <gesture-entry-time> and ending at its first rest at <rest-start-time>?"
184
+ - "When the principal melody returns at <theme-return-time>, which register carries it: extreme bass, bass, lower-middle, middle, upper-middle, treble, or extreme treble?"
185
+ - "During the second statement of the primary theme, what bass-note sequence accompanies the foreground sequence A4-B4-C5?"
186
+ - "What is the highest octave-qualified pitch reached by the melody in its first complete statement?"
187
+ - "Following the melody entrance on C5 at <melody-entry-time>, at what timestamp does the foreground line end as the harmony reaches the B-flat dominant chord?"
188
+
189
+ ## HARMONY, COLOR, AND TENSION
190
+
191
+ Choose an explicit claim about a sounding chord or sonority, bass-supported color, tonal center, chromatic alteration, dissonance and resolution, cadence, harmonic prolongation, or concrete harmonic cause of tension and release.
192
+
193
+ High-quality answers include:
194
+ - one fully named chord or explicitly listed pitch collection;
195
+ - one bass pitch supporting a stated arrival;
196
+ - one dissonant interval, chromatic pitch, or resolution tone;
197
+ - one cadence destination or tonal center explicitly named in the analysis; or
198
+ - one controlled harmonic-state label such as stable, chromatic, suspended, or resolving.
199
+
200
+ Do not perform a new harmonic analysis. Ask only for terminology and relationships the auditory analysis itself supplies. If the analysis describes color without naming a chord, ask about that stated color using finite choices rather than inventing a chord label. A tension answer must identify the harmonic cause or outcome, not merely repeat that tension increases.
201
+
202
+ Avoid broad key-identification questions, bare major/minor questions, and compound questions asking for both a sonority and how it is performed.
203
+
204
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple harmonic passages could plausibly match should the question become context-heavy, adding the thematic occurrence, bass motion, sounding sonority, surrounding cadence, a nearby event, or-if still needed-a broad search interval. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
205
+
206
+ Example forms:
207
+ - "Which fully named chord arrives immediately after the first complete presentation of the theme?"
208
+ - "What octave-qualified bass pitch supports the melody's held arrival at <melodic-arrival-time>?"
209
+ - "When the melody enters at <melody-entry-time>, which harmonic state is most clearly audible: stable tonic, dominant preparation, chromatic sequence, suspended dissonance, deceptive resolution, cadential arrival, or tonal ambiguity?"
210
+ - "What cadence type completes the first full statement of the primary theme?"
211
+ - "Following the melody entrance at <melody-entry-time>, at what timestamp does the harmony move from the sustained dominant preparation into the warmer submediant color beneath it?"
212
+
213
+ ## TEXTURE
214
+
215
+ Choose an explicit claim about the number, balance, register, spacing, or interaction of audible layers: melody, secondary line, inner voices, bass, accompaniment, chordal mass, or named instrumental groups.
216
+
217
+ High-quality answers include:
218
+ - one controlled texture label such as single line, melody with accompaniment, contrapuntal layers, or chordal blocks;
219
+ - one explicitly stated number of audible layers;
220
+ - one register or instrumental group in the foreground;
221
+ - one relationship such as converging, diverging, crossing, or widely separated; or
222
+ - one timestamp where a layer enters, withdraws, or changes role.
223
+
224
+ Keep the answer textural. If the requested answer is a pitch sequence, chord, intensity direction, or formal role, use another axis. Ask for an exact layer count only when the analysis states it clearly. Do not infer hands, hidden voices, doublings, or instrumentation that the analysis does not name.
225
+
226
+ Do not reveal the answer by describing the texture as sparse, dense, layered, chordal, or widely spaced in the question stem when that property is what the question asks.
227
+
228
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple textural events could plausibly match should the question become context-heavy, adding the thematic occurrence, audible registers and roles, the line that changes role, a surrounding event, or-if still needed-a broad search interval. "A second voice" needs expansion only when more than one event could fit it. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
229
+
230
+ Example forms:
231
+ - "When the opening melody returns at <theme-return-time>, which texture is audible: single line, melody with accompaniment, two-part counterpoint, three-part counterpoint, chordal homophony, layered ostinato texture, or antiphonal exchange?"
232
+ - "How many clearly separable sounding layers are audible during the second statement of the primary theme?"
233
+ - "When the opening gesture returns at <gesture-return-time>, which register is foregrounded: extreme bass, bass, lower-middle, middle, upper-middle, treble, or extreme treble?"
234
+ - "During the second statement of the primary theme, at what timestamp does the performer begin to bring out the inner line moving beneath the repeated upper-register melody?"
235
+
236
+ ## DYNAMICS AND PHRASE SHAPING
237
+
238
+ Choose an explicit claim about audible intensity, balance, emphasis, connection, breath, arrival, taper, release, sustained hold, or the overall shape of a phrase.
239
+
240
+ High-quality answers include:
241
+ - one direction or shape from a closed set: intensifying, relaxing, level, or arching;
242
+ - one timestamp marking a stated peak, breath, arrival, taper, or release;
243
+ - one comparative label such as more intense, less intense, more connected, or less sustained; or
244
+ - one change type such as gradual or sudden.
245
+
246
+ Match the answer to the analysis's wording. Do not translate a general expressive adjective into a precise dynamic level. When comparing phrases, ask about exactly one dimension. Do not ask where the peak occurs and how the performer reaches it in the same question.
247
+
248
+ Prevent answer leakage: do not call a passage a crescendo before asking its direction, describe a phrase as fading before asking about its ending, or identify a point as the peak before asking where the peak occurs. Avoid generic emotional labels and questions whose answer is predictable merely because the stem identifies a climax.
249
+
250
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple arrivals, peaks, or releases could plausibly match should the question become context-heavy, adding the thematic occurrence, phrase opening, melodic or harmonic trajectory, surrounding texture, a nearby event, or-if still needed-a broad search interval. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
251
+
252
+ Example forms:
253
+ - "Across the opening melodic phrase, which intensity contour is heard: steady intensification, steady relaxation, approximately level, arch, reverse arch, terraced increase, or terraced decrease?"
254
+ - "Following the melody entrance at <melody-entry-time>, at which timestamp does the rising foreground line over repeated chords reach its strongest arrival?"
255
+ - "At the melody's return at <theme-return-time>, which intensity-change type is heard: gradual increase, gradual decrease, sudden increase, sudden decrease, terraced change, arch-shaped change, or approximately unchanged?"
256
+ - "Toward which octave-qualified pitch does the performer build the first complete foreground phrase?"
257
+ - "During the second statement of the primary theme, at what timestamp does the foreground line over repeated chords reach its first clear cadential endpoint?"
258
+
259
+ ## FUNCTION
260
+
261
+ Choose an explicit claim about the structural role of a musical unit: opening, statement, continuation, transition, intensification, climax, return, dissolution, cadence, coda, or closing gesture.
262
+
263
+ High-quality answers include:
264
+ - one structural role selected from a finite set;
265
+ - one timestamp locating a uniquely identified structural event;
266
+ - one stated function of a recurrence; or
267
+ - one decisive audible event that the analysis identifies as a boundary.
268
+
269
+ Use this axis only when the requested answer is structural role or location. Do not turn a question about a pitch, chord, texture, dynamic direction, or rhythmic property into a Function question merely because it occurs at a boundary.
270
+
271
+ Do not derive a conventional form from the piece's identity or broader musical knowledge. Do not identify something as a return, transition, or climax in the stem and then ask for that same role. When asking for a timestamp, describe the event without using its answer timestamp.
272
+
273
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple structural moments could plausibly match should the question become context-heavy, adding the theme or gesture involved, how it differs from another occurrence, its surrounding transition or cadence, a nearby event, or-if still needed-a broad search interval. Labels such as "the principal idea" need expansion only when they could identify more than one passage. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
274
+
275
+ Example forms:
276
+ - "Which formal function best describes the passage launched by the detached bass figure at <bass-figure-entry-time>: opening, thematic statement, continuation, transition, intensification, climax, or closing gesture?"
277
+ - "During the final return of the opening material, between <section-start> and <section-end>, at what timestamp does the opening melody give way to the detached chordal closing refrain?"
278
+ - "Which formal function best describes the recurrence of the opening gesture at <gesture-return-time>: restatement, continuation, transition, intensification, climax, dissolution, or closure?"
279
+ - "Which octave-qualified leading tone drives the modulation launched by the bass change at <bass-change-time>, before the opening theme returns in its original register and accompaniment?"
280
+ - "During the first full statement of the singing theme, between <theme-start> and <theme-end>, at what timestamp does its contrasting chordal continuation begin?"
281
+ - "Across the performance, at which timestamps does the main theme begin each complete presentation containing both its opening repeated-note gesture and its closing cadential continuation?"
282
+
283
+ ## RHYTHM AND TIME
284
+
285
+ Choose an explicit claim about pulse, subdivision feel, recurrence, displacement, syncopation, temporal regularity, pause, restart, rhythmic suspension, or contrast between rhythmic layers.
286
+
287
+ High-quality answers include:
288
+ - one stated count of a clearly defined recurring cell;
289
+ - one controlled pulse label such as steady, fluctuating, or suspended;
290
+ - one subdivision feel such as duple, triple, or irregular;
291
+ - one layer carrying a stated rhythmic pattern; or
292
+ - one timestamp marking a conspicuous pause, delayed entrance, or restart.
293
+
294
+ Ask only for rhythmic information explicitly supplied by the analysis. Do not infer meter, exact note values, or a numerical tempo. Define the recurring event precisely enough that a count has one answer. Keep expressive timing choices such as deliberate acceleration, relaxation, and agogic emphasis under Particular performance decisions unless the analysis treats them only as broad rhythmic organization.
295
+
296
+ Avoid counts in dense or vaguely bounded passages and questions whose stem already names the pulse or subdivision being requested.
297
+
298
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple rhythmic events could plausibly match should the question become context-heavy, adding the recurring cell, the layer carrying it, its thematic occurrence, a nearby event, or-if still needed-a broad search interval. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
299
+
300
+ Example forms:
301
+ - "During the second statement of the primary theme, which pacing behavior is heard: steady, accelerating overall, decelerating overall, fluctuating, suspended, abruptly interrupted, or restarting after a pause?"
302
+ - "How many complete repetitions of the short-short-long foreground cell occur after its first entrance at <cell-entry-time> before it changes at <cell-change-time>?"
303
+ - "Which subdivision feel characterizes the accompaniment beneath the first full statement of the theme: duple, triple, quadruple, quintuple, sextuple, septuple, or irregular?"
304
+ - "Among A4, C5, and E-flat5 in the opening foreground gesture, which note is performed fastest?"
305
+
306
+ ## PARTICULAR PERFORMANCE DECISIONS
307
+
308
+ Choose one interpretive decision that the auditory analysis explicitly attributes to the performer: articulation or connection, rubato, acceleration, relaxation, agogic emphasis, attack character, note length, balance, resonance, or changed treatment of repeated material.
309
+
310
+ Also allow a likely missed note or disrupted continuation as a particular performance event when the analysis explicitly grounds it in the surrounding melodic line, pitches, pacing, emphasis, or hesitation. Phrase the question and answer entirely as something a listener could hear or infer, such as a likely missed note interrupting a descending line. Describe only the audible event, never how it was identified, and do not present the performer's intention as certain.
311
+
312
+ High-quality answers include:
313
+ - one comparative articulation label such as more connected, more detached, or unchanged;
314
+ - one pacing choice such as accelerating, relaxing, or remaining even;
315
+ - one pitch or arrival explicitly identified as receiving emphasis;
316
+ - one stated contrast in the treatment of repeated material; or
317
+ - one timestamp locating a distinctive interpretive intervention.
318
+
319
+ The analysis must state both the choice and the moment or comparison that defines it. Do not infer physical technique, intention, emotion, or causation. Do not convert a general description of musical structure into a performer decision. If the analysis says the delivery remains even, that may be the answer; never invent a distinction merely to make a more dramatic question.
320
+
321
+ Ask about one decision and one comparison dimension only. Do not disclose words such as "accelerates," "detached," or "emphasized" in the stem when they are the requested answer.
322
+
323
+ Avoid expectancy questions whose setting makes the answer conventional and therefore easy. **Bad:** "As the cadence arrives, how does the tempo change?" A cadence normally primes "slows down." Use this question form only when the analysis explicitly gives a genuinely contrary answer, such as acceleration or unchanged pacing, and do not announce in the stem that the result is surprising or contrary.
324
+
325
+ For timestamp-answer questions, first ask whether the target is already unique from a concise musical description. If it is, do not add unnecessary context. Only when multiple performance decisions could plausibly match should the question become context-heavy, adding the thematic occurrence, affected voice or gesture, comparison with an earlier statement, a nearby event, or-if still needed-a broad search interval. A superlative such as "the greatest rubato" needs expansion only when its comparison scope is unclear. Add only what is required to leave one defensible location, and never include the target timestamp or a rounded equivalent.
326
+
327
+ Example forms:
328
+ - "Compared with the opening statement, which articulation treatment characterizes the second full statement of the primary theme: much more connected, slightly more connected, approximately unchanged, slightly more detached, much more detached, alternating connected and detached, or irregularly mixed?"
329
+ - "During the foreground gesture beginning at <gesture-start> and ending at the rest at <rest-start>, which pacing treatment is heard: steady acceleration, steady relaxation, approximately even pacing, continuous fluctuation, a sustained pause, slow-then-fast pacing, or fast-then-slow pacing?"
330
+ - "Which octave-qualified pitch receives the clearest agogic emphasis in the upper line immediately before the bass resumes its steady motion at <bass-restart-time>?"
331
+ - "Which octave-qualified pitch is performed with the shortest sounding duration during the opening gesture of the main subject?"
332
+ - "During the second statement of the primary theme, at what timestamp does the performer apply the greatest rubato to the turn into its closing cadence?"
333
+
334
+ Non-example and narrow exception:
335
+ - **Reject as predictable:** "As the cadence arrives at 00:50.25, how does the tempo change?" The cadence itself strongly suggests slowing down.
336
+ - **Permitted only with contrary ground truth:** The same neutral question form may be used if the analysis explicitly states that the performer instead accelerates or maintains the pace. Do not add "unexpectedly," "surprisingly," "rather than slowing," or any other cue that discloses the contradiction.
337
+
338
+ -
339
+
340
+ TIME-STAMPED AUDITORY ANALYSIS:
341
+ [TIME-STAMPED AUDITORY ANALYSIS]
342
+
343
+ /Users/milanliessens/miniconda3/lib/python3.13/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.1) or chardet (7.4.3)/charset_normalizer (3.4.4) doesn't match a supported version!
344
+ warnings.warn(
345
+ /Users/milanliessens/miniconda3/lib/python3.13/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.1) or chardet (7.4.3)/charset_normalizer (3.4.4) doesn't match a supported version!
346
+ warnings.warn(
prompts/structural-segmentation.txt ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MUNO REPRESENTATION:
2
+ [MUNO-S REPRESENTATION]
3
+
4
+ SEGMENTATION INSTRUCTIONS:
5
+ **Task:** Segment **the complete piece** of **[COMPOSER] - [TITLE]** into musically meaningful sections, theme presentations, and phrases using the supplied time-annotated MuNo representation.
6
+
7
+ **Core Objective:** Produce a hierarchical structural map that tells a musician exactly where each segment begins and ends in the written music. Identify recurring or transformed thematic material, phrase boundaries, and larger formal sections. A segment may contain smaller segments, and independently meaningful segments may overlap.
8
+
9
+ You may use your prior musical knowledge of the composer, piece, genre, and conventional formal terminology to recognize and name themes or sections. Use that knowledge as an interpretive aid, but ground every boundary in the supplied MuNo representation. Do not invent boundaries or assert a conventional formal label when the music does not support it.
10
+
11
+ ### I. Segmentation Levels
12
+
13
+ Use only these values for 'kind':
14
+
15
+ * 'section': a large-scale formal region, such as 'Exposition', 'Development', 'Recapitulation', or 'Coda' when those labels are supported by the music.
16
+ * 'theme': a particular presentation, return, or transformation of identifiable thematic material, such as 'Presentation of Primary Theme' or 'Varied repeat of Secondary Theme'.
17
+ * 'phrase': a complete or incomplete musical thought or local phrase function, such as 'Opening statement', 'Cadence', 'Build-up', or 'Culmination'.
18
+
19
+ Keep these levels distinct: use 'section' for large formal divisions, 'theme' for occurrences of thematic material, and 'phrase' for local musical statements and functions. Prefer musically informative names and do not use generic numbered labels unless the musical function truly cannot be determined from the data.
20
+
21
+ Phrases should normally be short spans of approximately 1-4 bars. Use a longer phrase only when a clearly continuous musical thought has no defensible internal boundary; do not subdivide below the phrase level.
22
+
23
+ Treat slurs, if any, as indicative for musical grouping. A slur in a melodic voice often indicates how notes belong to one gesture, where a phrase continues, and where a new phrase or phrase member may begin. Follow the slurs within each continuous voice, giving particular weight to slurs that shape the principal melody; when several slurs occur simultaneously in different voices, interpret each layer separately before deciding the larger boundary. Do not mechanically equate every slur with a complete phrase, but do not ignore or lightly override melodic slur groupings without stronger contrary evidence from cadence, harmony, repetition, texture, or timing.
24
+
25
+ Do not assume that the highest written voice is the melody. Identify the principal melody through a combination of thematic and phrase logic, knowledge of the piece, continuity within each voice, and velocities or prominence otherwise indicated the score through accents, tenuti, or slurs. An inner or lower voice may carry the principal melody while a higher voice supplies decoration, accompaniment, countermelody, or harmonic color.
26
+
27
+ Also examine the number and sequence of bars in each musical thought. Two-, four-, and eight-bar spans, especially four- and eight-bar passages, are important evidence for phrase structure, thematic presentation, periodic organization, repetition, and larger grouping. Test proposed boundaries against these common spans while allowing musically supported extensions, contractions, overlaps, interpolations, and irregular groupings. Bar-count symmetry alone is not sufficient, but it should be considered explicitly alongside melodic grouping and harmonic or cadential motion.
28
+
29
+ ### II. Boundary Rules
30
+
31
+ * Every segment must have a 'start_bar' and an 'end_bar'.
32
+ * Copy bar labels exactly as represented in MuNo, including pickup or repeat labels when applicable.
33
+ * Give boundaries only as bars. Do not include timestamps or other boundary units anywhere in the JSON response.
34
+ * The 'end_bar' is inclusive: both 'start_bar' and 'end_bar' belong to the segment.
35
+ * Adjacent segments may share a boundary when one ends as the next begins.
36
+ * Overlap is explicitly allowed. For example, a transition may begin during the final phrase of a theme, or a theme presentation may contain three constituent phrases.
37
+ * Do not force every bar into a phrase when the evidence does not support a meaningful phrase boundary. The complete piece should nevertheless be covered by one or more top-level 'section' segments.
38
+
39
+ ### III. Function, Role, and Hierarchy
40
+
41
+ * Use 'function_or_role' to state what the segment does in the piece, such as 'first presentation of the primary theme', 'varied return of the primary theme', 'fragmentation and development', 'antecedent phrase', 'continuation', 'transition', or 'cadential close'.
42
+ * Express hierarchy through the segment names, kinds, and inclusive bar ranges. Do not use IDs, parent fields, or parts fields.
43
+ * A theme presentation consisting of three phrases must be represented as one encompassing 'theme' segment plus three separate 'phrase' segments whose bar ranges fall within it.
44
+ * Repeated or transformed material should use consistent theme names, while 'function_or_role' explains whether each occurrence is a first presentation, return, variation, fragmentation, continuation, or another formal function.
45
+ * Overlapping functions should be represented as separate segment objects with overlapping bar ranges.
46
+
47
+ ### IV. Evidence Standard
48
+
49
+ Base boundaries and labels on concrete musical evidence available in MuNo: melodic slur grouping, thematic recurrence, recurring bar-span organization, cadential arrival, harmonic change, texture, register, voice-leading, dynamics, articulation, rests, timing gaps, tempo, rubato, and changes in performance intensity. Give melodic slurs and supported four- or eight-bar organization substantial weight when locating phrase, theme, and section boundaries.
50
+
51
+ For each segment, provide a short 'evidence' statement explaining the boundary or identity. Do not mention encoding syntax, velocity numbers, or unsupported historical/formal claims. If a conventional formal name is uncertain, use a descriptive musical name and state the uncertainty in 'evidence'.
52
+
53
+ ### V. Output Contract
54
+
55
+ Return only valid JSON with no prose outside the JSON and no Markdown fences. Use exactly this top-level structure:
56
+
57
+ {
58
+ "segments": [
59
+ {
60
+ "kind": "section",
61
+ "name": "<musically descriptive name>",
62
+ "function_or_role": "<structural, thematic, or phrase-level function>",
63
+ "start_bar": "<exact MuNo bar label>",
64
+ "end_bar": "<exact MuNo bar label>",
65
+ "evidence": "<concise, data-grounded explanation>"
66
+ }
67
+ ]
68
+ }
69
+
70
+ ### VI. Final Validation Before Responding
71
+
72
+ Verify that:
73
+
74
+ 1. Every segment has all required fields.
75
+ 2. Every segment has a 'start_bar' and an inclusive 'end_bar', both grounded in the supplied MuNo representation.
76
+ 3. The response contains no IDs, parent fields, parts fields, or 'relationship' field.
77
+ 4. Every segment states a clear 'function_or_role'.
78
+ 5. Encompassing theme or section ranges contain their constituent phrase ranges, except where an explicitly explained overlap occurs.
79
+ 6. Top-level sections collectively cover the requested scope.
80
+ 7. Theme returns and transformations are named consistently.
81
+ 8. The response contains no timestamp fields and parses as strict JSON.