development-2.ly 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. \paper {
  35. ragged-right = ##f
  36. }
  37. \layout {
  38. \context {
  39. \Score
  40. \override BarNumber.break-visibility = #'#(#t #t #t)
  41. barNumberVisibility = #all-bar-numbers-visible
  42. }
  43. }
  44. \consistToContexts #edition-engraver Score.Staff.Voice.Lyrics
  45. % TODO add mod-marker function, do automatically track and color all modded elements?
  46. % display primary time-address
  47. editionMod =
  48. #(let ((short-mom? (@@ (edition-engraver engine) short-mom?)))
  49. (define-void-function
  50. (edition-target measure moment context-edition-id mods)
  51. (symbol? integer? short-mom? list? music-or-context-mod?)
  52. ((@ (edition-engraver engine) editionMod) edition-target measure moment context-edition-id
  53. #{ ^\markup \box \fontsize #-4 $(format "~A ~A" measure moment) #})
  54. ((@ (edition-engraver engine) editionMod) edition-target measure moment context-edition-id mods)
  55. ))
  56. \addEdition test
  57. \editionMod test 1 #(ly:make-moment -1/4) Staff \once \override NoteHead.color = #red
  58. \editionMod test 1 4/4 Staff \once \override NoteHead.color = #red
  59. \editionMod test 1 9/4 Staff { \once \override NoteHead.color = #red <>^X }
  60. \editionMod test 2 0/4 Staff \once \override Stem.color = #green
  61. \editionMod test 3 8/4 Staff \once \override NoteHead.color = #green
  62. \editionMod test 5 4/4 Staff \once \override NoteHead.color = #green
  63. \editionMod test 6 3/4 Staff \bar "|."
  64. \relative {
  65. \partial 4 c'' | b bes b c | d e fis c | b bes b c |
  66. \time 3/4 b4 bes a | as g ges | f a a |
  67. }