Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-30 Thread Kieren MacMillan
Hi Urs (et al.),

>> Would anyone care to comment about the relative advantages (and most 
>> appropriate use cases) of:
>> - Edition Engraver
> 
> * separate tweaks (or optional contents (like marks, dynamics, but no notes)) 
> from the content
>   => keep the content file simple
> * store *sets of tweaks* for different targets (stressing this is what I miss 
> most in Stefano's text)
>   => Have different tweaks for score/part, a4/tablet, manuscript/original 
> edition or for transposed/concert pitch
> * All this without touching the content files - differently from tags

These are all great, and give most of the main reasons I rely heavily on the EE 
for literally every score I engrave.

>> - lilypond tags
> I can't really comment on them because I never liked them.

I didn't, either… but pre-EE, they were the best way [I knew of] to get done 
what I needed to get done.

> Opposite from the edition-engraver they clutter the content files with their 
> hard-coded switches.
> *But*: depending on the use case this can also be an advantage as the 
> information is robustly encoded in the main file.

Yes. There are still use cases in which the tag system is superior. In fact, 
the score I'm currently working on (a 90-minute stage musical comprising 30ish 
songs/cues) is a perfect example. At the request of the theatre company 
currently rehearsing it (for production in March), we toned down the "racier" 
bits (lyrics with sexual innuendo, etc.). So I have \tag #'PG and \tag #'G 
chunks in the note code. Now I can simply generate G-rated or PG-rated 
version(s) of the score — or even individual tunes within the whole show — as 
desired by any future producing theatre.

> With the edition-engraver you might actually lose them one day, or the tool 
> doesn't work anymore, who knows.

Let's hope the EE — or something very much like it — gets absorbed into the 
main distro someday.

Best regards,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-30 Thread Urs Liska



Am 30.01.2018 um 18:19 schrieb Graham King:

On 29 Jan 2018, at 20:36, Stefano Troncaro wrote:


Hello again everyone!

In a recent thread I was asked to write a little bit depicting how I would have liked to 
learn about using the Edition Engraver. I share it here so that others can give their 
insights. Hopefully we can make a "quick start guide" kind of thing to help 
future users.



Thank you Stefano; this is really helpful.

Would anyone care to comment about the relative advantages (and most 
appropriate use cases) of:
- Edition Engraver


* separate tweaks (or optional contents (like marks, dynamics, but no 
notes)) from the content

  => keep the content file simple
