development-3.ly 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % %
  3. % This file is part of openLilyLib, %
  4. % =========== %
  5. % the community library project for GNU LilyPond %
  6. % (https://github.com/openlilylib) %
  7. % ----------- %
  8. % %
  9. % Library: edition-engraver %
  10. % ================ %
  11. % %
  12. % openLilyLib is free software: you can redistribute it and/or modify %
  13. % it under the terms of the GNU General Public License as published by %
  14. % the Free Software Foundation, either version 3 of the License, or %
  15. % (at your option) any later version. %
  16. % %
  17. % openLilyLib is distributed in the hope that it will be useful, %
  18. % but WITHOUT ANY WARRANTY; without even the implied warranty of %
  19. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %
  20. % GNU General Public License for more details. %
  21. % %
  22. % You should have received a copy of the GNU General Public License %
  23. % along with openLilyLib. If not, see <http://www.gnu.org/licenses/>. %
  24. % %
  25. % openLilyLib is maintained by Urs Liska, ul@openlilylib.org %
  26. % edition-engraver is maintained by Jan-Peter Voigt, jp.voigt@gmx.de %
  27. % and others. %
  28. % Copyright Jan-Peter Voigt, Urs Liska, 2017 %
  29. % %
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31. \version "2.19.37"
  32. \include "oll-core/package.ily"
  33. \loadPackage edition-engraver
  34. \consistToContexts #edition-engraver Score.Staff.Voice.Lyrics
  35. #(define (my-wild-card v) (eq? #\l (string-ref (format "~A" v) 0)))
  36. \addEdition test
  37. % path-elements surrounded by '<' and '>' denote a procedure
  38. \editionMod test 1 5/4 "<my-wild-card>".Voice \once \override NoteHead.color = #green
  39. % path elements enclosed in '/' are regular expressions
  40. \editionMod test 2 2/4 "/^.[eu].*$/".Voice \once \override NoteHead.color = #red
  41. \editionMod test 2 3/4 "/^[fl][au]$/".Voice \once \override NoteHead.color = #'(0.8 0.5 0.8)
  42. % path elements enclosed in curly brackets are wildcards
  43. \editionMod test 3 2/4 "{l*}".Voice \once \override NoteHead.color = #blue
  44. \editionMod test 3 3/4 "{*a}".Voice \once \override NoteHead.color = #'(0.5 0.5 1)
  45. \editionMod test 3 3/4 "{*u}".Voice \once \override NoteHead.color = #'(1 0.5 0.5)
  46. <<
  47. \new Staff \with {
  48. \editionID la
  49. } \repeat unfold 3 \relative { c''4 b bes a }
  50. \new Staff \with {
  51. \editionID le
  52. } \repeat unfold 3 \relative { c''4 b bes a }
  53. \new Staff \with {
  54. \editionID fu
  55. } \repeat unfold 3 \relative { c''4 b bes a }
  56. >>