User:Mjchael/sandbox

    From Wikipedia!

    Lilypond-Probleme[edit]

    Doppelte Notenhälse[edit]

    Punktierte halbe Noten im Bass ( c,2. ) erhalten in der Tabulatur zwei Notenhälse. Das ist für völlige Anfänger verwirrend.

    
\version "2.20.0"
\header {
  title="3/4 mit Wechselbass"
  encoder="mjchael"
}
%Diskant- bzw. Melodiesaiten
Diskant = {
  r4 < g c' e'> < g c' e'> | r < g c' e'> < g c' e'> | % C /B
  r4 < a c' e'> < a c' e'> | r < a c' e'> < a c' e'> | % Am
  r4 < a c' f'> < a c' f'> | r < a c' f'> < a c' f'> | % F
  r4 < g b  g'> < g b  g'> | r < g b  g'> < g b  g'> | % G
  \mark "4x"
}
%Basssaiten, die hier nur mit dem Daumen gespielt werden.
Bass = {
  c2. b, a, e f a, g, b, 
}
% Layout- bzw. Bildausgabe
\score {
  <<
    \new ChordNames {
      \chordmode {
        c2. c:/b a:m a:m/e f f:/a g g:/b
      }
    }
    {
      %Noten
      \new Staff  <<
        \tempo 4 = 120
        %Tempo ausblenden
        \set Score.tempoHideNote = ##t
        \time 3/4
        \key c \major
        \set Staff.midiInstrument = #"acoustic guitar (nylon)"
        \clef "G_8" \repeat volta 4
        % Noten im Diskant
        \Diskant
        \\
        % Noten im Bass - beachte: Wiederholungszeichen ist für Midi notwendig!
        \repeat volta 4
        \Bass
      >>
    }
    % Tabulatur
    \new TabStaff {
      \tabFullNotation \repeat volta 4
      <<
        % Tabulatur im Diskant
        \Diskant
        \\
        % Tabulatur im Bass
        \Bass
      >>
    }
  >>
  \layout {}
}
% Midiausgabe mit Wiederholungen, ohne Akkorde
\score {
  <<
    \unfoldRepeats {
      \new Staff  <<
        \tempo 4 = 120
        \time 4/4
        \key c \major
        \set Staff.midiInstrument = #"acoustic guitar (nylon)"
        \clef "G_8" \repeat volta 4
        \Diskant
        \\
        \repeat volta 4
        \Bass
      >>
    }
  >>
  \midi {}
}
% unterdrückt im raw="!"-Modus das DinA4-Format.
\paper {
  indent=0\mm
  % DinA4 0 210mm - 10mm Rand - 20mm Lochrand = 180mm
  line-width=180\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  % bookTitleMarkup=##f
  scoreTitleMarkup=##f
}

    Lösung[edit]

    Lösche oder kommentiere \tabFullNotation aus

    \new TabStaff {
      % \tabFullNotation 
    ...
    
    
\version "2.20.0"
\header {
  title="3/4 mit Wechselbass"
  encoder="mjchael"
}
%Diskant- bzw. Melodiesaiten
Diskant = {
  r4 < g c' e'> < g c' e'> | r < g c' e'> < g c' e'> | % C /B
  r4 < a c' e'> < a c' e'> | r < a c' e'> < a c' e'> | % Am
  r4 < a c' f'> < a c' f'> | r < a c' f'> < a c' f'> | % F
  r4 < g b  g'> < g b  g'> | r < g b  g'> < g b  g'> | % G
  \mark "4x"
}
%Basssaiten, die hier nur mit dem Daumen gespielt werden.
Bass = {
\override NoteHead.color = #red 
\override Stem.color = #red 
\override Beam.color = #red 
\override Accidental.color = #red  
\override Staff.LedgerLineSpanner.color = #red
c2. b, a, e f a, g, b, 
}
% Layout- bzw. Bildausgabe
\score {
  <<
    \new ChordNames {
      \chordmode {
        c2. c:/b a:m a:m/e f f:/a g g:/b
      }
    }
    {
      %Noten
      \new Staff  <<
        \tempo 4 = 120
        %Tempo ausblenden
        \set Score.tempoHideNote = ##t
        \time 3/4
        \key c \major
        \set Staff.midiInstrument = #"acoustic guitar (nylon)"
        \clef "G_8" \repeat volta 4
        % Noten im Diskant
        \Diskant
        \\
        % Noten im Bass - beachte: Wiederholungszeichen ist für Midi notwendig!
        \repeat volta 4
        \Bass
      >>
    }
    % Tabulatur
    \new TabStaff {
      % \tabFullNotation 
      \repeat volta 4
      <<
        % Tabulatur im Diskant
        \Diskant
        \\
        % Tabulatur im Bass
        \Bass
      >>
    }
  >>
  \layout {}
}
% Midiausgabe mit Wiederholungen, ohne Akkorde
\score {
  <<
    \unfoldRepeats {
      \new Staff  <<
        \tempo 4 = 120
        \time 4/4
        \key c \major
        \set Staff.midiInstrument = #"acoustic guitar (nylon)"
        \clef "G_8" \repeat volta 4
        \Diskant
        \\
        \repeat volta 4
        \Bass
      >>
    }
  >>
  \midi {}
}
% unterdrückt im raw="!"-Modus das DinA4-Format.
\paper {
  indent=0\mm
  % DinA4 0 210mm - 10mm Rand - 20mm Lochrand = 180mm
  line-width=180\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  % bookTitleMarkup=##f
  scoreTitleMarkup=##f
}

    Stimmkreuzung[edit]

    2 Notenköpfe für einen Ton

    Unschöne Pausen

    
  {
    <<
      \clef "treble_8"
      { r8 g c' e' r a d' f'}
      \\
       { c2  d }
    >>
  }

    Unschöne doppelten Notenköpfe

    
  {
    <<
      \clef "treble_8"
      { c8 g c' e' d a d' f'}
      \\
       { c2  d }
    >>
  }
    Lösung

    \mergeDifferentlyHeadedOn

    
  {
  	\mergeDifferentlyHeadedOn
    <<
      \clef "treble_8"
      { c8 g c' e' d a d' f'}
      \\
       { c2  d }
    >>
  }

    Guitar-Cords[edit]

    \include "predefined-guitar-fretboards.ly" is not posible.

    <score lang="lilypond"  raw="1">
    \include "predefined-guitar-fretboards.ly"
    \version "2.16.0"
    
    
    mychords = \chordmode {
      c1 c:m c:aug c:dim c:dim7 c:7 c:maj7 c:m7 c:9 \break
    }
    [...]
    

    Eingeschobene Stimme kommt nicht in die Tabulatur[edit]

    
\version "2.20.0"
\header {
  title = " Op. 31 Etude No.1 Andante "
  % subtitle = " ... "
  % piece = " ... "
  composer = "Ferdinand Sor (*1778-†1839)"
  % opus = "Op.31"
  % source = "using different sources"
  arranger = "Mjchael"
  copyright = "ccbysa de.wikibooks.org/wiki/Gitarre"
  % footer = " ... "
}

Diskant =  \relative c' {
  \set Staff.midiInstrument = "acoustic guitar (nylon)"
  %Part 1
  \override NoteHead #'color = #red       
  \partial 4 
  \repeat volta 2 { g4 
    e'2 c4 | g c e | g-4 f-1 d-4 | b2 g4 | 
    g2 c4 | c b c |
    %% kurzfristig zweistimmig
    <<
      {
        d2.-4~ | d
      }
      \new Voice {
       \override NoteHead #'color = #green 
        %% g4\rest =   1/4 Pause in Höhe g
        g,4\rest g4 g | g4 g g
      }
    >> \break
    %% wieder einstimmigen
    \override NoteHead #'color = #red
    e'2 c4 | g c e | g-3 fis-2 f-1 | d-4 b g | c2 e4 |
    a,-2 d-4 b | c2 e4 | c r4 
  } 
 
}