* store *sets of tweaks* for different targets (stressing this is what I 
miss most in Stefano's text)
  => Have different tweaks for score/part, a4/tablet, 
manuscript/original edition or for transposed/concert pitch

* All this without touching the content files - differently from tags


- lilypond tags, and


I can't really comment on them because I never liked them.
Opposite from the edition-engraver they clutter the content files with 
their hard-coded switches.
*But*: depending on the use case this can also be an advantage as the 
information is robustly encoded in the main file.
With the edition-engraver you might actually lose them one day, or the 
tool doesn't work anymore, who knows.



- git version control branches?


This is something completely different. You generally use them to 
encapsulate work in independent *sessions*, so you (or you and someone 
else) can cleanly work on different parts/tasks at the same time and 
still create a clean history. You should usually not use branches for 
different versions of something because that tends to become a 
maintenance nightmare.
That said, you *can* have (for example) a "core" and a "beautified" 
branch with the "beautified" branch running in parallel to the core 
content. But I wouldn't actually do that.


HTH
Urs


___
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: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-30 Thread Graham King

On 29 Jan 2018, at 20:36, Stefano Troncaro wrote:

> Hello again everyone!
> 
> In a recent thread I was asked to write a little bit depicting how I would 
> have liked to learn about using the Edition Engraver. I share it here so that 
> others can give their insights. Hopefully we can make a "quick start guide" 
> kind of thing to help future users.


Thank you Stefano; this is really helpful.

Would anyone care to comment about the relative advantages (and most 
appropriate use cases) of:
- Edition Engraver
- lilypond tags, and
- git version control branches?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-30 Thread Stefano Troncaro
I'm glad you found it useful!

There are other powerful aspects of the EE that got left out because I
don't understand them well enough yet, but I plan to write about them when
I am confident with their use.

Since I have only used git on personal private repos, I'm not sure about
the workflow of proposing changes, and I don't want to cause
inconveniences. So, if you don't mind, I'd rather leave the "add it to the
wiki" part to you. Maybe I'll have it figured by the time I have something
else to add to the guide.

Best regards,
Stéfano

2018-01-30 3:39 GMT-03:00 Jan-Peter Voigt :

> Thank you very much, Stefano!
> This is very helpful and shall be, like Urs said, added to the Wiki.
>
> Best
> Jan-Peter
>
> Am 29.01.2018 um 21:36 schrieb Stefano Troncaro:
>
>> Hello again everyone!
>>
>> In a recent thread I was asked to write a little bit depicting how I
>> would have liked to learn about using the Edition Engraver. I share it here
>> so that others can give their insights. Hopefully we can make a "quick
>> start guide" kind of thing to help future users.
>>
>> I'll say it ended up being longer than I anticipated. I formatted it a
>> little to improve readability. Here it goes:
>>
>>
>> *My quick rundown of how to use OpenLilyLib's Edition Engraver
>> *(OR I wish I could have read this instead of having to learn by poking
>> example code with a stick)
>>
>>
>> What is it?
>>
>> In a nutshell, the Edition Engraver provides a convenient way of storing
>> a tweaks, overrides and other objects that can later be applied to some
>> musical content.
>>
>>
>> Why use it?
>>
>> To keep the "musical source" of a project free from tweaks, temporary
>> overrides, and tagged material that needs to be filtered later. This serves
>> to generate code that is clean, reusable and has clarity of purpose,
>> meaning it's fast to read and understand.
>>
>>
>> How is it used?
>>
>> In summary, by following this four logical steps:
>>
>>  1. Load the Edition Engraver into the project.
>>  2. Create an edition (a container to store the edits)
>>  3. Fill the edition with content.
>>  4. Consist the contents of the edition to the musical contexts to which
>> they apply.
>>
>>
>> Each step explained:
>>
>> 1) Loading the Edition Engraver:
>>
>> Assuming OpenLilyLib is already installed on your working environment,
>> include it's core functionality:
>>
>> \include "oll-core/package.ily"
>>
>>
>> Then, load the Edition Engraver itself:
>>
>> \loadPackage edition-engraver
>>
>>
>>
>> 2) Creating an edition
>>
>> Just use the /\addEdition/ command. Like this:
>>
>> \addEdition edition-name
>>
>>
>>
>> 3) Filling the edition with content
>>
>> The most basic way to do this is by using the /\editionMod/ command. It
>> is used as follows:
>>
>> \editionMod edition measure position context content
>>
>>
>> Breaking it apart:
>>
>>   * /edition/ specifies in what edition the content is stored.
>>   * /measure/ specifies in what measure of the music the content is to
>> be placed.
>>   * /position/ specifies where where exactly in that measure the content
>> is to be placed.
>>   * /context/ specifies in what context the content belongs.
>>   * /content/ specifies, finally, what should be placed there.
>>
>> So, this means that
>>
>> \editionMod my-edition 5 0/4 Score \break
>>
>>
>> will store in /my-edition/ that a /\break/ needs to be placed in the
>> /Score/ context, in measure /5/, specifically at /0/4/, which is its first
>> beat.
>>
>>
>> 3.1) About the position value
>>
>> The way I understand it is that this is the amount of musical time that
>> is counted from the start of the given measure. A few useful examples:
>>
>>   * /0/4/ will not add anything, so it references the first beat of the
>> measure.
>>   * /3/8/ will count three 8th notes / quavers from the start of the
>> measure. In 4/4 time this would reference the second half of the
>> second beat.
>>   * /1/24/ will count one 16th note / semiquaver of a 16th note triplet.
>> If the measure starts with 16th note triplets, this will point to
>> the second note of the measure. The fraction is expressed like this
>> because there are 24 "tripleted 16th not

Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Jan-Peter Voigt

