Hello Johann, Here is what I've come to after some cleanup: menu@mac > ./GenerateLilypondSkeleton.py -h --> Usage: ./GenerateLilypondSkeleton.py [-h|--help] [-d|--debug] [-b|--barNumbers] [(-n|--notes=) aLilypondNoteOrRest] fileName for example: ./GenerateLilypondSkeleton.py -n dis ThemaAllegroWoO37Trio.json From the following JSON spec: menu@mac > cat ThemaAllegroWoO37Trio.json { "version" : "2.17.19", "title" : "Thema allegro", "__subtitle" : "pour instruments en Ut", "__subsubtitle" : "(en Ré majeur, tonalité originale Mib)", "composer" : "Ludwig van Beethoven (1808 -1854)", "tagline" : "J. Menu - September 2013", "enteredby" : "Jacques Menu", "instrumentName" : "Bassoon", "clef" : "bass", "key" : "g \\major", "time" : "2/4", "initialUpBeat" : "8*1", "firstBarNumber" : 129, "finalBarPosition" : "150:4/8", "doubleBarsPositions" : ["132:4/8"], "barNumbersAtBeginningOflines" : [135, 142, 146], "tempoMarks" : { "129:1/8":"Thema allegro", "144:1/8":"Coda"}, "repeats" : [ {"128:4/8-136:3/8": [1, []]}, {"136:4/8-144:3/8": [2, ["144:1/8-144:3/8", "144:1/8-144:4/8"]]} ], "partName" : "bassoonPart" } the following LP source files can be obtained automatically: |
ThemaAllegroWoO37Trio_with_notes.ly
Description: Binary data
ThemaAllegroWoO37Trio_with_all_bar_numbers.ly
Description: Binary data
ThemaAllegroWoO37Trio_without_notes.ly
Description: Binary data
Removing the "barNumbersAtBeginningOflines" can be done simply by writing it "_barNumbersAtBeginningOflines" instead for example, which leads to: |
ThemaAllegroWoO37Trio_without_forced_breaks.ly
Description: Binary data
I'm still working on the repeats alternatives, currently not handled, and the reason why I started all this actually. Also, "tempoMarks" could be specified as a list, as "repeats" is, for regularity. The constraints on JSON syntax make the latter a bit complex, I'm afraid, with number of repetitions and list of alternatives... A nice w-e! JM |
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user