Bass =  \relative c' {
  \override NoteHead #'color = #blue
  \partial 4
  \repeat volta 2 { s4 | 
    c,2. | e | d | f-3 | e | e4 d c | b2.-2~ |
    b | c2. | e | d | f-4 | e4 g c, | f2-3 g4 | 
    c, e g | <c, e> s4
  }
}

Gitarre = << \Diskant \\ \Bass >>
       
\score {
  <<
    \new Voice  { 
      \clef "treble_8" \time 3/4  
      \tempo 4 = 120 \key c \major 
      \set Score.tempoHideNote = ##t
      \Gitarre 
    }
    \new TabStaff {
        \Gitarre
    }
  >>
  \layout { }
}
\score {
  <<
    \new Voice  { 
      \clef "treble_8" \time 3/4  
      \tempo 4 = 120 \key c \major 
      \unfoldRepeats \Gitarre 
    }
  >>
  \midi { }
}

\paper {
  indent=0\mm
  line-width=180\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  % bookTitleMarkup=##f
  scoreTitleMarkup=##f
}
    <score sound="1" raw="1">
    \version "2.20.0"
    \header {
      title = " Op. 31 Etude No.1 Andante "
      % subtitle = " ... "
      % piece = " ... "
      composer = "Ferdinand Sor (*1778-†1839)"
      % opus = "Op.31"
      % source = "using different sources"
      arranger = "Mjchael"
      copyright = "ccbysa de.wikibooks.org/wiki/Gitarre"
      % footer = " ... "
    }
    
    Diskant =  \relative c' {
      \set Staff.midiInstrument = "acoustic guitar (nylon)"
      %Part 1
      \override NoteHead #'color = #red       
      \partial 4 
      \repeat volta 2 { g4 
        e'2 c4 | g c e | g-4 f-1 d-4 | b2 g4 | 
        g2 c4 | c b c |
        %% kurzfristig zweistimmig
        <<
          {
            d2.-4~ | d
          }
          \new Voice {
           \override NoteHead #'color = #green 
            %% g4\rest =   1/4 Pause in Höhe g
            g,4\rest g4 g | g4 g g
          }
        >> \break
        %% wieder einstimmigen
        \override NoteHead #'color = #red
        e'2 c4 | g c e | g-3 fis-2 f-1 | d-4 b g | c2 e4 |
        a,-2 d-4 b | c2 e4 | c r4 
      } 
     
    }
    
    Bass =  \relative c' {
      \override NoteHead #'color = #blue
      \partial 4
      \repeat volta 2 { s4 | 
        c,2. | e | d | f-3 | e | e4 d c | b2.-2~ |
        b | c2. | e | d | f-4 | e4 g c, | f2-3 g4 | 
        c, e g | <c, e> s4
      }
    }
    
    Gitarre = << \Diskant \\ \Bass >>
           
    \score {
      <<
        \new Voice  { 
          \clef "treble_8" \time 3/4  
          \tempo 4 = 120 \key c \major 
          \set Score.tempoHideNote = ##t
          \Gitarre 
        }
        \new TabStaff {
            \Gitarre
        }
      >>
      \layout { }
    }
    \score {
      <<
        \new Voice  { 
          \clef "treble_8" \time 3/4  
          \tempo 4 = 120 \key c \major 
          \unfoldRepeats \Gitarre 
        }
      >>
      \midi { }
    }
    
    \paper {
      indent=0\mm
      line-width=180\mm
      oddFooterMarkup=##f
      oddHeaderMarkup=##f
      % bookTitleMarkup=##f
      scoreTitleMarkup=##f
    }
    </score>
    

    Lösung[edit]

    Danke an das LilipondForum.de für die Hilfe.

    new Botton statt new Voice

    
          \new Bottom = "middle" {
            % \override NoteHead #'color = #green
            \voiceThree
            %% g4\rest =   1/4 Pause in Höhe g
            g,4\rest g4 g | g4 g g
          }
    


    