Thank you very much, Stefano!
This is very helpful and shall be, like Urs said, added to the Wiki.

Best
Jan-Peter

Am 29.01.2018 um 21:36 schrieb Stefano Troncaro:

Hello again everyone!

In a recent thread I was asked to write a little bit depicting how I 
would have liked to learn about using the Edition Engraver. I share it 
here so that others can give their insights. Hopefully we can make a 
"quick start guide" kind of thing to help future users.


I'll say it ended up being longer than I anticipated. I formatted it a 
little to improve readability. Here it goes:



*My quick rundown of how to use OpenLilyLib's Edition Engraver
*(OR I wish I could have read this instead of having to learn by poking 
example code with a stick)



What is it?

In a nutshell, the Edition Engraver provides a convenient way of storing 
a tweaks, overrides and other objects that can later be applied to some 
musical content.



Why use it?

To keep the "musical source" of a project free from tweaks, temporary 
overrides, and tagged material that needs to be filtered later. This 
serves to generate code that is clean, reusable and has clarity of 
purpose, meaning it's fast to read and understand.



How is it used?

In summary, by following this four logical steps:

 1. Load the Edition Engraver into the project.
 2. Create an edition (a container to store the edits)
 3. Fill the edition with content.
 4. Consist the contents of the edition to the musical contexts to which
they apply.


Each step explained:

1) Loading the Edition Engraver:

Assuming OpenLilyLib is already installed on your working environment, 
include it's core functionality:


\include "oll-core/package.ily"


Then, load the Edition Engraver itself:

\loadPackage edition-engraver



2) Creating an edition

Just use the /\addEdition/ command. Like this:

\addEdition edition-name



3) Filling the edition with content

The most basic way to do this is by using the /\editionMod/ command. It 
is used as follows:


\editionMod edition measure position context content


Breaking it apart:

  * /edition/ specifies in what edition the content is stored.
  * /measure/ specifies in what measure of the music the content is to
be placed.
  * /position/ specifies where where exactly in that measure the content
is to be placed.
  * /context/ specifies in what context the content belongs.
  * /content/ specifies, finally, what should be placed there.

So, this means that

\editionMod my-edition 5 0/4 Score \break


will store in /my-edition/ that a /\break/ needs to be placed in the 
/Score/ context, in measure /5/, specifically at /0/4/, which is its 
first beat.



3.1) About the position value

The way I understand it is that this is the amount of musical time that 
is counted from the start of the given measure. A few useful examples:


  * /0/4/ will not add anything, so it references the first beat of the
measure.
  * /3/8/ will count three 8th notes / quavers from the start of the
measure. In 4/4 time this would reference the second half of the
second beat.
  * /1/24/ will count one 16th note / semiquaver of a 16th note triplet.
If the measure starts with 16th note triplets, this will point to
the second note of the measure. The fraction is expressed like this
because there are 24 "tripleted 16th notes" in a whole note.



3.2) About referencing contexts

Precise control can be achieved by giving IDs to contexts. This is done 
with the /\editionID/ command:


\new Staff \with { \editionID my-staff } {
   \new Voice { c4 d e f }
}


This ID can be used like this:

\editionMod test 1 2/4 my-staff.Staff \accidentalStyle dodecaphonic
\editionMod test 1 3/4 my-staff.Voice.A \override NoteHead.color = #red


Notice that even though the ID /my-staff/ points to a specific /Staff/, 
/\editionMod/ still needs to know specifically where you need to inject 
the content. So, /my-staff.Staff/ puts it in the /Staff/ context, while 
/my-staff.Voice.A/ puts it in the first /Voice/ inside the /Staff/.


