Abstand zwischen Strophentexten verengen

Begonnen von chf, Donnerstag, 27. Mai 2021, 18:53

« vorheriges - nächstes »

chf

Liebe Freunde,

ich glaubte, die Lösung im Archiv gefunden zu haben,

\version "2.22.0"
\layout{
  \context{
    \Lyrics
\override VerticalAxisGroup #'nonstaff-nonstaff-spacing=#'(
  (minimum-distance . 22)
    )
  }
}

aber leider funktioniert das nicht.
Wo liegt der Fehler?
Gibt es eine andere Lösung?

Gruß Christa

Manuela

Liebe Christa,

wie lautet der Rest des Codes? Ein Minimalbeispiel wäre sehr hilfreich
Danke für eure Hilfe
viele Grüße
-- Manuela

chf

#2
ohne

\score {

        %\new Staff
            << \new ChordNames \Akk \germanChords
               \new Voice = "mel" \with {\accepts ChordNames }
               { \global \mel }                   
                   \new Lyrics \lyricsto "mel" << {\melTextStropheEins } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheZwei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheDrei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheVier } >>
                 
     
           
               
                \new PianoStaff <<
                        \new Staff <<\global \upper >>
                        \new Staff <<\global \lower >>
                >>
            >>

\layout {
    #(layout-set-staff-size 18)
 
  }
}

mit:

\score {

        %\new Staff
            << \new ChordNames \Akk \germanChords
               \new Voice = "mel" \with {\accepts ChordNames }
               { \global \mel }                   
                   \new Lyrics \lyricsto "mel" << {\melTextStropheEins } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheZwei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheDrei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheVier } >>
                 
           
               
                \new PianoStaff <<
                        \new Staff <<\global \upper >>
                        \new Staff <<\global \lower >>
                >>
            >>

\layout {
    #(layout-set-staff-size 18)
    \context{
    \Lyrics
\override VerticalAxisGroup #'nonstaff-nonstaff-spacing=#'(
  (minimum-distance . 22)
    )
}
}
}
}


Es gibt kein Eingabeende???

harm6

Christa,

ich versuchs noch ein letztes mal:

Wie so oft ist auch diese Frage bzw dieser ganze thread völlig unverständlich.
Versuch doch wenigstens einmal die Perspektive von jemandem einzunehmen der diesen thread liest und antworten möchte.

Einige Punkte:
(1)
Zitatich glaubte, die Lösung im Archiv gefunden zu haben,
Wo? Link bitte !!
(2)
Zitataber leider funktioniert das nicht.
Tut es nicht was es soll oder gibt es einen Fehler, wenn letzteres, welchen Fehler?
(3)
Zitat\score {

        %\new Staff
            << \new ChordNames \Akk \germanChords
               \new Voice = "mel" \with {\accepts ChordNames }
               { \global \mel }                   
                   \new Lyrics \lyricsto "mel" << {\melTextStropheEins } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheZwei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheDrei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextStropheVier } >>
                 
     
           
               
                \new PianoStaff <<
                        \new Staff <<\global \upper >>
                        \new Staff <<\global \lower >>
                >>
            >>

\layout {
    #(layout-set-staff-size 18)

  }
}
Ein Minimalbeispiel ist der kürzteste kompilierbare Code, der das Problem darstellt.
Obiger Code retourniert:
Zitat von: terminal
GNU LilyPond 2.22.0
Processing `atest-107.ly'
Parsing...
atest-107.ly:72:32: error: unknown escaped string: `\Akk'
            << \new ChordNames
                               \Akk \germanChords
atest-107.ly:72:32: error: syntax error, unexpected STRING
            << \new ChordNames
                               \Akk \germanChords
atest-107.ly:72:32: error: string outside of text script or \lyricmode
            << \new ChordNames
                               \Akk \germanChords
atest-107.ly:74:18: error: unknown escaped string: `\global'
               {
                 \global \mel }                   
atest-107.ly:74:18: error: string outside of text script or \lyricmode
               {
                 \global \mel }                   
atest-107.ly:74:26: error: unknown escaped string: `\mel'
               { \global
                         \mel }                   
atest-107.ly:74:26: error: string outside of text script or \lyricmode
               { \global
                         \mel }                   
atest-107.ly:75:52: error: unknown escaped string: `\melTextStropheEins'
                   \new Lyrics \lyricsto "mel" << {
                                                   \melTextStropheEins } >>
atest-107.ly:76:52: error: unknown escaped string: `\melTextStropheZwei'
                   \new Lyrics \lyricsto "mel" << {
                                                   \melTextStropheZwei } >>
