Re: Openlilylib edition engraver guide

2019-03-14 Thread Mason Hock
On 03/14, Urs Liska wrote:
> I have now placed the "rundown" at
> https://github.com/openlilylib/edition-engraver/wiki.

This looks great!

Mason


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


Re: Openlilylib edition engraver guide

2019-03-14 Thread Johan Vromans
On Thu, 14 Mar 2019 08:52:21 +0100, Urs Liska  wrote:

> https://github.com/openlilylib/oll-core/wiki

Call me stupid, but shouldn't this be on the OpenLilyLib web site
instead / as well ?

I find it logical to start looking for information on OpenLilyLib on the
OpenLilyLib web site.

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


Re: Openlilylib edition engraver guide

2019-03-14 Thread Urs Liska
I have now placed the "rundown" at 
https://github.com/openlilylib/edition-engraver/wiki.


I found myself extending it significantly, adding some background 
information and concepts that I thought important to understand the 
descriptions. I hope this improves the readability and usefulness.


Maybe having this introduction at a visible place may encourage more 
people to try out the edition-engraver and openLilyLib.


Urs

Am 14.03.19 um 07:56 schrieb Andrew Bernard:

Hi Urs,

Well \editionModList is the whole point of it for me! Thanks!

I think it's wiki'ish rather than readme'ish.

Andrew


On Thu, 14 Mar 2019 at 17:37, Urs Liska > wrote:



thanks for the contribution. I'll integrate it somewhere ASAP
(either in
the Wiki or maybe in the entry README.md). If I find a place and the
time I'll add a section about \editionModList, which is one of the
tiny
contributions by me.

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


Re: Openlilylib edition engraver guide

2019-03-14 Thread Urs Liska



Am 14.03.19 um 08:24 schrieb Johan Vromans:

On Thu, 14 Mar 2019 00:47:59 +1100, Andrew Bernard
 wrote:


Can we add Stefano Troncaro's excellent introductory material about the
edition engraver to the github wiki for the project?

It is a great guide... Unfortunately I get stuck at one of the first lines:

 "Assuming OpenLilyLib is already installed..."

 From the openLilyLib documentation:
https://openlilylib.org/app/#/getstarted/get-openlilylib

 Get Started With openLilyLib

 Very short introduction hwo to get OLL up and running

 Another paragraph.

 Get openLilyLib
 Different ways of obtaining OLL

(Note these are not links, but the actual text on the page)

So I need a good guide for OpenLilyLib first before I can try the edition
engraver.



https://github.com/openlilylib/oll-core/wiki



-- 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: Openlilylib edition engraver guide

2019-03-14 Thread Andrew Bernard
Hi Johan,

This design pattern is called infinite regress. :-)

Maybe I can start to put something together.

Openlilylib is utterly essential to my engraving practice, I hope others
can benefit from it also.

Andrew



On Thu, 14 Mar 2019 at 18:40, Johan Vromans  wrote:

>
> It is a great guide... Unfortunately I get stuck at one of the first lines:
>
> "Assuming OpenLilyLib is already installed..."
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Openlilylib edition engraver guide

2019-03-14 Thread Johan Vromans
On Thu, 14 Mar 2019 00:47:59 +1100, Andrew Bernard
 wrote:

> Can we add Stefano Troncaro's excellent introductory material about the
> edition engraver to the github wiki for the project?

It is a great guide... Unfortunately I get stuck at one of the first lines:

"Assuming OpenLilyLib is already installed..."

>From the openLilyLib documentation:
https://openlilylib.org/app/#/getstarted/get-openlilylib

Get Started With openLilyLib

Very short introduction hwo to get OLL up and running

Another paragraph.

Get openLilyLib
Different ways of obtaining OLL

(Note these are not links, but the actual text on the page)

So I need a good guide for OpenLilyLib first before I can try the edition
engraver.

-- Johan

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


Re: Openlilylib edition engraver guide

2019-03-14 Thread Andrew Bernard
Hi Urs,

Well \editionModList is the whole point of it for me! Thanks!

I think it's wiki'ish rather than readme'ish.

Andrew


On Thu, 14 Mar 2019 at 17:37, Urs Liska  wrote:

>
> thanks for the contribution. I'll integrate it somewhere ASAP (either in
> the Wiki or maybe in the entry README.md). If I find a place and the
> time I'll add a section about \editionModList, which is one of the tiny
> contributions by me.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Openlilylib edition engraver guide

