Wie kriege ich den Ambitus in die 2. Zeile? (es existiert keine Lösung)

Begonnen von Manuela, Freitag, 13. März 2026, 18:07

Vorheriges Thema - Nächstes Thema

Manuela

\version "2.25.34"

mus = \relative {
  c''4 c c c c c c c, }

\layout {
  \context {
    \Voice
    \name SingVoice
    \alias Voice
    \consists "Ambitus_engraver"
    \ambitusAfter time-signature
  }
  \context {
    \Staff
    \RemoveAllEmptyStaves
    \accepts SingVoice
  }

}

\paper {
  ragged-bottom = ##t
  indent = 0
  top-margin = #20
  tagline = ##f
  line-width = #150
}

\new StaffGroup
<<
  \new Staff
  \new Voice
  {
    s1 * 2 \break
    \mus \mus
  }
  \new PianoStaff
  <<
    \new Staff { \mus \mus \mus }
    \new Staff {
      \clef bass
      \transpose c c,, { \mus \mus \mus }
    }
  >>
>>

\new StaffGroup
<<
  \new Staff
  \new SingVoice
  {
    s1 * 2 \break
    \mus \mus
  }
  \new PianoStaff
  <<
    \new Staff { \mus \mus \mus }
    \new Staff {
      \clef bass
      \transpose c c,, { \mus \mus \mus }
    }
  >>
>>

Wenn ich keinen Ambitus habe, dann erscheint der Staff für die Singstimme erst dann, wenn es Noten in dieser Stimme gibt.
Füge ich einen Ambitus hinzu, habe ich eine leere Zeile. Gibt es einen Möglichkeit, den Ambitus an den Beginn der Singstimme zu setzen?

Ich denke, das Problem wird öfter vorkommen, wenn man Klavierbegleitung hat, die erst ein kleines Intro beinhaltet.
Danke für eure Hilfe
viele Grüße
-- Manuela

harm6

Hallo Manuela,

ich habe keine wirklich gute Lösung für dich, aber ein bisschen Hintergrund und einen workaround.

Der Ambitus ist ein Container-grob, welches u.a. AmbitusNoteHead und AmbitusLine enthält. Der Ambitus_engraver legt den Ambitus ganz am Anfang an und füllt ihn auf ganz am Ende.
Wenn man also den Ambitus_engraver nicht komplett neu schreibt (und dafür fehlt mir sowohl Zeit als auch Motivation), so wird er immer am Anfang erscheinen.

Als workaround:

\version "2.25.34"

mus = \relative {
  c''4 c c c c c c c, }

\layout {
  \context {
    \Voice
    \name SingVoice
    \alias Voice
  }
  \context {
    \Staff
    \RemoveAllEmptyStaves
    \accepts SingVoice
  }

}

\paper {
  ragged-bottom = ##t
  indent = 0
  top-margin = #20
  tagline = ##f
  line-width = #150
}

\new StaffGroup
<<
  \new Staff {
    \new SingVoice = "Intro" { s1 * 2 \break }
    \new SingVoice = "Mel"
      \with {
      \consists "Ambitus_engraver"
      \override AmbitusNoteHead.break-visibility = ##(#f #f #t)
      \override AmbitusLine.break-visibility = ##(#f #f #t)
      \override AmbitusAccidental.break-visibility = ##(#f #f #t)
      %\ambitusAfter time-signature
      }
      { \mus \mus }
    }
  \new Lyrics \lyricsto "Mel" { \repeat unfold 16 bla }
  \new PianoStaff
  <<
    \new Staff { \mus \mus \mus }
    \new Staff {
      \clef bass
      \transpose c c,, { \mus \mus \mus }
    }
  >>
>>

HTH,
  Harm


Manuela

Danke für die Antwort, Harm. Irgendwie hatte ich das schon vermutet, ich hatte gehofft, dass es doch eine überraschende Lösung gibt.
Danke für eure Hilfe
viele Grüße
-- Manuela