Re: Can't use edition engraver to place \time and \tempo

2017-07-12 Thread caagr98
I would suggest adding separate functions for adding standalone text 
grobs. Would make a lot more sense than handling some types of objects 
differently.


On 07/12/2017 09:47 AM, Jan-Peter Voigt wrote:

Hi again,

I merged your PR, so \time and \tempo should work now. And I prepared a 
PR myself to streamline event-broadcasting. That works fine and marks 
can now be added.
With the default way for TextScript there is only one problem. I often 
add TextScript to Staff contexts when they are TODO-marks or the like. 
But other contexts don't consist the engraver to engrave them. So they 
are still created by the EE and tweaks are added while incarnating the 
grob.

I will further test the code. If it proves stable, I will merge later.

Cheers
Jan-Peter



Am 10.07.2017 um 14:33 schrieb caag...@gmail.com:
Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to 
the proper engraver in start-translation-timestep. This makes tweaks 
and other custom properties not work, let alone if you install a 
custom engraver for them. Moving their handling to 
start-translation-timestep seems to work fine, so why is it that way? 
(It does have the advantage of allowing multiple \marks at once, 
though.) TextScripts also don't work in the first measure if it's a 
MMR, which is weird. (Placing an empty chord before the MMR makes it 
work.)


I'm all for having a way to manually place texts/marks, but I 
personally think using the default method should be the, well, 
default. Changing it could break existing projects that rely on that 
behavior, though, which is bad.



___
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: Can't use edition engraver to place \time and \tempo

2017-07-12 Thread Jan-Peter Voigt

Hi again,

I merged your PR, so \time and \tempo should work now. And I prepared a 
PR myself to streamline event-broadcasting. That works fine and marks 
can now be added.
With the default way for TextScript there is only one problem. I often 
add TextScript to Staff contexts when they are TODO-marks or the like. 
But other contexts don't consist the engraver to engrave them. So they 
are still created by the EE and tweaks are added while incarnating the grob.

I will further test the code. If it proves stable, I will merge later.

Cheers
Jan-Peter



Am 10.07.2017 um 14:33 schrieb caag...@gmail.com:
Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to the 
proper engraver in start-translation-timestep. This makes tweaks and 
other custom properties not work, let alone if you install a custom 
engraver for them. Moving their handling to start-translation-timestep 
seems to work fine, so why is it that way? (It does have the advantage 
of allowing multiple \marks at once, though.) TextScripts also don't 
work in the first measure if it's a MMR, which is weird. (Placing an 
empty chord before the MMR makes it work.)


I'm all for having a way to manually place texts/marks, but I personally 
think using the default method should be the, well, default. Changing it 
could break existing projects that rely on that behavior, though, which 
is bad.



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


Re: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread Jan-Peter Voigt

thank you for your messages!

Am 10.07.2017 um 14:33 schrieb caag...@gmail.com:
I didn't notice any timing problems with \time. Of course, if you use it 
to add a time signature somewhere weird it gets broken, but that happens 
with inserting random time signatures in the source as well. If used 
responsibly, it works fine.
... using it responsibly is fine, but I'd like to prevent the novice 
from doing it wrong and not knowing why. A change from 3/4 to 6/8 (for 
example) would not harm anything. So if you provide a PR, I'll have a look.


My \tempo patch seems to work (needs some more testing first). Shouldn't 
be too hard to make one for \time, I hope.

great :-)

Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to the 
proper engraver in start-translation-timestep. This makes tweaks and 
other custom properties not work, let alone if you install a custom 
engraver for them. Moving their handling to start-translation-timestep 
seems to work fine, so why is it that way? (It does have the advantage 
of allowing multiple \marks at once, though.) TextScripts also don't 
work in the first measure if it's a MMR, which is weird. (Placing an 
empty chord before the MMR makes it work.)
This is how I started to implement it. For my own scores it shouldn't be 
a problem to change it. The recent additions - I will push dynamics, 
slurs and beams to another branch in a few minutes - are using broadcast 
event, which might be used for marks and text-scripts as well.


I'm all for having a way to manually place texts/marks, but I personally 
think using the default method should be the, well, default. Changing it 
could break existing projects that rely on that behavior, though, which 
is bad.
again: this is for historical reasons. It should and will be changed - 
carefully, not to break existing scores.


Jan-Peter



On 07/10/2017 01:38 PM, Jan-Peter Voigt wrote:

Hi there,

yes the edition-engraver does not able to insert time and tempo. I 
decided not to include \time, because it would mess with the timing 
and therefore with addressing elements in time. \tempo is just not 
implemented (yet). So if you can provide a reasonable pull request I 
will be happy to merge!
About the \time thing: It should be possible to integrate it, but it 
stays problematic for the mentioned reasons. Perhaps warning messages 
are sufficient while allowing \time for edition-mods.


Jan-Peter


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


Re: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread caagr98
I didn't notice any timing problems with \time. Of course, if you use it 
to add a time signature somewhere weird it gets broken, but that happens 
with inserting random time signatures in the source as well. If used 
responsibly, it works fine.


