Lilypond/Markato interoperability
Closed this issue · 2 comments
This is an open-ended issue/question that might belong more properly in a Wiki page.
Here's a short Markato song:
##TITLE Row Your Boat
##ARTIST Tim Peierls
##KEY F
: Fmaj9 Dm7 Am7/D Dm7
^Row, row, ^row ^your ^boat
: Gm9 C9 Bbmaj7/C C9
^Gently down the ^stream ^ ^
: Fmaj9 Dm7 Am7/D Dm7
^Merrily, merrily, ^merri^ly, ^merrily
: Gm9 C9 Bbmaj7/C C9
^Life is but a ^dream ^ ^
and here's a roughly equivalent rendering with Lilypond:
\version "2.19.46"
\language english
\header {
title = "Row Your Boat"
composer = "Tim Peierls"
tagline = ##f
}
% Change the transposedKey value to render in different key
transposedKey = f
originalKey = f
common = {
\key \originalKey \major
\time 12/8
}
harmony = \chordmode {
f2.:maj7 d4:m7 a8:m7/d d4.:m7
g2.:m9 c4:9 bf8:maj7/c c4.:9
}
melody = \relative c' {
f4. f f4 g8 a4. |
a4 g8 a4 bf8 c2. |
f8 f f c c c a a a f f f |
c'4 bf8 a4 g8 f2. |
\bar "|."
}
words = \lyricmode {
Row, row, row your boat
gent -- ly down the stream.
Mer -- ri --ly, mer -- ri -- ly,
mer -- ri -- ly, mer -- ri -- ly,
life is but a dream.
}
\score {
<<
\chords {
\transpose \originalKey \transposedKey {
\harmony \harmony
}
}
\new Staff {
\transpose \originalKey \transposedKey {
\common \melody
}
}
\addlyrics \words
>>
\layout {}
\midi { \tempo 4. = 120 }
}
(Don't worry about the dissonance on "dream".)
The latter generates
and a MIDI file (not shown here).
Question is whether there are compelling uses for being able to convert between these formats. One might, having written a song in Lilypond, want a quick way to publish it as chords-and-lyrics in Markato. Conversely, one might, having jotted a song down in Markato (with the melody in one's head), want a quick way to create a Lilypond source file to finish notating the melody and produce a lead sheet.
This raises an even bigger question: Would it be desirable to extend the Markato format to include melody and rhythm? The obvious extension point would be through the comment line.
And that leads to one more thing to consider for Markato, related to but independent of the above: support for syllabification markup. I would nominate the underscore character (_
) as good candidate for this.
This is a very intriguing idea. Other people have asked about Markato dealing with melodies and rhythms, and my answer tends to be that doing that would get very complicated very quickly and come at a cost of Markato's simplicity and readability. That doesn't mean it's out of the question, but it means it would require a lot of thought and probably isn't on the table in the near future.
If I were to do something with Lilypond, I think the most likely scenario would be going from Lilypond to Markato, as Markato data doesn't provide enough information to generate a lead sheet. Generating Markato from Lilypond sounds like a fun and ultimately doable problem if I ever have the free time, but I don't suspect it's a feature that the typical Markato user would be clamoring for. That said, I don't currently have data on who the typical Markato user is since it's so new, so who knows.
As for syllabification, I don't really see a use case for it considering there's no melody and ^
can go anywhere inside a word. Of course, if you really want syllables, nothing's stopping you from putting _
s or -
s all over your lyrics; it just wouldn't have any semantic meaning.
Then I'll close this for now. If I have time, I'll submit a pull request for the Markato to Lily conversion and re-open this. It would be enough just to produce a stub source file. Going the other direction would be pretty hard.