Re: Automatic generation of scores skeletons
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] fileNamefor example: ./GenerateLilypondSkeleton.py -n dis ThemaAllegroWoO37Trio.jsonFrom 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--Jacques MenuCh. de la Pierre 121023 Crissiermailto:jacques.m...@tvtmail.ch ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
On Thu, Oct 10, 2013 at 2:22 AM, Johan Vromans wrote: > Jacques Menu writes: > > > After struggling with irregular bars, I've been working on a Python3 > tool that > > transforms a spec such as: > > [...] > > into a ready-to-compile Lilypond source file. > > Very interesting. It reminds me of something I considered a while ago: > a kind of meta-staff where the structure of the score is described > (time/tempo, repeats, special \bar's, and so on). These would then apply > to all the staffs automatically. > > The rationale is that while a LilyPond score consists of horizontal > staffs, it is in fact structured vertically and sometimes it has > advantages to treat it as such. For example, using pseudo-LP: > This is a variant on the technique I use in my own templating system for SATB hymns. I have one LP file where I define the actual music. In addition to each voice part, I also define a "meta-voice" that contains the information about key, time signature, bars, etc., that is applied as an additional voice on each staff. Carl ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Hi, 2013/10/9 Jacques Menu > Do you think there could be interest in such a tool for anyone else than its > author? I'm interested, although i don't have time to delve deeper into this now (that's why i didn't answer immediately) - sorry :-( What would be important for me: making it as generic as possible (so that it wouldn't impose using a particular score structure), even at the cost of some features. And adding it to LilyPond itself (built-in). best, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Hello Paul, Le 13 oct. 2013 à 18:49:01, Paul Morris a écrit : > Jacques Menu-2 wrote >> Also, entering the spec data could be done in a GUI window as an >> extension. > > I could see this being integrated into Frescobaldi, perhaps? I'll contribute it with pleasure! JM > > Nice work, btw! > -Paul > > > > -- > View this message in context: > http://lilypond.1069038.n5.nabble.com/Automatic-generation-of-scores-skeletons-tp152025p152260.html > Sent from the User mailing list archive at Nabble.com. > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Jacques Menu-2 wrote > Also, entering the spec data could be done in a GUI window as an > extension. I could see this being integrated into Frescobaldi, perhaps? Nice work, btw! -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Automatic-generation-of-scores-skeletons-tp152025p152260.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Simon Bailey writes: > this sounds similar to reinhold kainhofer's orchestralily package: > http://kainhofer.com/orchestrallily/ A quick glance on this impressive(!) project learns that it is about maintaining scores and (horizontal) parts ( = voices ). What I have in mind is imposing horizontal structure (bars, repeats) on the vertical parts ( = movements ). Maybe I should go for a proof-of-concept to make clear what's all about. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Hello Johan, Leave me a week or two to have a version I can make available. Will keep you informed! JM Le 10 oct. 2013 à 08:22:32, Johan Vromans a écrit : > Jacques Menu writes: > >> After struggling with irregular bars, I've been working on a Python3 tool >> that >> transforms a spec such as: >> [...] >> into a ready-to-compile Lilypond source file. > > Very interesting. It reminds me of something I considered a while ago: > a kind of meta-staff where the structure of the score is described > (time/tempo, repeats, special \bar's, and so on). These would then apply > to all the staffs automatically. > > The rationale is that while a LilyPond score consists of horizontal > staffs, it is in fact structured vertically and sometimes it has > advantages to treat it as such. For example, using pseudo-LP: > > structure = { > A1 > \repeat volta 2 { > A2 > } > \alternative{ > A21 > A22 > } > A3 > \bar "||" > A4 > \bar ":|" > A5 > } > A1 = { ... } > B1 = { ... } > C1 = { ... } > ... and so on ... > voiceA = { \A1 \A2 \A21 \A22 \A3 \A4 \A5 } > voiceB = { \B1 \B2 \B21 \B22 \B3 \B4 \B5 } > voiceC = { \C1 \C2 \C21 \C22 \C3 \C4 \C5 } > > Much can be achieved with macro's, I know. > > Can you give me a url for your tool? > > Thanks, > > -- Johan > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
hi, this sounds similar to reinhold kainhofer's orchestralily package: http://kainhofer.com/orchestrallily/ i'm not sure if reinhold is still actively maintaining it, but it might also be worth a look. regards, sb On Thu, Oct 10, 2013 at 8:22 AM, Johan Vromans wrote: > Jacques Menu writes: > > > After struggling with irregular bars, I've been working on a Python3 > tool that > > transforms a spec such as: > > [...] > > into a ready-to-compile Lilypond source file. > > Very interesting. It reminds me of something I considered a while ago: > a kind of meta-staff where the structure of the score is described > (time/tempo, repeats, special \bar's, and so on). These would then apply > to all the staffs automatically. > > The rationale is that while a LilyPond score consists of horizontal > staffs, it is in fact structured vertically and sometimes it has > advantages to treat it as such. For example, using pseudo-LP: > > structure = { > A1 > \repeat volta 2 { > A2 > } > \alternative{ > A21 > A22 > } > A3 > \bar "||" > A4 > \bar ":|" > A5 > } > A1 = { ... } > B1 = { ... } > C1 = { ... } > ... and so on ... > voiceA = { \A1 \A2 \A21 \A22 \A3 \A4 \A5 } > voiceB = { \B1 \B2 \B21 \B22 \B3 \B4 \B5 } > voiceC = { \C1 \C2 \C21 \C22 \C3 \C4 \C5 } > > Much can be achieved with macro's, I know. > > Can you give me a url for your tool? > > Thanks, > > -- Johan > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- Do not meddle in the affairs of trombonists, for they are subtle and quick to anger. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Jacques Menu writes: > After struggling with irregular bars, I've been working on a Python3 tool that > transforms a spec such as: > [...] > into a ready-to-compile Lilypond source file. Very interesting. It reminds me of something I considered a while ago: a kind of meta-staff where the structure of the score is described (time/tempo, repeats, special \bar's, and so on). These would then apply to all the staffs automatically. The rationale is that while a LilyPond score consists of horizontal staffs, it is in fact structured vertically and sometimes it has advantages to treat it as such. For example, using pseudo-LP: structure = { A1 \repeat volta 2 { A2 } \alternative{ A21 A22 } A3 \bar "||" A4 \bar ":|" A5 } A1 = { ... } B1 = { ... } C1 = { ... } ... and so on ... voiceA = { \A1 \A2 \A21 \A22 \A3 \A4 \A5 } voiceB = { \B1 \B2 \B21 \B22 \B3 \B4 \B5 } voiceC = { \C1 \C2 \C21 \C22 \C3 \C4 \C5 } Much can be achieved with macro's, I know. Can you give me a url for your tool? Thanks, -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Automatic generation of scores skeletons
Jacques, This sounds like a great idea to me. I'm surprised no one else has commented. Tim Reeves > Message: 1 > Date: Wed, 9 Oct 2013 18:15:15 +0200 > From: Jacques Menu > To: "lilypond-user@gnu.org Users" > Cc: Jacques Menu > Subject: Automatic generation of scores skeletons > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Hello Folks, > > After struggling with irregular bars, I've been working on a Python3 > tool that transforms a spec such as: > > { > "title" : "Thema allegro", > "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, > "lastBarNumber" : 150, > > "finalBarPosition" : "150: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" > > } > > into a ready-to-compile Lilypond source file. > > The latter contains either actual notes (all the same pitch) to > check the layout, or lines merely containing the "%nnn" comment at > the end, ready to be filled with the actual notes by whichever means. > > The spec is in JSON format, which avoids writing a specific parser. > > "136:4/8-144:3/8" denotes a range starting at the 4th eight in > measure 136 and ending at the 4rd eight in measure 144, inclusive. > > There are still issues regarding the description of alternatives, as > you can see. > > barNumbersAtBeginningOflines can be used optionally to force line > breaks, to help check the score comparing it with the original. > There's also the possibility to specify doubleBarsPositions. > > The score described by the spec above is part of Beethoven's Trio X > WoO37 for flute, bassoon and piano: > > > > The same skeleton could be used for the other instruments, of course. > > Also, entering the spec data could be done in a GUI window as an extension. > > Do you think there could be interest in such a tool for anyone else > than its author? > > JM > > -- > > Jacques Menu > Ch. de la Pierre 12 > 1023 Crissier > > mailto:jacques.m...@tvtmail.ch >___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user