My \tempo patch seems to work (needs some more testing first). Shouldn't 
be too hard to make one for \time, I hope.


Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to the 
proper engraver in start-translation-timestep. This makes tweaks and 
other custom properties not work, let alone if you install a custom 
engraver for them. Moving their handling to start-translation-timestep 
seems to work fine, so why is it that way? (It does have the advantage 
of allowing multiple \marks at once, though.) TextScripts also don't 
work in the first measure if it's a MMR, which is weird. (Placing an 
empty chord before the MMR makes it work.)


I'm all for having a way to manually place texts/marks, but I personally 
think using the default method should be the, well, default. Changing it 
could break existing projects that rely on that behavior, though, which 
is bad.


On 07/10/2017 01:38 PM, Jan-Peter Voigt wrote:

Hi there,

yes the edition-engraver does not able to insert time and tempo. I 
decided not to include \time, because it would mess with the timing and 
therefore with addressing elements in time. \tempo is just not 
implemented (yet). So if you can provide a reasonable pull request I 
will be happy to merge!
About the \time thing: It should be possible to integrate it, but it 
stays problematic for the mentioned reasons. Perhaps warning messages 
are sufficient while allowing \time for edition-mods.


Jan-Peter

___
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: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread Jan-Peter Voigt

Hi there,

yes the edition-engraver does not able to insert time and tempo. I 
decided not to include \time, because it would mess with the timing and 
therefore with addressing elements in time. \tempo is just not 
implemented (yet). So if you can provide a reasonable pull request I 
will be happy to merge!
About the \time thing: It should be possible to integrate it, but it 
stays problematic for the mentioned reasons. Perhaps warning messages 
are sufficient while allowing \time for edition-mods.


Jan-Peter

Am 10.07.2017 um 13:03 schrieb caag...@gmail.com:
After some research, it seems edition engraver only _pretends_ to insert 
arbitrary objects - it actually only supports a select few types of 
objects. Not including \tempo and \time. \time can be worked around 
rather easily (see snippet below), but for \tempo, it seems I'd have to 
modify the source code. I guess I'll try to do that, and then maybe do a 
pull request if it works.


```
timeEdit =
#(define-music-function
(beat-structure fraction) ((number-list? '()) fraction?)
(make-sequential-music
  ((assoc-get 'elements-callback
 (assoc-get 'TimeSignatureMusic
music-descriptions))
   (time beat-structure fraction
```

On 07/10/2017 12:49 AM, caag...@gmail.com wrote:
I'd expect the two scores created by this to be identical, but the 
second one only has the \key applied (other stuff such as \bar and 
<>^"" works too), not the \time or \tempo. What am I doing wrong?


Also, it seems only the fourth argument is used for selecting editions 
(with \editionID); what's the first argument for?


```
\version "2.19.63"
\include "edition-engraver/edition-engraver.ily"

\consistToContexts #edition-engraver Score.Staff.Voice
\addEdition time
\editionMod time 1 0/0 E.Staff \key g \major
\editionMod time 1 0/0 E.Score \time 4/4
\editionMod time 1 0/0 E.Score \tempo "Some text" 4=120
\editionMod time 2 0/0 E.Score \time 2/4
\editionMod time 3 0/0 E.Score \time 4/4

\book {
   \score { \new Staff <<
 { b'1 2 1 }
 { \key g \major \time 4/4 \tempo "Some text" 4=120 s1 \time 2/4 
s2 \time 4/4 s1}

   >> }
   \score {
 \new Staff { b'1 2 1 }
 \layout {
   \context {
 \Score
 \editionID E
   }
 }
   }
}
```


___
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: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread caagr98
After some research, it seems edition engraver only _pretends_ to insert 
arbitrary objects - it actually only supports a select few types of 
objects. Not including \tempo and \time. \time can be worked around 
rather easily (see snippet below), but for \tempo, it seems I'd have to 
modify the source code. I guess I'll try to do that, and then maybe do a 
pull request if it works.


```
timeEdit =
#(define-music-function
   (beat-structure fraction) ((number-list? '()) fraction?)
   (make-sequential-music
 ((assoc-get 'elements-callback
(assoc-get 'TimeSignatureMusic
   music-descriptions))
  (time beat-structure fraction
```

On 07/10/2017 12:49 AM, caag...@gmail.com wrote:
I'd expect the two scores created by this to be identical, but the 
second one only has the \key applied (other stuff such as \bar and <>^"" 
works too), not the \time or \tempo. What am I doing wrong?


Also, it seems only the fourth argument is used for selecting editions 
(with \editionID); what's the first argument for?


```
\version "2.19.63"
\include "edition-engraver/edition-engraver.ily"

\consistToContexts #edition-engraver Score.Staff.Voice
\addEdition time
\editionMod time 1 0/0 E.Staff \key g \major
\editionMod time 1 0/0 E.Score \time 4/4
\editionMod time 1 0/0 E.Score \tempo "Some text" 4=120
\editionMod time 2 0/0 E.Score \time 2/4
\editionMod time 3 0/0 E.Score \time 4/4

\book {
   \score { \new Staff <<
 { b'1 2 1 }
 { \key g \major \time 4/4 \tempo "Some text" 4=120 s1 \time 2/4 s2 
\time 4/4 s1}

   >> }
   \score {
 \new Staff { b'1 2 1 }
 \layout {
   \context {
 \Score
 \editionID E
   }
 }
   }
}
```


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