lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic generation of scores skeletons


From: Jacques Menu
Subject: Re: Automatic generation of scores skeletons
Date: Fri, 18 Oct 2013 18:01:19 +0200

Hello Johann,


Here is what I've come to after some cleanup:

address@hidden > ./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:

address@hidden > 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:

Attachment: ThemaAllegroWoO37Trio_with_notes.ly
Description: Binary data

Attachment: ThemaAllegroWoO37Trio_with_all_bar_numbers.ly
Description: Binary data

Attachment: ThemaAllegroWoO37Trio_without_notes.ly
Description: Binary data



Removing the "barNumbersAtBeginningOflines" can be done simply by writing it "_barNumbersAtBeginningOflines" instead for example, which leads to:

Attachment: 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

--

Jacques Menu
Ch. de la Pierre 12
1023 Crissier






reply via email to

[Prev in Thread] Current Thread [Next in Thread]