tags on tweaks
Hi, just to verify: I assume it is always necessary to tag a complete music expression, or can just tweaks themselves get tagged? Here is an example for a use case: In the score the dynamics should get offset to the left to optimize vertical space requirements. In the part the dynamics should be left at the default position. It would be nice if just the tweak could get tagged in order to avoid the verbosity of explicitely repeating the musical expression with different tags applied. This works: - begin snippet \version 2.19.5 music = { \clef G r4 \tag #'score { fis'''8 -\tweak X-offset #-2.5 \f [ } \tag #'part { fis'''8 \f [ } ees'' c' a''' ] r4 } { \keepWithTag #'score \music \keepWithTag #'part \music } - end snippet This doesn't work: - begin snippet \version 2.19.5 music = { \clef G r4 fis'''8 \tag #'score -\tweak X-offset #-2.5 \f [ ees'' c' a''' ] r4 } { \keepWithTag #'score \music \keepWithTag #'part \music } end snippet -- Orm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: tags on tweaks
2014-06-15 12:29 GMT+02:00 Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de : \version 2.19.5 music = { \clef G r4 \tag #'score { fis'''8 -\tweak X-offset #-2.5 \f [ } \tag #'part { fis'''8 \f [ } ees'' c' a''' ] r4 } { \keepWithTag #'score \music \keepWithTag #'part \music } Hi Orm, No particular remark on your topic except that you can use an easier syntax : % \version 2.19.5 music = { \clef G r4 \tag score { fis'''8 -\tweak X-offset #-2.5 \f [ } \tag part { fis'''8 \f [ } ees'' c' a''' ] r4 } { \keepWithTag score \music \keepWithTag part \music } % Cheers, Pierre PS: Strange that the doc does not show this synax. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: tags on tweaks
Am 15.06.2014 12:29, schrieb Orm Finnendahl: Hi, just to verify: I assume it is always necessary to tag a complete music expression, or can just tweaks themselves get tagged? You may insert the tag itself as a post-event using -\tag before the tweak, yet the tag will then apply both to the tweak and the following expression. This gives you %%% \version 2.19 music = { \clef G r4 { fis'''8 -\tag score -\tweak X-offset #-2.5 \f -\tag part \f [ } ees'' c' a''' ] r4 } { \keepWithTag score \music \keepWithTag part \music } Well, it's a bit shorter. If there are many instances of the problem, you might wrap this into a music function: \version 2.19 %sctw = score tweak... sctw = #(define-music-function (parser location prop val mus) (symbol? number? ly:music?) #{ -\tag score -\tweak $prop $val $mus -\tag part $mus #} ) music = { \clef G r4 fis'''8 -\sctw X-offset #-2.5 \f [ ees'' c' a''' ] r4 } { \keepWithTag score \music \keepWithTag part \music } % HTH, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user