Voices are listed in the order they are created, starting with the 
symbol /A/, and each /Staff/ keeps a separate count. The Edition 
Engraver produces a ".edition.log" file listing all the contexts it 
finds along with their names. This is useful to work with music that 
requires spontaneous creation of Voices, such as piano music, where 
naming them provides a straightforward way of finding how to reference them.


Say you have an "example.ly <http://example.ly>" file with the following 
music:


\new Staff \with { \editionID my-staff } {
   \new Voice = "main-voice" \relative c'' {
     c4 d e f
     << { \voiceOne e d c2 }
    \new Voice = "spontaneous-voice" { \voiceTwo g2 e } >>
   }
}


This will produce an "example.edition.log"

Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Craig Dabelstein
Hi Stefano,

I really appreciate your work on this. Thanks so much.

All the best,

Craig


On 30 January 2018 at 08:52, Henning Hraban Ramm 
wrote:

> Hi Stéfano,
> I don’t know if I’ll ever use this, but your tutorial/intro is "just
> right"!
>
> Greetlings, Hraban
> ---
> fiëé visuëlle
> Henning Hraban Ramm
> http://www.fiee.net
>
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



-- 
*Craig Dabelstein*
Maxime's Music
craig.dabelst...@gmail.com
*http://maximesmusic.com *
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Henning Hraban Ramm
Hi Stéfano,
I don’t know if I’ll ever use this, but your tutorial/intro is "just right"!

Greetlings, Hraban
---
fiëé visuëlle
Henning Hraban Ramm
http://www.fiee.net




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Ben

On 1/29/2018 3:36 PM, Stefano Troncaro wrote:

Hello again everyone!

In a recent thread I was asked to write a little bit depicting how I 
would have liked to learn about using the Edition Engraver. I share it 
here so that others can give their insights. Hopefully we can make a 
"quick start guide" kind of thing to help future users.


I'll say it ended up being longer than I anticipated. I formatted it a 
little to improve readability. Here it goes:



*My quick rundown of how to use OpenLilyLib's Edition Engraver
*(OR I wish I could have read this instead of having to learn by 
poking example code with a stick)



What is it?

In a nutshell, the Edition Engraver provides a convenient way of 
storing a tweaks, overrides and other objects that can later be 
applied to some musical content.



Why use it?

To keep the "musical source" of a project free from tweaks, temporary 
overrides, and tagged material that needs to be filtered later. This 
serves to generate code that is clean, reusable and has clarity of 
purpose, meaning it's fast to read and understand.



How is it used?

In summary, by following this four logical steps:

 1. Load the Edition Engraver into the project.
 2. Create an edition (a container to store the edits)
 3. Fill the edition with content.
 4. Consist the contents of the edition to the musical contexts to
which they apply.


Each step explained  [  ]


Hopefully this will be enough to get anyone started. There is more 
functionality than this, as far as I know the only way to get a look 
into it is by examining the `usage-examples` folder in the Edition 
Engraver repository.


I'll be waiting for your input!
Stéfano



Stéfano,

Wow, thank you SO much for doing this! Great guide to get people up and 
running with EE!



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Urs Liska
Hey Stéfano,

this is totally awesome! As far as I can tell your text has exactly the amount 
of verbosity that is needed to introduce people to this kind of tool.

I will have very few and minor clarifications to ask for, and I suggest we put 
it on the GitHub Wiki page.

Thank you very much
Urs