\version "2.20.0"
\header {
  title = " Op. 31 Etude No.1 Andante "
  % subtitle = " ... "
  % piece = " ... "
  composer = "Ferdinand Sor (*1778-†1839)"
  % opus = "Op.31"
  % source = "using different sources"
  arranger = "Mjchael"
  copyright = "ccbysa de.wikibooks.org/wiki/Gitarre"
  % footer = " ... "
}

Diskant =  \relative c' {
  \set Staff.midiInstrument = "acoustic guitar (nylon)"
  %Part 1
  \override NoteHead #'color = #red       
  \partial 4 
  \repeat volta 2 { g4 
    e'2 c4 | g c e | g-4 f-1 d-4 | b2 g4 | 
    g2 c4 | c b c |
    %% kurzfristig zweistimmig
    <<
      {
        d2.-4~ | d
      }
      \new Bottom = "middle" {
       \override NoteHead #'color = #green
       \voiceThree
        %% g4\rest =   1/4 Pause in Höhe g
        g,4\rest g4 g | g4 g g
      }
    >> \break
    %% wieder einstimmigen
    \override NoteHead #'color = #red
    e'2 c4 | g c e | g-3 fis-2 f-1 | d-4 b g | c2 e4 |
    a,-2 d-4 b | c2 e4 | c r4 
  } 
 
}

Bass =  \relative c' {
  \override NoteHead #'color = #blue
  \partial 4
  \repeat volta 2 { s4 | 
    c,2. | e | d | f-3 | e | e4 d c | b2.-2~ |
    b | c2. | e | d | f-4 | e4 g c, | f2-3 g4 | 
    c, e g | <c, e> s4
  }
}

Gitarre = << \Diskant \\ \Bass >>
       
\score {
  <<
    \new Voice  { 
      \clef "treble_8" \time 3/4  
      \tempo 4 = 120 \key c \major 
      \set Score.tempoHideNote = ##t
      \Gitarre 
    }
    \new TabStaff {
        \Gitarre
    }
  >>
  \layout { }
}
\score {
  <<
    \new Voice  { 
      \clef "treble_8" \time 3/4  
      \tempo 4 = 120 \key c \major 
      \unfoldRepeats \Gitarre 
    }
  >>
  \midi { }
}

\paper {
  indent=0\mm
  line-width=180\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  % bookTitleMarkup=##f
  scoreTitleMarkup=##f
}