I had to show this html / javascript file I created using Claude. You type in your lyrics and it gives you the accent marks of your text. I call it the Lyric Meter Analyzer project. Here is some background:
I asked the question: Is there a way to convert poetry meter to musical meter?
Yes, there’s a rich and well-established relationship between poetry meter and musical meter — they share deep historical roots (song and poetry were essentially the same thing in ancient Greece), and converting between them is very doable, though it involves some interpretation.
The core correspondence
Poetic meter is built on feet — patterns of stressed (/) and unstressed (u) syllables. Musical meter is built on beats — patterns of strong and weak pulses grouped into measures. The two map onto each other naturally:
- A stressed syllable ≈ a strong beat (downbeat)
- An unstressed syllable ≈ a weak beat (upbeat or offbeat)
Foot-to-time-signature conversions
The most common poetic feet translate fairly cleanly into musical equivalents:
| Poetic Foot | Stress Pattern | Description | Musical Time Equivalent | Rhythmic Feel |
| Iamb | u / | Rising foot with stress on the second syllable | 2/4 or 6/8 | Pickup or anacrusis; forward‑leaning motion |
| Trochee | / u | Falling foot with initial stress | 2/4 | Strong downbeat; march‑like |
| Dactyl | / u u | One stressed syllable followed by two unstressed | 3/4 or 6/8 | Waltz‑like, rolling |
| Anapest | u u / | Two unstressed syllables leading into stress | 6/8 or 12/8 | Galloping, lilting |
| Amphibrach | u / u | Stress centered between two unstressed syllables | 3/4 (accent on beat 2) | Balanced, floating |
| Spondee | / / | Two equally stressed syllables | 2/2 (cut time) | Heavy, emphatic |
| Mixed Meter | Varies | Combination of different poetic feet | Changing or irregular meters | Shifting accents or time signatures |
| Pyrrhic | u u | Two unstressed syllables; the “ghost” foot with no strong beat | 2/4 (all weak subdivisions) | Light, fleeting, weightless |
| Cretic (Amphimacer) | / u / | Stressed syllable flanking an unstressed one; stress bookends the foot | 3/4 (accents on beats 1 & 3) | Assertive, outer-framed, declarative |
| Molossus | / / / | Three consecutive stressed syllables; maximum weight and density | 3/2 (half-note pulse, all accented) | Massive, ponderous, crushing |
| Choriamb | / u u / | Four-syllable foot: trochee + iamb fused; stress frames two weak syllables | 4/4 or 12/8 compound | Expansive, arch-shaped, soaring |
| Ionic a minore | u u / / | Two weak syllables build into two stressed ones; a rising surge used in Greek lyric poetry | 4/4 with delayed accent (beats 3 & 4 stressed) | Building, surging, delayed arrival |
Version two uses an external database, the CMU Pronouncing Dictionary , to make the stress markers more accurate. It has 134k entries! Just download the zip file and then open the html file in a browser. Can’t run it on this platform since it is a .js file. I have also included the “xsd” schema file and the xsl file for transformation if you have that capability.