Am 29. Januar 2018 21:36:48 MEZ schrieb Stefano Troncaro 
:
>Hello again everyone!
>
>In a recent thread I was asked to write a little bit depicting how I
>would
>have liked to learn about using the Edition Engraver. I share it here
>so
>that others can give their insights. Hopefully we can make a "quick
>start
>guide" kind of thing to help future users.
>
>I'll say it ended up being longer than I anticipated. I formatted it a
>little to improve readability. Here it goes:
>
>
>
>*My quick rundown of how to use OpenLilyLib's Edition Engraver*(OR I
>wish I
>could have read this instead of having to learn by poking example code
>with
>a stick)
>
>
>What is it?
>
>In a nutshell, the Edition Engraver provides a convenient way of
>storing a
>tweaks, overrides and other objects that can later be applied to some
>musical content.
>
>
>Why use it?
>
>To keep the "musical source" of a project free from tweaks, temporary
>overrides, and tagged material that needs to be filtered later. This
>serves
>to generate code that is clean, reusable and has clarity of purpose,
>meaning it's fast to read and understand.
>
>
>How is it used?
>
>In summary, by following this four logical steps:
>
>   1. Load the Edition Engraver into the project.
>   2. Create an edition (a container to store the edits)
>   3. Fill the edition with content.
>4. Consist the contents of the edition to the musical contexts to which
>   they apply.
>
>
>Each step explained:
>
>1) Loading the Edition Engraver:
>
>Assuming OpenLilyLib is already installed on your working environment,
>include it's core functionality:
>
>\include "oll-core/package.ily"
>>
>
>Then, load the Edition Engraver itself:
>
>\loadPackage edition-engraver
>>
>
>
>2) Creating an edition
>
>Just use the *\addEdition* command. Like this:
>
>\addEdition edition-name
>>
>
>
>3) Filling the edition with content
>
>The most basic way to do this is by using the *\editionMod* command. It
>is
>used as follows:
>
>\editionMod edition measure position context content
>>
>
>Breaking it apart:
>
>   - *edition* specifies in what edition the content is stored.
>- *measure* specifies in what measure of the music the content is to be
>   placed.
> - *position* specifies where where exactly in that measure the content
>   is to be placed.
>   - *context* specifies in what context the content belongs.
>   - *content* specifies, finally, what should be placed there.
>
>So, this means that
>
>\editionMod my-edition 5 0/4 Score \break
>>
>
>will store in *my-edition* that a *\break* needs to be placed in the
>*Score*
>context, in measure *5*, specifically at *0/4*, which is its first
>beat.
>
>
>3.1) About the position value
>
>The way I understand it is that this is the amount of musical time that
>is
>counted from the start of the given measure. A few useful examples:
>
>  - *0/4* will not add anything, so it references the first beat of the
>   measure.
>   - *3/8* will count three 8th notes / quavers from the start of the
>measure. In 4/4 time this would reference the second half of the second
>   beat.
> - *1/24* will count one 16th note / semiquaver of a 16th note triplet.
>  If the measure starts with 16th note triplets, this will point to the
>second note of the measure. The fraction is expressed like this because
>   there are 24 "tripleted 16th notes" in a whole note.
>
>
>
>3.2) About referencing contexts
>
>Precise control can be achieved by giving IDs to contexts. This is done
>with the *\editionID* command:
>
>\new Staff \with { \editionID my-staff } {
>>   \new Voice { c4 d e f }
>> }
>>
>
>This ID can be used like this:
>
>\editionMod test 1 2/4 my-staff.Staff \accidentalStyle dodecaphonic
>> \editionMod test 1 3/4 my-staff.Voice.A \override NoteHead.color =
>#red
>>
>
>Notice that even though the ID *my-staff* points to a specific *Staff*,
>*\editionMod* still needs to know specifically where you need to inject
>the
>content. So, *my-staff.Staff* puts it in the *Staff* context, while
>*my-staff.Voice.A* puts it in the first *Voice* inside the *Staff*.
>
>Voices are listed in the order they are created, starting with the
>symbol
>*A*, and each *Staff* keeps a separa

My quick rundown of how to use OpenLilyLib's Edition Engraver

2018-01-29 Thread Stefano Troncaro
Hello again everyone!

In a recent thread I was asked to write a little bit depicting how I would
have liked to learn about using the Edition Engraver. I share it here so
that others can give their insights. Hopefully we can make a "quick start
guide" kind of thing to help future users.

I'll say it ended up being longer than I anticipated. I formatted it a
little to improve readability. Here it goes:



