lilypond-vorlagen/snippets_20240110_DE.xml

989 lines
21 KiB
XML
Raw Normal View History

<snippets>
<!--
Created by Frescobaldi 3.2.
Every snippet is represented by:
title: title text
shortcuts: list of shortcut elements, every shortcut is a key sequence
body: the snippet text
The snippet id attribute can be the name of a builtin snippet or a random
name like 'n123456'. In the latter case, the title is used to determine
whether a snippet is new or updated.
-->
<snippet id="n935672">
<title>Abstand </title>
<shortcuts />
<body>%\vspace(#2)</body>
</snippet>
<snippet id="n258882">
<title>Abstand Seitenrand/oberstes Notensystem</title>
<shortcuts />
<body>HEADER = \bookpart {
\paper {
top-system-spacing.padding = 6 %Abstand zwischen Seitenrand und obersten Notensystem (wenn was anderes da steht wie z.B. Titel/ Text, greift das nicht) gut um z.B. noten auf der zweiten Seite runter zu machen
}</body>
</snippet>
<snippet id="n776888">
<title>Abstand Titel/Noten</title>
<shortcuts />
<body>% nach HEADER = \bookpart {
\paper {
markup-system-spacing.padding = 2
}</body>
</snippet>
<snippet id="n471680">
<title>Abstand Titel/oberer Seitenrand</title>
<shortcuts />
<body>%titletopspace = 1 % nach titlesize</body>
</snippet>
<snippet id="titlecase">
<title>Auswahl der Groß-/Kleinschreibung des Titels</title>
<shortcuts />
<body>-*- python; selection: yes, keep;
text = text.title()
</body>
</snippet>
<snippet id="uppercase">
<title>Auswahl zu Großbuchstaben</title>
<shortcuts>
<shortcut>Ctrl+U</shortcut>
</shortcuts>
<body>-*- python; selection: yes, keep;
text = text.upper()
</body>
</snippet>
<snippet id="lowercase">
<title>Auswahl zu Kleinbuchstaben</title>
<shortcuts>
<shortcut>Ctrl+Shift+U</shortcut>
</shortcuts>
<body>-*- python; selection: yes, keep;
text = text.lower()
</body>
</snippet>
<snippet id="template_leadsheet">
<title>Basis-Leadsheet</title>
<shortcuts />
<body>-*- template; template-run;
\version "$LILYPOND_VERSION"
\header {
title = ""
}
global = {
\time 4/4
\key c \major
\tempo 4=100
}
chordNames = \chordmode {
\global
c1
}
melody = \relative c'' {
\global
c4 d e f
$CURSOR
}
words = \lyricmode {
}
\score {
&lt;&lt;
\new ChordNames \chordNames
\new FretBoards \chordNames
\new Staff { \melody }
\addlyrics { \words }
&gt;&gt;
\layout { }
\midi { }
}
</body>
</snippet>
<snippet id="template_blank_sheet_music_paper">
<title>Blank Music Sheet</title>
<shortcuts />
<body>-*- template; indent: no; template-run;
\version "${LILYPOND_VERSION}"
{
\repeat unfold 12${CURSOR}
{
s1
\break
}
}
\layout {
\context {
\Score
\remove "Bar_number_engraver"
}
\context {
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
\remove "Bar_engraver"
}
}
\paper {
indent = 0
ragged-last-bottom = ##f
top-system-spacing = #'((minimum-distance . 10))
last-bottom-spacing = #'((minimum-distance . 10))
}
\header {
tagline = ##f
}
</body>
</snippet>
<snippet id="template_choir_hymn">
<title>Chor-Hymnus</title>
<shortcuts />
<body>-*- template; template-run;
\version "$LILYPOND_VERSION"
\header {
title = ""
}
global = {
\time 4/4
\key c \major
\tempo 4=100
}
soprano = \relative c'' {
\global
$CURSORc4
}
alto = \relative c' {
\global
c4
}
tenor = \relative c' {
\global
c4
}
bass = \relative c {
\global
c4
}
verseOne = \lyricmode {
\set stanza = "1."
hi
}
verseTwo = \lyricmode {
\set stanza = "2."
ha
}
verseThree = \lyricmode {
\set stanza = "3."
ho
}
\score {
\new ChoirStaff &lt;&lt;
\new Staff \with {
midiInstrument = "choir aahs"
instrumentName = \markup \center-column { S A }
} &lt;&lt;
\new Voice = "soprano" { \voiceOne \soprano }
\new Voice = "alto" { \voiceTwo \alto }
&gt;&gt;
\new Lyrics \with {
\override VerticalAxisGroup #'staff-affinity = #CENTER
} \lyricsto "soprano" \verseOne
\new Lyrics \with {
\override VerticalAxisGroup #'staff-affinity = #CENTER
} \lyricsto "soprano" \verseTwo
\new Lyrics \with {
\override VerticalAxisGroup #'staff-affinity = #CENTER
} \lyricsto "soprano" \verseThree
\new Staff \with {
midiInstrument = "choir aahs"
instrumentName = \markup \center-column { T B }
} &lt;&lt;
\clef bass
\new Voice = "tenor" { \voiceOne \tenor }
\new Voice = "bass" { \voiceTwo \bass }
&gt;&gt;
&gt;&gt;
\layout { }
\midi { }
}
</body>
</snippet>
<snippet id="quotes_s">
<title>Einzelne typografische Anführungszeichen</title>
<shortcuts>
<shortcut>Ctrl+'</shortcut>
</shortcuts>
<body>-*- menu: text; python;
import lasptyqu
left, right = lasptyqu.preferred().secondary
if text:
text = left + text + right
else:
text = [left, CURSOR, right]
</body>
</snippet>
<snippet id="uncomment">
<title>Entkommentieren</title>
<shortcuts>
<shortcut>Ctrl+Alt+C, Ctrl+Alt+U</shortcut>
</shortcuts>
<body>-*- python; indent: no; menu: comment;
import re
def main():
text = globals()['text']
# determine state
for s in state[::-1]:
if s in ('lilypond', 'html', 'scheme'):
break
else:
s = 'lilypond'
def html(text):
if text:
text = text.replace('&lt;!-- ', '')
text = text.replace(' --&gt;', '')
text = text.replace('&lt;!--', '')
text = text.replace('--&gt;', '')
return text
def lilypond(text):
if text.lstrip().startswith('%{'):
if text.lstrip().startswith('%{ '):
text = text.lstrip()[3:]
else:
text = text.lstrip()[2:]
if text.rstrip().endswith('%}'):
text = text.rstrip()[:-2]
else:
if not text:
cursor.select(cursor.BlockUnderCursor)
text = cursor.selection().toPlainText()
text = re.compile(r'^(\s*)%+ ?', re.M).sub(r'\1', text)
return text
def scheme(text):
return re.compile(r'^(\s*);+', re.M).sub(r'\1', text)
if s == 'lilypond':
text = lilypond(text)
elif s == 'html':
text = html(text)
elif s == 'scheme':
text = scheme(text)
if text != cursor.selection().toPlainText():
cursor.insertText(text)
</body>
</snippet>
<snippet id="color_dialog">
<title>Farbe</title>
<shortcuts />
<body>-*- name: col; python; icon: applications-graphics;
# Insert a color from a dialog
import inputdialog
colors = {
(0, 0, 0): "black",
(255, 255, 255): "white",
(255, 0, 0): "red",
(0, 255, 0): "green",
(0, 0, 255): "blue",
(0, 255, 255): "cyan",
(255, 0, 255): "magenta",
(255, 255, 0): "yellow",
(128, 128, 128): "grey",
(128, 0, 0): "darkred",
(0, 128, 0): "darkgreen",
(0, 0, 128): "darkblue",
(0, 128, 128): "darkcyan",
(128, 0, 128): "darkmagenta",
(128, 128, 0): "darkyellow",
}
color = inputdialog.getColor(view)
if color is not None:
rgb = color.getRgb()[:-1]
if rgb in colors:
text = '#' + colors[rgb]
else:
rgb = tuple(map(lambda v: format(v / 255.0, ".4"), rgb))
text = "#(rgb-color {0} {1} {2})".format(*rgb)
</body>
</snippet>
<snippet id="n043320">
<title>Fretchord bauen</title>
<shortcuts />
<body>\group-verses {
\vspace #2
\nochordverse #"5."
#" "
\fret-chord #"x;o;1;2;1;2;" #"a:dim7"
}</body>
</snippet>
<snippet id="n976505">
<title>Katergorien</title>
<shortcuts />
<body>categories = "fahrt geschunkel ost"
% abend anti fahrt feier geschunkel herz irisch jahr jiddisch kanon medi morgen nord ost reisser russisch satz see trist volk Wandern
% bis zu drei Kategorien</body>
</snippet>
<snippet id="no_tagline">
<title>Keine Tagline</title>
<shortcuts />
<body>-*- name: nt; python; menu: properties;
text = 'tagline = ##f'
if state[-1] != 'header':
text = '\\header {\n%s\n}' % text
</body>
</snippet>
<snippet id="no_barnumbers">
<title>Keine Taktzahlen</title>
<shortcuts />
<body>-*- name: nb; python; menu: properties;
text = r'\remove "Bar_number_engraver"'
if state[-1] not in ('context', 'with'):
text = '\\context {\n\\Score\n%s\n}' % text
if state[-1] != 'layout':
text = '\\layout {\n%s\n}' % text
</body>
</snippet>
<snippet id="last_note">
<title>Letzte Note oder Akkord</title>
<shortcuts>
<shortcut>Ctrl+;</shortcut>
</shortcuts>
<body>-*- python; menu: music; symbol: note_ellipsis;
# This snippet reads back the last entered note or chord and
# inserts it again. It removes the octave mark from a note of the first
# note of a chord if the music is in relative mode.
import lydocument
import ly.lex.lilypond as lp
# space needed before cursor?
block = cursor.document().findBlock(cursor.selectionStart())
beforecursor = block.text()[:cursor.selectionStart()-block.position()]
spaceneeded = bool(beforecursor and beforecursor[-1] not in "\t ")
chordstart, chordend = None, None
notestart = None
relative = False
found = False
c = lydocument.cursor(cursor)
runner = lydocument.Runner.at(c, True)
for t in runner.backward():
if t == '\\relative':
relative = True
break
elif isinstance(t, (lp.Score, lp.Book, lp.BookPart, lp.Name)):
break
if found:
continue
if chordend is not None:
if isinstance(t, lp.ChordStart):
chordstart = runner.position()
found = True
continue
if isinstance(t, lp.ChordEnd):
chordend = runner.position() + len(t)
elif isinstance(t, lp.Note) and t not in ('R' ,'q', 's', 'r'):
notestart = runner.position()
found = True
if found:
if chordstart is not None:
text = []
removeOctave = 1 if relative else 0
c.start, c.end = chordstart, chordend
for t in lydocument.Source(c):
# remove octave from first pitch in relative
if isinstance(t, lp.Note):
removeOctave -= 1
elif isinstance(t, lp.Octave) and removeOctave == 0:
continue
text.append(t)
text = ''.join(text)
elif notestart is not None:
text = []
c.start, c.end = notestart, None
for t in lydocument.Source(c):
if isinstance(t, lp.Note):
text.append(t)
elif not relative and isinstance(t, lp.Octave):
text.append(t)
else:
break
text = ''.join(text)
if spaceneeded:
text = " " + text
</body>
</snippet>
<snippet id="midi_tempo">
<title>MIDI-Tempo</title>
<shortcuts />
<body>-*- name: mt; python;
text = ['tempoWholesPerMinute = #(ly:make-moment ', CURSOR, '100 4)']
if state[-1] not in ('context', 'with'):
text = ['\\context {\n\\Score\n'] + text + ['\n}']
if state[-1] != 'midi':
text = ['\\midi {\n'] + text + ['\n}']
</body>
</snippet>
<snippet id="m22">
<title>Moderne Taktart</title>
<shortcuts />
<body>-*- name: 22;
\numericTimeSignature
\time 2/2</body>
</snippet>
<snippet id="times23">
<title>N-Tolen</title>
<shortcuts>
<shortcut>Ctrl+3</shortcut>
</shortcuts>
<body>-*- menu: blocks; selection: strip;
\tuplet 3/2 { $SELECTION }</body>
</snippet>
<snippet id="n829189">
<title>Note in Klammern</title>
<shortcuts />
<body>\parenthesize d</body>
</snippet>
<snippet id="staff_size">
<title>Notenzeilen-Größe</title>
<shortcuts />
<body>-*- name: ss; python;
if state[-1] == 'music':
text = (
"\\set Staff.fontSize = #-1\n"
"\\override Staff.StaffSymbol #'staff-space = #(magstep -1)\n")
else:
text = (
"fontSize = #-1\n"
"\\override StaffSymbol #'staff-space = #(magstep -1)")
if state[-1] == 'new':
text = '\\with {\n%s\n}' % text
elif state[-1] not in ('context', 'with'):
text = '\\context {\n\\Staff\n%s\n}' % text
if state[-1] != 'layout':
text = '\\layout {\n%s\n}' % text
</body>
</snippet>
<snippet id="next_blank_line">
<title>Nächste Leerzeile</title>
<shortcuts>
<shortcut>Alt+Down</shortcut>
</shortcuts>
<body>-*- python; indent: no;
import cursortools
def main():
block = cursortools.next_blank(cursor.block())
if block:
cursor.setPosition(block.position() + block.length() - 1)
return cursor
</body>
</snippet>
<snippet id="repeatunfold">
<title>Repeat unfold</title>
<shortcuts />
<body>-*- menu: blocks; name: repunf; selection: strip;
\repeat unfold 2$CURSOR { $SELECTION }</body>
</snippet>
<snippet id="tagline_date_version">
<title>Tagline mit Datum und LilyPond-Version</title>
<shortcuts />
<body>tagline = \markup {
Engraved at
\simple #(strftime "%Y-%m-%d" (localtime (current-time)))
with \with-url #"http://lilypond.org/"
\line { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
}
</body>
</snippet>
<snippet id="tactus">
<title>Taktart (Zahl mit Note)</title>
<shortcuts />
<body>-*- name: tac;
\once \override Staff.TimeSignature #'style = #'()
\once \override Staff.TimeSignature #'stencil = #ly:text-interface::print
\once \override Staff.TimeSignature #'text = \markup {
\override #'(baseline-skip . 0.5)
\column { \number $CURSOR1$ANCHOR \tiny \note #"2" #-.6 }
}
</body>
</snippet>
<snippet id="n650477">
<title>Titelgröße</title>
<shortcuts />
<body> titlesize = 8 </body>
</snippet>
<snippet id="n221947">
<title>Tonart</title>
<shortcuts />
<body>\key c \major
% major=dur, minor=moll,
% 1# g-dur &amp; e-moll, 2# d-dur und h-moll, 3# a-dur und fis-moll, 4# e-dur und cis-moll, 5# h-dur und gis-moll 6# fis-dur und dis-moll
% 1b f-dur und d-moll,2b b-dur und g-moll, 3b es-dur und c-moll, 4b as-dur und f-moll, 5b des-dur und b-moll, 6b ges-dur und es-moll
</body>
</snippet>
<snippet id="n732103">
<title>Unterstreichen textstrophe</title>
<shortcuts />
<body>\\underline { }</body>
</snippet>
<snippet id="repeat">
<title>Wiederholung</title>
<shortcuts>
<shortcut>Ctrl+Shift+R</shortcut>
</shortcuts>
<body>-*- menu: blocks; name: rep; selection: strip; symbol: bar_repeat_start;
\repeat volta 2 { $SELECTION }</body>
</snippet>
<snippet id="n175158">
<title>Wiederholung textstrophe</title>
<shortcuts />
<body>\\repStart \\repStop</body>
</snippet>
<snippet id="next_blank_line_select">
<title>Wähle bis zur nächsten Leerzeile aus</title>
<shortcuts>
<shortcut>Alt+Shift+Down</shortcut>
</shortcuts>
<body>-*- python; indent: no;
import cursortools
def main():
block = cursortools.next_blank(cursor.block())
if block:
cursor.setPosition(block.position() + block.length() - 1, cursor.KeepAnchor)
return cursor
</body>
</snippet>
<snippet id="previous_blank_line_select">
<title>Wähle bis zur vorherigen Leerzeile aus</title>
<shortcuts>
<shortcut>Alt+Shift+Up</shortcut>
</shortcuts>
<body>-*- python; indent: no;
import cursortools
def main():
block = cursortools.previous_blank(cursor.block())
if block:
cursor.setPosition(block.position() + block.length() - 1, cursor.KeepAnchor)
return cursor
</body>
</snippet>
<snippet id="removelines">
<title>Zeile(n) löschen</title>
<shortcuts>
<shortcut>Ctrl+K</shortcut>
</shortcuts>
<body>-*- python;
import cursortools
def main():
start = end = cursortools.block(cursor)
while end.position() + end.length() &lt; cursor.selectionEnd():
end = end.next()
cursor.setPosition(start.position())
cursor.setPosition(end.position(), cursor.KeepAnchor)
cursor.movePosition(cursor.EndOfBlock, cursor.KeepAnchor)
cursor.movePosition(cursor.NextBlock, cursor.KeepAnchor)
cursor.removeSelectedText()
</body>
</snippet>
<snippet id="header">
<title>\header-Vorlage</title>
<shortcuts />
<body>-*- name: h; menu: blocks;
\header {
title = "$CURSOR"
composer = ""
tagline = \markup {
Engraved at
\simple #(strftime "%Y-%m-%d" (localtime (current-time)))
with \with-url #"http://lilypond.org/"
\line { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
}
}
</body>
</snippet>
<snippet id="onceoverride">
<title />
<shortcuts />
<body>-*- name: oo;
\once \override </body>
</snippet>
<snippet id="1voice">
<title />
<shortcuts>
<shortcut>Alt+0</shortcut>
</shortcuts>
<body>-*- name: 1v;
\oneVoice</body>
</snippet>
<snippet id="score">
<title />
<shortcuts />
<body>-*- menu: blocks;
\score {
$SELECTION
\layout {}
\midi {}
}
</body>
</snippet>
<snippet id="stanza1">
<title />
<shortcuts />
<body>-*- name: s1;
\set stanza = "1."
</body>
</snippet>
<snippet id="stanza2">
<title />
<shortcuts />
<body>-*- name: s2;
\set stanza = "2."
</body>
</snippet>
<snippet id="stanza3">
<title />
<shortcuts />
<body>-*- name: s3;
\set stanza = "3."
</body>
</snippet>
<snippet id="stanza4">
<title />
<shortcuts />
<body>-*- name: s4;
\set stanza = "4."
</body>
</snippet>
<snippet id="stanza5">
<title />
<shortcuts />
<body>-*- name: s5;
\set stanza = "5."
</body>
</snippet>
<snippet id="stanza6">
<title />
<shortcuts />
<body>-*- name: s6;
\set stanza = "6."
</body>
</snippet>
<snippet id="voice4">
<title />
<shortcuts>
<shortcut>Alt+4</shortcut>
</shortcuts>
<body>-*- name: v4;
\voiceFour</body>
</snippet>
<snippet id="voice1">
<title />
<shortcuts>
<shortcut>Alt+1</shortcut>
</shortcuts>
<body>-*- name: v1;
\voiceOne</body>
</snippet>
<snippet id="voice3">
<title />
<shortcuts>
<shortcut>Alt+3</shortcut>
</shortcuts>
<body>-*- name: v3;
\voiceThree</body>
</snippet>
<snippet id="voice2">
<title />
<shortcuts>
<shortcut>Alt+2</shortcut>
</shortcuts>
<body>-*- name: v2;
\voiceTwo</body>
</snippet>
<snippet id="n597649">
<title>anführungszeichen</title>
<shortcuts />
<body>„ “</body>
</snippet>
<snippet id="n431314">
<title>apostroph</title>
<shortcuts />
<body></body>
</snippet>
<snippet id="n301803">
<title>bridge noten</title>
<shortcuts />
<body>bridge = \relative c'' {
\global
\repeat volta2{
d2 a2
\tuplet3/2{g4 a h} fis2
d'2 a2
d4 cis h r4^\markup{3x}
}
\bar "|."
}</body>
</snippet>
<snippet id="n630496">
<title>bridge noten</title>
<shortcuts />
<body>bridge = \relative c'' {
\global
\repeat volta2{
d2 a2
\tuplet3/2{g4 a h} fis2
d'2 a2
d4 cis h r4^\markup{3x}
}
\bar "|."
}
</body>
</snippet>
<snippet id="n166584">
<title>bridge text + einbau in group-verses</title>
<shortcuts />
<body>
\score {
&lt;&lt;
\chords { g2 d2 fis2 h2:m g2 d2 fis2 h4:m}
\new Staff { \bridge }
\addlyrics {
\set stanza = "Bridge:"
Jo, ho, ho, ho, ho, ho. Jo, ho ho ho ho. }
&gt;&gt; \layout { \generalLayout }
}</body>
</snippet>
<snippet id="n548402">
<title>fermate</title>
<shortcuts />
<body>\fermata </body>
</snippet>
<snippet id="n124096">
<title>fett in textstrophe</title>
<shortcuts />
<body>\\bold { }</body>
</snippet>
<snippet id="n650709">
<title>klammern gepunktet</title>
<shortcuts />
<body>\once \slurDotted c4</body>
</snippet>
<snippet id="n405405">
<title>klammern gepunktet ignorieren:</title>
<shortcuts />
<body> \set ignoreMelismata = ##t dei -- ner \unset ignoreMelismata
</body>
</snippet>
<snippet id="n484766">
<title>klammern um Akkord in textstrophe</title>
<shortcuts />
<body>(jetzt,\\\\klamm{d:m})</body>
</snippet>
<snippet id="n875332">
<title>klammern um textstrophe</title>
<shortcuts />
<body>\\concat{\\char ##x28 Klammer} auf und Klammer \\concat{zu \\char ##x29 }"</body>
</snippet>
<snippet id="n142264">
<title>kursiv in textstrophe</title>
<shortcuts />
<body>\\italic { }</body>
</snippet>
<snippet id="n665054">
<title>markup unter den Noten</title>
<shortcuts />
<body>_\markup {\italic "čaj šukarije!"}</body>
</snippet>
<snippet id="n999473">
<title>markup über den Noten</title>
<shortcuts />
<body>^\markup {\italic "čaj šukarije!"}</body>
</snippet>
<snippet id="n657891">
<title>page-count</title>
<shortcuts />
<body>% nach HEADER = \bookpart {
\paper {
%page-count = #1
}</body>
</snippet>
<snippet id="n886515">
<title>spalten</title>
<shortcuts />
<body>\override #'(verse-hspace . 2) % horizontaler Abstand zwischen den Spalten
\override #'(verse-vspace . 2) % vertikaler Abstand zwischen den Zeilen
\override #'(verse-cols . 2) % Anzahl der Spalten
% vspace funktioniert hier nicht mehr!
\group-verses {
\chordverse #"8."
#" "
\chordverse #"9."
#" "
\chordverse #"10."
#" "
} </body>
</snippet>
<snippet id="n356662">
<title>taktwechsel</title>
<shortcuts />
<body>\time 4/4</body>
</snippet>
<snippet id="n365782">
<title>trennstrich</title>
<shortcuts />
<body> </body>
</snippet>
<snippet id="n190592">
<title>triolen</title>
<shortcuts />
<body>\tuplet 3/2{cis4 d e} </body>
</snippet>
<snippet id="n721746">
<title>wiederholung mit klammer 1 und 2</title>
<shortcuts />
<body>\repeat volta 2 {
c4 g'8 g4 g8
g4 d8 d4 d8
f4 f8 f (g) f }
\alternative {
{g es4~es4 es8}
{g4 d8 d d4}
}</body>
</snippet>
<snippet id="n821959">
<title>zweite Stimme in die Notenzeile</title>
<shortcuts />
<body>{ "noten einzelstimme" &lt;&lt; { \voiceOne "noten"
} \new Voice { \voiceTwo \secondVoiceStyle "noten"
}} &gt;&gt; \oneVoice</body>
</snippet>
</snippets>