2019-03-13 Thread Urs Liska

Hi Andrew and Randy,

thanks for the contribution. I'll integrate it somewhere ASAP (either in 
the Wiki or maybe in the entry README.md). If I find a place and the 
time I'll add a section about \editionModList, which is one of the tiny 
contributions by me.


Best
Urs

Am 14.03.19 um 05:37 schrieb Andrew Bernard:

Hi All,

Here's a redacted version of Randy's file, lots of small cleanups, and 
the email chat tone removed.


Andrew




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


Re: Openlilylib edition engraver guide

2019-03-13 Thread Andrew Bernard
Hi All,

Here's a redacted version of Randy's file, lots of small cleanups, and the
email chat tone removed.

Andrew
# The OpenLilyLib Edition Engraver


## What is it?  
In a nutshell, the Edition Engraver provides a convenient way of storing 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 these 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
its 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
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 ID's 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 can be given to a
`\score` block in it 's `\layout` block, like this:  

\score {  
 ...  music goes here ...  
 \layout {  
 \context {  
 \Score  
 \editionID my-score  
 }  
 }  
}  
>
This very useful when you need specific edits for parts that you want to keep
out of the full score. While references can grow long pretty quickly,
fortunately they can be stored in variables:

referenceOne = my-score.my-staff.Voice.A  
referenceTwo = my-other-score.my-staff.Voice.B  
>
And then used like this:  

\editionMod test 1 3/4 \referenceOne ->

# 3.2.1

Re: Openlilylib edition engraver guide

2019-03-13 Thread Andrew Bernard
Hi Randy,

Gazumped. I was about to do it.

Thanks for this.

May I update it to make not the literal text of an email thread but remove
this extraneous stuff and render it somewhat more reference material in
nature?

Are you an expert in edition-engraver? It would be good to have a section
on \editionModList, a function I am particularly interested in for my page
breaking problems.

Andrew




On Thu, 14 Mar 2019 at 13:03, 智樂喬  wrote:

> Hi Urs, I had a moment of free time and converted it to (what I think) is
> Github-usable Markdown. It's attached to this email. There was a typo or
> two and I also took the liberty of fixing those. I tried to add headings,
> but the way it's written, they're nested pretty deep, so some more editing
> might be necessary, but long story short, I figured I'd just help out.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Openlilylib edition engraver guide

2019-03-13 Thread 智樂喬
Hi Urs, I had a moment of free time and converted it to (what I think) is
Github-usable Markdown. It's attached to this email. There was a typo or
two and I also took the liberty of fixing those. I tried to add headings,
but the way it's written, they're nested pretty deep, so some more editing
might be necessary, but long story short, I figured I'd just help out.

Randy

On Thu, Mar 14, 2019 at 1:51 AM Urs Liska  wrote:

>
> Am 13.03.19 um 14:47 schrieb Andrew Bernard:
>
> Can we add Stefano Troncaro's excellent introductory material about the
> edition engraver to the github wiki for the project?
>
> Yes.
>
>
> I'll add my voice to the chorus singing the praises of this well written
> tract (the article here:
> https://lists.gnu.org/archive/html/lilypond-user/2018-01/msg00603.html)
>
>
> Would you volunteer making the text Github-usable Markdown?
>
> Urs
>
>
>
> Andrew
>
>
> ___
> lilypond-user mailing 
> listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
# My quick rundown of how to use OpenLilyLib's Edition Engraver

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
its 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 tha

Re: Openlilylib edition engraver guide

2019-03-13 Thread Urs Liska


Am 13.03.19 um 14:47 schrieb Andrew Bernard:
Can we add Stefano Troncaro's excellent introductory material about 
the edition engraver to the github wiki for the project?

Yes.


I'll add my voice to the chorus singing the praises of this well 
written tract (the article here: 
https://lists.gnu.org/archive/html/lilypond-user/2018-01/msg00603.html)



Would you volunteer making the text Github-usable Markdown?

Urs




Andrew


___
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


Openlilylib edition engraver guide

2019-03-13 Thread Andrew Bernard
Can we add Stefano Troncaro's excellent introductory material about the
edition engraver to the github wiki for the project?

I'll add my voice to the chorus singing the praises of this well written
tract (the article here:
https://lists.gnu.org/archive/html/lilypond-user/2018-01/msg00603.html)

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