• Willkommen im Forum „Archiviertes Lilypond Forum (2017)“.
 

Dies ist das Archiv des alten Forums (bis März 2017). Das aktuelle Forum ist unter lilypondforum.de zu finden.
This is the archive of the old forum (until March 2017). You can find the current forum at lilypondforum.de.

Hauptmenü

Automatischer Ossia-Staff

Begonnen von iugin, Freitag, 15. Mai 2015, 17:56

Vorheriges Thema - Nächstes Thema

iugin

Liebe alle

ich versuche das Ossia irgendwie zu automatisieren.
Folgender Beispiel funktioniert eingentlich nicht schlecht...
\version "2.18.2"


ossiaStaff = {
  \new Staff = ossiaStaff \with {
    \remove "Time_signature_engraver"
    \hide Clef
    fontSize = #-3
    \override StaffSymbol.staff-space = #(magstep -3)
    \override StaffSymbol.thickness = #(magstep -3)
  } { \stopStaff s1*6 }
}

ossia = #(define-music-function (parser location m)(ly:music?)
           #{
             \context Staff = ossiaStaff {
               \startStaff $m \stopStaff
             }
           #}
           )

<<
  \ossiaStaff
  \new Staff \relative c' {
   
    c4 b c2
    <<
      { e4 f e2 }
      \ossia {e4 e4 d2 }
    >>
    g4 a g2 \break
    c4 b c2
    g4 a g2
     g4 e8 f g2
    e4 d c2 \break
    g4 a g2
     g4 e8 f g2
    e4 d c2
  }
>>

... aber wie ihr seht, ist nicht perfekt.
Wie kann ich das unsichtbare System entfernen (übrigens, passier nur in der 2. Zeile), ohne dass ich diese \layout-Block
\layout {
  \context {
    \Staff \RemoveEmptyStaves
    \override VerticalAxisGroup.remove-first = ##t
  }
}
setzten muss?

Besten dank für eure Antworte und einen schönen Abend

Eugenio

harm6

Hi Eugenio,

meinst Du:


\version "2.18.2"

ossiaStaff = {
  \new Staff = ossiaStaff \with {
    \remove "Time_signature_engraver"
    \hide Clef
    fontSize = #-3
    \override StaffSymbol.staff-space = #(magstep -3)
    \override StaffSymbol.thickness = #(magstep -3)
    \RemoveEmptyStaves
    \override VerticalAxisGroup.remove-first = ##t
  } { \stopStaff s1*6 }
}

ossia = #(define-music-function (parser location m)(ly:music?)
           #{
             \context Staff = ossiaStaff {
               \startStaff $m \stopStaff
             }
           #}
           )

<<
  \ossiaStaff
  \new Staff \relative c' {
   
    c4 b c2
    <<
      { e4 f e2 }
      \ossia {e4 e4 d2 }
    >>
    g4 a g2 \break
    c4 b c2
    g4 a g2
     g4 e8 f g2
    e4 d c2 \break
    g4 a g2
     g4 e8 f g2
    e4 d c2
  }
>>

?

Gruß,
  Harm

iugin

Lieber Harm

ich werde alt... In einem früheren Versuch habe ich es genau so gemacht wie du. Dann habe ich was geändert, keine Ahnung was, wieder etwas versucht, und irgendwie die Zeilen
\RemoveEmptyStaves
\override VerticalAxisGroup.remove-first = ##t

gelöscht. Und irgendwie habe ich es nicht gecheckt...
Naja..........
Trotzdem danke :)

Einen lieben Gruss

Eugenio