%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/extending-glissandi-across-repeats.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
%% Translation of GIT committish: 0cc270b871321ae5aa8622cea8d8262aafd16641
  texidocja = "
複数の @code{\\alternative} ブロックにまたがるグリッサンドは、@c
@code{\\alternative} ブロックの始まりに見えない装飾音符を配置し、@c
グリッサンドを付加することで模倣することができます。装飾音符のピッチは@c
グリッサンドの始端と同じであるべきです。ここでは、装飾音符のピッチを引数に@c
取る音楽関数を定義しています。

多声の音楽では、他のボイスの装飾音符と位置を合わせる必要があります。
"
  doctitleja = "繰り返しにまたがるグリッサンド"

%% Translation of GIT committish: 2f3474d9af596d677ed5b7ce720ae4d0954a6b51
  texidocit = "
Un glissando che si estende in vari blocchi @code{\\alternative} può
essere simulato aggiungendo all'inizio di ogni blocco @code{\\alternative}
una nota di abbellimento nascosta da cui inizia un glissando.  La nota di
abbellimento deve avere la stessa altezza della nota da cui parte il
glissando iniziale.  In questo frammento si usa una funzione musicale
che prende come argomento l'altezza  della nota di abbellimento.

Attenzione: nella musica polifonica la nota di abbellimento deve avere una nota
di abbellimento corrispondente in tutte le altre voci.

"
  doctitleit = "Estendere i glissandi sulle volte delle ripetizioni"

%% Translation of GIT committish: de1e42ce512f3690387cdd065109bddff1b7bd6d
  texidocfr = "
Un glissando qui se prolonge sur plusieurs sections @code{\\alternative}
peut se rappeler à l'aide d'une note d'ornement supplémentaire et
masquée, à laquelle sera attaché le départ du glissando, ce dans chaque
bloc @code{\\alternative}. Cette note d'ornement devrait avoir la même
hauteur que la note où commençait le glissando originel. Ceci est géré
par une fonction musicale qui prendra en argument la hauteur de la note
d'ornement.

Dans le cadre d'une musique polyphonique, il ne faudra pas oublier
d'ajouter une note d'ornement dans toutes les autres voix afin de
préserver la synchronisation.
"

  doctitlefr = "Rappel du glissando à l'occasion d'une alternative"

%% Translation of GIT committish: 29da2ba3dc40958f48fd41eb2b183feacc2ea58a
  texidoces = "
Se puede simular un glissando que se extiende hasta el interior de
varios bloques @code{\alternative} de primera y segunda vez mediante
la adición de una nota de adorno oculta con un glissando al comienzo
de cada bloque @code{\alternative}.  La nota de adorno debe estar a la
misma altura que la nota que da inicio al primer glissando.  Esto se
implementa aquí con una función musical que toma como argumento la
altura de la nota de adorno.

Observe que en música polifónica la nota de adorno debe coincidir con
las notas de adorno correspondientes en todas las otras voces.

"
  doctitlees = "Extender glissandos sobre repeticiones"

%% Translation of GIT committish: 98ac53591234404cd70c5eebd370a598ec74095b
  texidocca = "
Es pot simular un glissando que s'estén fins a l'interior de diversos
blocs @code{\alternative} de primera i segona vegada mitjançant
l'addició d'una nota d'adorn oculta amb un glissando al començament de
cada bloc @code{\alternative}.  La nota d'adorn ha d'estar a la
mateixa alçada que la nota que dona inici al primer glissando.,  Això
s'implementa aquí amb una funció musical que agafa com a argument
l'altura de la nota d'adorn.

Observeu que a la música polifònica la nota d'adorn ha de coincidir amb
les notes d'adorn corresponents en totes les altres veus.

"
  doctitleca = "Estendre glissandos sobre repeticions"

  categories = "Scheme, Staff notation, Tweaks and overrides,
                Workaround"

  texidoc = "
A glissando that extends into several @code{\\alternative} blocks can
be simulated by adding a hidden grace note with a glissando at the
start of each @code{\\alternative} block. The grace note should be at
the same pitch as the note which starts the initial glissando. This is
implemented here with a music function that takes the pitch of the
grace note as its argument.

Note that in polyphonic music the grace note must be matched with
corresponding grace notes in all other voices.
"

  doctitle = "Extending glissandi across repeats"
} % begin verbatim


repeatGliss = #(define-music-function (grace)
  (ly:pitch?)
  #{
    % the next two lines ensure the glissando is long enough
    % to be visible
    \once \override Glissando.springs-and-rods
      = #ly:spanner::set-spacing-rods
    \once \override Glissando.minimum-length = 3.5
    \once \hideNotes
    \grace $grace \glissando
  #})

\score {
  \relative c'' {
    \repeat volta 3 { c4 d e f\glissando }
    \alternative {
      { g2 d }
      { \repeatGliss f g2 e }
      { \repeatGliss f e2 d }
    }
  }
}

music =  \relative c' {
  \voiceOne
  \repeat volta 2 {
    g a b c\glissando
  }
  \alternative {
    { d1 }
    { \repeatGliss c \once \omit StringNumber e1\2 }
  }
}

\score {
  \new StaffGroup <<
    \new Staff <<
      \new Voice { \clef "G_8" \music }
    >>
    \new TabStaff  <<
      \new TabVoice { \clef "moderntab" \music }
    >>
  >>
}



% ****************************************************************
% end ly snippet
% ****************************************************************