atest-107.ly:77:52: error: unknown escaped string: `\melTextStropheDrei'
                   \new Lyrics \lyricsto "mel" << {
                                                   \melTextStropheDrei } >>
atest-107.ly:78:52: error: unknown escaped string: `\melTextStropheVier'
                   \new Lyrics \lyricsto "mel" << {
                                                   \melTextStropheVier } >>
atest-107.ly:83:38: error: unknown escaped string: `\global'
                        \new Staff <<
                                     \global \upper >>
atest-107.ly:83:38: error: string outside of text script or \lyricmode
                        \new Staff <<
                                     \global \upper >>
atest-107.ly:83:46: error: unknown escaped string: `\upper'
                        \new Staff <<\global
                                             \upper >>
atest-107.ly:83:46: error: string outside of text script or \lyricmode
                        \new Staff <<\global
                                             \upper >>
atest-107.ly:84:38: error: unknown escaped string: `\global'
                        \new Staff <<
                                     \global \lower >>
atest-107.ly:84:38: error: string outside of text script or \lyricmode
                        \new Staff <<
                                     \global \lower >>
atest-107.ly:84:46: error: unknown escaped string: `\lower'
                        \new Staff <<\global
                                             \lower >>
atest-107.ly:84:46: error: string outside of text script or \lyricmode
                        \new Staff <<\global
                                             \lower >>
atest-107.ly:72:13: error: errors found, ignoring music expression
           
            << \new ChordNames \Akk \germanChords
atest-107.ly:92:59: error: syntax error, unexpected EVENT_IDENTIFIER, expecting '='
\override VerticalAxisGroup #'nonstaff-nonstaff-spacing=#'
                                                          (
atest-107.ly:93:25: error: syntax error, unexpected EVENT_IDENTIFIER, expecting '='
  (minimum-distance . 22
                        )
atest-107.ly:97:2: error: Unfinished main input
}

fatal error: failed files: "atest-107.ly"
Dieser Beispielcode verdeutlich also lediglich, daß man nur definierte Variablen verwenden soll.
(4)
ZitatEs gibt kein Eingabeende???
Hääh? Woruf beziehst Du Dich?
Ja, diese beschissene Corona-Pandemie sollte wirklich mal zum Ende kommen. Hat aber nix mit LilyPond zu tun...
Mit anderen Worten: Hääh?

chf

Hallo Harm,

es tut mir leid - ich wollte keinen Ärger machen.
Ich habe hier gelesen
https://archiv.lilypondforum.de/index.php/topic,419.msg2434.html#msg2434
und wahrscheinlich falsch verstanden...

Wenn ich diesen Context einfüge, bekomme ich eine Menge Klammern (s. rote) ,aber keine, die ihn schließt. Also geht nichts weiter...
Bitte verlier nicht die Geduld mit mir. Ich stelle mir manche Frage aus meiner Arbeit heraus zu klar vor.


\version "2.22.0"
global = {}
mel = \relative c' {
   \clef treble
   \key e \minor
   \time 12/8
e fis g4 g8 a4 g8
}

melTextEins = \lyricmode {\override LyricText.font-size = #0
                      \set stanza = "1."
                      Als ich heut in
                    }                   
melTextZwei = \lyricmode {\override LyricText.font-size = #0                     
                      \set stanza = "2."
                      Vol -- ler Weh -- mut
                    }
melTextDrei = \lyricmode {\override LyricText.font-size = #0                           
                      \set stanza = "3."
                      Und es flüs -- tert:
                    }

melTextVier = \lyricmode {\override LyricText.font-size = #0                           
                      \set stanza = "4."
                      Und ich rief's zu mir
                    }                     

\score {

        \new Staff
            << %\new ChordNames \Akk \germanChords
               \new Voice = "mel" %\with {\accepts ChordNames }
               { \global \mel }                   
                   \new Lyrics \lyricsto "mel" << {\melTextEins } >>
                   \new Lyrics \lyricsto "mel" << {\melTextZwei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextDrei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextVier } >>
                                           
            >>

\layout {
    #(layout-set-staff-size 18) 
  }
}

harm6

Zitat
Bitte verlier nicht die Geduld mit mir. Ich stelle mir manche Frage aus meiner Arbeit heraus zu klar vor.
Wenn Du Code zu einer Frage posten willst, dann musst Du testen, ob der zu postende Code die Anforderungen erfüllt, d.h. zunächst mache ein neues file und füge den Testcode ein.
Dann teste:
(1) Kompiliert er
(2) Zeigt er das Problem
(3) Ist er so kurz wie möglich.

