DRAFT

Chisto modello ausa Modulo:Mscore.

Sto template/modulo è nu work in progress. Se pò ausà pe miettere l'una appriess’a ll'ata paggene/spartiti 'e spartiti partenno d’ ’o namespace Paggena e fernenno int'a na sula paggena/spartito int’ ’o namespace Prencepale. Sirve purzì pe cagnà 'a larghezza d’ ’o spartito.

{{Tscore
 | start    = 
 | cont     = 
 | next     = 
 | score    = 
 | width    = 
 | debug    = 
 | layout   = 
 | lvarOne  = 
 | lvarTwo  = 
 | ...
 | svarOne  = 
 | svarTwo  = 
 | ...
}}

Parameters

cagna
  • start (optional): unique identifier for merging multiple pages with {{Tscore}} template, used on first page of music; if set, next also should be set.
  • cont (optional): same identifier as for start, used on subsequent pages.
  • next (optional): name of the next page in Page namespace that music from current page is continued on; the "Page:" prefix may be omitted. It is required if start is set.
  • resizable (optional): make the music full page wide (requires .js code to work)
  • mmiwidth (optional): set the bottom limit for resize range for {{{1}}} (default 100)
  • maxwidth (optional): set the top limit for resize range for {{{1}}} (default 400)
  • score (required): score code; note that vertical lines | shold be replaced by {{!}}. Extra variables containing music (s-variables) or lyrics (l-variables) can be used as \sVariableName and \lVariableName; see below.
  • width {optional): staff line width (in milimeters); defaults to 180 as in standard <score>. Note, that for Page namespace width is now limited to 120.
  • layout {optional): extra layout settings for <score>; you may need to set indent = 0\cm here to avoid first line indentation that is default in Lilypond.
  • debug {optional): set it to 1 to dump the code provided to lilypond; used only for debugging
  • lvariable (where variable is an arbitrary sequence of letters) (optional): arbitrary variables used for merging multiple parts of lyrics across pages; values of the same lvariable are concatenated across subsequent pages, when generating music in main namespace. Number of variables is not limitted, The values must be set in all subsequent pages that are merged (even if empty on some of them)
  • svariable (where variable is an arbitrary sequence of letters) (optional): arbitrary variables used for merging multiple parts of music (notes) across pages; values of the same svariable are concatenated across subsequent pages, when generating music in main namespace. Number of variables is not limitted, The values must be set in all subsequent pages that are merged (even if empty on some of them)

Remarks

cagna
  1. You may not use vertical lines | in music code when using this template; use {{!}} instead
  2. You may not use other templates in music / lyrics code on all pages but first (wikicode of subsequent pages is parsed using LUA parser that may be mislead by such templates)
  3. You may not use pairs of unseparated brackets: {{, }} in Lilypond code; separate them with a space: { {, } }.
  4. When displaying in main (or another except Page) namespace, the whole (merged) music is displayed as it is on first page (the one with start parameter). Templates from subsequent pages displays as empty (this is similar to {{hws}} / {{hwe}} behaviour).
  5. You should use the \relative Lilypond clause carefully; otherwise the results of merged music code may be shofted of one or move octaves. The safast is to set the base for \relative on next page to the absolute value of last note at the previous page in each context (each svariable) or not use this clause at all.
  6. Alternative repeats for lyrics must be put at the end of the lyrics, and not in an \alternative scope.
  7. The midi music generation and vorbis player are always set on

Examples

cagna

Setting width

cagna
{{Tscore
|score = \new Staff { \time 4/4 \relative c { c4 d e f {{!}} g a b c {{!}} d e f g \bar "{{!}}." } }
|width = 60
}}

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #60
}
\new Staff { \time 4/4 \relative c { c'4 d e f | g a b c | d e f g \bar "|." } } }

No first line indentation

cagna
{{Tscore
|score = \new Staff { \time 4/4 \relative c { c4 d e f {{!}} g a b c {{!}} d e f g \bar "{{!}}." } }
|layout = indent = 0\cm
}}

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #180
indent = 0\cm}
\new Staff { \time 4/4 \relative c { c'4 d e f | g a b c | d e f g \bar "|." } } }

Using a variable

cagna
{{Tscore
|sThisIsMyVariable = c'4 d e f {{!}} g a b c {{!}} d e f g \bar "{{!}}."
|score = \new Staff { \time 4/4 \relative c \sThisIsMyVariable }
|layout = indent = 0\cm
}}

sThisIsMyVariable = { c'4 d e f | g a b c | d e f g \bar "|." }

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #180
indent = 0\cm}
\new Staff { \time 4/4 \relative c \sThisIsMyVariable } }

More variables

cagna
{{Tscore
|sBeginning = c'4 d e f {{!}} g a b c {{!}}
|sVolta = d e f g
|sAltOne = a2 b
|sAltTwo = a,2 r
|sEnd = b4 c d r \bar "{{!}}."
|score = \new Staff { \time 4/4 \relative c { \sBeginning \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } }
|layout = indent = 0\cm
}}

sAltTwo = { a,2 r }

sAltOne = { a2 b }

sEnd = { b4 c d r \bar "|." }

sVolta = { d e f g }

sBeginning = { c'4 d e f | g a b c | }

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #180
indent = 0\cm}
\new Staff { \time 4/4 \relative c { \sBeginning \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } } }

Merging

cagna

The following split code is equivalent to the above example:

  • page #1
{{Tscore
|start=SomeMergedMusic
|next=page #2
|sBeginning = c'4 d e f {{!}} g a b c {{!}}
|sVolta =
|sAltOne =
|sAltTwo =
|sEnd =
|score = \new Staff { \time 4/4 \relative c { \sBeginning \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } }
|layout = indent = 0\cm
}}

sAltTwo = {  }

sAltOne = {  }

sEnd = {  }

sVolta = {  }

sBeginning = { c'4 d e f | g a b c | }

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #180
indent = 0\cm}
\new Staff { \time 4/4 \relative c { \sBeginning \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } } }


  • page #2
{{Tscore
|cont=SomeMergedMusic
|sBeginning =
|sVolta = d e f g
|sAltOne = a2 b
|sAltTwo = a,2 r
|sEnd = b4 c d r \bar "{{!}}."
|score = \new Staff { \time 4/4 \override Staff.TimeSignature #'transparent = ##t \relative c'' { \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } }
|layout = indent = 0\cm
}}

sAltTwo = { a,2 r }

sAltOne = { a2 b }

sEnd = { b4 c d r \bar "|." }

sVolta = { d e f g }

sBeginning = {  }

\paper { #(set-paper-size "a4")
 oddHeaderMarkup = "" evenHeaderMarkup = "" }
\header { tagline = ##f }
\version "2.18.2"
\score {
\midi {  }
\layout { line-width = #180
indent = 0\cm}
\new Staff { \time 4/4 \override Staff.TimeSignature #'transparent = ##t \relative c'' { \repeat volta 2 \sVolta \alternative { \sAltOne \sAltTwo } \sEnd } } }
  • Note: different code for score on page #2: especially different base for \relative