*My quick rundown of how to use OpenLilyLib's Edition Engraver*(OR I wish I
could have read this instead of having to learn by poking example code with
a stick)


What is it?

In a nutshell, the Edition Engraver provides a convenient way of storing a
tweaks, overrides and other objects that can later be applied to some
musical content.


Why use it?

To keep the "musical source" of a project free from tweaks, temporary
overrides, and tagged material that needs to be filtered later. This serves
to generate code that is clean, reusable and has clarity of purpose,
meaning it's fast to read and understand.


How is it used?

In summary, by following this four logical steps:

   1. Load the Edition Engraver into the project.
   2. Create an edition (a container to store the edits)
   3. Fill the edition with content.
   4. Consist the contents of the edition to the musical contexts to which
   they apply.


Each step explained:

1) Loading the Edition Engraver:

Assuming OpenLilyLib is already installed on your working environment,
include it's core functionality:

\include "oll-core/package.ily"
>

Then, load the Edition Engraver itself:

\loadPackage edition-engraver
>


2) Creating an edition

Just use the *\addEdition* command. Like this:

\addEdition edition-name
>


3) Filling the edition with content

The most basic way to do this is by using the *\editionMod* command. It is
used as follows:

\editionMod edition measure position context content
>

Breaking it apart:

   - *edition* specifies in what edition the content is stored.
   - *measure* specifies in what measure of the music the content is to be
   placed.
   - *position* specifies where where exactly in that measure the content
   is to be placed.
   - *context* specifies in what context the content belongs.
   - *content* specifies, finally, what should be placed there.

So, this means that

\editionMod my-edition 5 0/4 Score \break
>

will store in *my-edition* that a *\break* needs to be placed in the *Score*
context, in measure *5*, specifically at *0/4*, which is its first beat.


3.1) About the position value

The way I understand it is that this is the amount of musical time that is
counted from the start of the given measure. A few useful examples:

   - *0/4* will not add anything, so it references the first beat of the
   measure.
   - *3/8* will count three 8th notes / quavers from the start of the
   measure. In 4/4 time this would reference the second half of the second
   beat.
   - *1/24* will count one 16th note / semiquaver of a 16th note triplet.
   If the measure starts with 16th note triplets, this will point to the
   second note of the measure. The fraction is expressed like this because
   there are 24 "tripleted 16th notes" in a whole note.



3.2) About referencing contexts

Precise control can be achieved by giving IDs to contexts. This is done
with the *\editionID* command:

\new Staff \with { \editionID my-staff } {
>   \new Voice { c4 d e f }
> }
>

This ID can be used like this:

\editionMod test 1 2/4 my-staff.Staff \accidentalStyle dodecaphonic
> \editionMod test 1 3/4 my-staff.Voice.A \override NoteHead.color = #red
>

Notice that even though the ID *my-staff* points to a specific *Staff*,
*\editionMod* still needs to know specifically where you need to inject the
content. So, *my-staff.Staff* puts it in the *Staff* context, while
*my-staff.Voice.A* puts it in the first *Voice* inside the *Staff*.

Voices are listed in the order they are created, starting with the symbol
*A*, and each *Staff* keeps a separate count. The Edition Engraver produces
a ".edition.log" file listing all the contexts it finds along with their
names. This is useful to work with music that requires spontaneous creation
of Voices, such as piano music, where naming them provides a
straightforward way of finding how to reference them.

Say you have an "example.ly" file with the following music:

\new Staff \with { \editionID my-staff } {
>   \new Voice = "main-voice" \relative c'' {
> c4 d e f
> << { \voiceOne e d c2 }
>\new Voice = "spontaneous-voice" { \voiceTwo g2 e } >>
>   }
> }
>

This will produce an "example.edition.log" file that, among other things,
will have the following:

(my-staff Voice A) "main-voice"
> (my-staff Voice B) "spontaneous-voice"
>

While the *Score* context can't be instantiated, an ID ca