ad(3) Alles rote ist überflüssig
Zitat
\version "2.22.0"
global = {}
mel = \relative c' {
   \clef treble
   \key e \minor
   \time 12/8
e fis g4 g8 a4 g8
}

melTextEins = \lyricmode {\override LyricText.font-size = #0
                      \set stanza = "1."
                      Als ich heut in
                    }                   
melTextZwei = \lyricmode {\override LyricText.font-size = #0                    
                      \set stanza = "2."
                      Vol -- ler Weh -- mut
                    }
melTextDrei = \lyricmode {\override LyricText.font-size = #0                           
                      \set stanza = "3."
                      Und es flüs -- tert:
                    }

melTextVier = \lyricmode {\override LyricText.font-size = #0                           
                      \set stanza = "4."
                      Und ich rief's zu mir
                    }   
                 

\score {

        \new Staff
            << %\new ChordNames \Akk \germanChords
               \new Voice = "mel" %\with {\accepts ChordNames }
               { \global \mel }                   
                   \new Lyrics \lyricsto "mel" << {\melTextEins } >>
                   \new Lyrics \lyricsto "mel" << {\melTextZwei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextDrei } >>
                   \new Lyrics \lyricsto "mel" << {\melTextVier } >>

                                           
            >>

\layout {
    #(layout-set-staff-size 18)
  }

}

Es verbleibt dann:

\version "2.22.0"

mel = \relative c' { e }

melTextEins = \lyricmode { Als }                   
melTextZwei = \lyricmode { Vol }
             
\new Staff
  <<
     \new Voice = "mel" \mel         
     \new Lyrics \lyricsto "mel" \melTextEins
     \new Lyrics \lyricsto "mel" \melTextZwei                             
  >>


Schon mal wesentlich kürzer und (1) und (2) sind auch erfüllt.
Allerdings kann es problematisch sein aus einem bestehenden Staff heraus neue und artfremde Contexte zu starten, auch kann man noch ein paar Zeilen sparen. Das führt dann zu:

\version "2.22.0"

<<
  \new Voice = "voice" { b1 }
  \new Lyrics \lyricsto "voice" { foo }
  \new Lyrics \lyricsto "voice" { bar }
>>

Tatsächlich kann man noch ein paar Sachen rausnehmen, das führt dann aber eher zu Verwirrung denn zu Klarheit, also bleibt es mal bei diesem Code, der nach wie vor (1) und (2) erfüllt.

Du mußt den Code minimieren, Du mußt testen, ob er kompilierbar ist und geeignet ist das Problem zu zeigen.
Wenn Du das nicht machst bedeutet das nicht weniger als: "Ich hab keine Zeit dazu, Eure Zeit ist mir egal."

Nachdem das jetzt hoffentlich deutlich genug war, zum Problem ... endlich.

Der von Dir verlinkte thread ist uralt.
Zwar gibt es einen Befehl ähnlich wie
Zitat\overrideProperty #"Score.NonMusicalPaperColumn"
#'line-break-system-details #'((alignment-offsets . (11 4 2 -2)))
noch, man könnte ihn auch immer noch anwenden aber die anderen dort erwähnten Befehle sind nicht mehr akkurat.

Heutzutage muß das spacing anders angegangen werden.
Den default für das spacing von Lyrics zu Lyrics findest Du in
IR 2.1.16 Lyrics
Zitat
Set grob-property nonstaff-nonstaff-spacing in VerticalAxisGroup to:
    '((basic-distance . 0)
      (minimum-distance . 2.8)
      (padding . 0.2)
      (stretchability . 0))

padding, basic-distance und stretchability würde ich beibehalten, minimum-distance verringern.
Führt zu:

\version "2.22.0"

\layout {
  \context {
    \Lyrics
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
       #'((basic-distance . 0)
          (minimum-distance . 1.7)
          (padding . 0.2)
          (stretchability . 0))
  }
}

<<
  \new Voice = "voice" { b1 }
  \new Lyrics \lyricsto "voice" { foo }
  \new Lyrics \lyricsto "voice" { bar }
>>

Wobei der override die kompletten Werte für nonstaff-nonstaff-spacing neu setzt. Falls Du nur minimum-distance verändern willst, reicht auch:
\version "2.22.0"

\layout {
  \context {
    \Lyrics
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = 1.7
  }
}

<<
  \new Voice = "voice" { b1 }
  \new Lyrics \lyricsto "voice" { foo }
  \new Lyrics \lyricsto "voice" { bar }
>>







chf


Harm,
ich kann nur Danke! sagen und mich weiter bemühen...