lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to write a scheme function to override glissando properties


From: Patrick Schmidt
Subject: how to write a scheme function to override glissando properties
Date: Tue, 14 Dec 2010 14:25:31 +0100

Hi all,

I noticed that glissandi are quite often hardly visible in a Staff- context. There is also a huge difference in the look of glissandi in Staff- and TabStaff-contexts. I'd like to write a function to adjust these differences for Staffs and TabStaffs separately but I don't even manage to manipulate the look in general. I'd be very grateful if someone showed me what's missing in the following code alternatives:

1)

slide =
#(make-music
    (sequential-music
      (list
          (make-grob-property-set 'Glissando 'thickness 5)
          (make-grob-property-set 'Glissando 'minimum-length 10)
          (make-grob-property-set 'Glissando 'springs-and-rods
ly:spanner::set-spacing-rods)
          (quote GlissandoEvent))))


2)

slide =
#(define-music-function (parser location) ()
  #{
     \once \override Glissando #'minimum-length = #10
     \once \override Glissando #'thickness = #5
     \once \override Glissando #'springs-and-rods =
#ly:spanner::set-spacing-rods
     \glissando
  #})



myMusic = \relative c' {
  a4\slide b4\3
 %  \override Voice.Glissando #'minimum-length = #10 %this works
% \override Voice.Glissando #'springs-and-rods = #ly:spanner::set- spacing-rods % this works
 % \displayMusic { a4\glissando b4\3 }
}

\score {
  <<
 \new Staff {
   \new Voice {
     \clef "treble_8"
     \myMusic
   }
 }
 \new TabStaff {
   \new TabVoice {
     \myMusic
   }
 }
 >>
}

Thanks for your help!

patrick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]