Skip to content

Instantly share code, notes, and snippets.

@walfie
Last active March 15, 2026 03:59
Show Gist options
  • Select an option

  • Save walfie/b049d32368cb579a5980d4fb49d416ba to your computer and use it in GitHub Desktop.

Select an option

Save walfie/b049d32368cb579a5980d4fb49d416ba to your computer and use it in GitHub Desktop.
Roman notation chords in Strudel
const romanChordMapping = { i: 0, ii: 1, iii: 2, iv: 3, v: 4, vi: 5, vii: 6 }
register('romanChord', function (scaleName, pat) {
return pat.as("roman:chordSuffix").fmap(({ roman, chordSuffix}) => {
const lower = roman.toLowerCase();
return n(romanChordMapping[lower]).scale(scaleName).fmap(value => {
return value.note.slice(0, -1) + (roman == lower ? 'm' : '') + (chordSuffix || '');
}).chord();
}).outerJoin();
});

Roman chord notation in Strudel

Example

Usage

"<I V vi iii IV I IV V>".romanChord("d:major").voicing().sound("piano")
"<i:7 [VI:sus VI:9] III:7 [VI VI:7b5]>".romanChord("a:minor").voicing().sound("gm_epiano1")

Lowercase Roman numerals will append "m" to the root note name, which could cause some voicings to not match (e.g., "vi:sus"). In these cases, use uppercase Roman numerals (e.g., "VI:sus").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment