Compare commits

..

22 Commits

Author SHA1 Message Date
tux
1da344a401 allow inherits in authors 2024-11-02 20:01:11 +01:00
tux
37e823a425 adjust author sandbox 2024-07-17 13:35:33 +02:00
tux
fa2cb9f9bc transposeGlobal und layout zeug lauffähig bekommen 2024-05-25 17:37:04 +02:00
tux
a105ffc96a sandbox for new author system 2024-05-17 12:33:18 +02:00
tux
71c5197fbb show use of chordlyrics 2024-03-24 11:32:27 +01:00
becb69fa5d neues Autor*innensystem integriert 2024-02-12 13:28:25 +01:00
f795d1cef8 include-updates 2024-02-12 13:19:41 +01:00
c8d1b56459 Vorlage erweitert 2024-01-16 21:34:11 +01:00
e5d394c83b snippets_20240110_DE.xml sind noch nicht komplett 2024-01-10 21:38:17 +01:00
tux
7f82d71529 composition ergänzt 2024-01-03 22:32:35 +01:00
tux
122af89a54 Neues System für Autorenangaben 2023-12-30 20:14:54 +01:00
tux
ff62d98e92 spelling zu pronunciation geändert 2023-11-22 18:37:39 +01:00
tux
ff3e148220 neuer stanza style und sandbox angepasst 2023-11-22 18:21:04 +01:00
f540006a6c Vorlagen aktualisiert 2023-11-21 11:35:52 +01:00
tux
5b053660ef liedbausteine mit default style baubar 2023-11-02 23:14:01 +01:00
tux
4cb3f372d4 sandbox mit Variablen für Songinfogenerierung 2023-10-31 13:32:52 +01:00
tux
3dfe0f7121 update submodule 2023-10-30 23:24:40 +01:00
tux
09d75f2acc Sandbox gebaut mit Trennung von musikalischem Inhalt und Layout 2023-10-29 22:58:06 +01:00
tux
8b519321ff Größenänderung in paper block, damit es für text auch gilt 2023-10-29 22:58:06 +01:00
tux
6996520f1d update submodule 2023-10-28 09:35:23 +02:00
tux
0e31ca7d13 Strophensortierung verbessert 2023-09-25 01:40:26 +02:00
tux
3701e64a17 repeats around chords in 2 Varianten 2023-09-18 18:08:56 +02:00
13 changed files with 1441 additions and 26 deletions

View File

@ -0,0 +1,124 @@
\version "2.25.8"
\include "../../lilypond-custom-includes/base_config.ly"
#(set! paper-alist (cons '("testformat" . (cons (* 176 mm) (* 15 mm))) paper-alist))
\paper {
#(set-paper-size "testformat")
}
\bookpart {
\header {
authors = #'(
("kumpelerbe" text melody))
year_text = "1600"
year_melody = "1600"
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" text melody))
year_text = "1600"
year_melody = "1800"
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" text melody))
year_melody = "1800"
}
\markup { \print-songinfo }
}
\bookpart {
\header {
year_text = "1500"
authors = #'(
("kumpel" text))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" melody))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" melody)
("dude" text composition melody))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" (verse 1))
("dude" melody (voice 1) (voice 2)))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" text (verse 2))
("dude" (verse 2) (verse 3)))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" text (voice 2) (voice 3))
("dude" (voice 2) (voice 3))
("nocheiner" (voice 4)))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
year_composition = "2001"
year_melody = "1901"
authors = #'(
("kumpel" text composition)
("dude" composition))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
authors = #'(
("kumpel" interlude)
("dude" bridge)
("" melody))
}
\markup { \print-songinfo }
}
\bookpart {
\header {
year_melody = "1800"
year_translation = "2010"
authors = #'(
("kumpel" translation)
("dude" text (meloverse 1))
("" melody))
}
\markup { \print-songinfo }
}

93
lieder/sandbox/sandbox.ly Normal file
View File

@ -0,0 +1,93 @@
\version "2.25.8"
%songStyle = #'büdel
\include "../../lilypond-custom-includes/base_config.ly"
\include "../../lilypond-song-includes/liedbausteine/sandbox.ly"
HEADER = \bookpart {
\paper {
%page-count = #1 % dieser Befehl quetscht alles auf diese Seitenanzahl
%markup-system-spacing.padding = 4 %Abstand zwischen Titel und Noten
%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
#(layout-set-staff-size 13) %Größe ändern
}
\header {
\basicSongInfo
titlesize = 11
titletopspace = 2
categories = "see"
}
}
\transposeGlobal d e
MUSIC =
{
<<
\songChords
\new ChoirStaff = "firstStaff"
<<
\new Voice = "firstVoice" { << \firstVoice { s4 \repeat unfold 4 { s1 } \break } >> }
\addlyrics { \firstVerse }
\addlyrics { \secondVerse }
>>
>>
}
TEXT = \markuplist
{
%\fontsize #-1 %Text in den Strophen kleiner
%\vspace #1.5 %Abstand zwischen Strophen
\group-verses {
\override #'(verse-vspace . 0.8) %abstand der Verse voneinander kleiner
\chordverse #(stanza 3) \thirdVerseMarkup
\nochordverse \ref \fourthVerseMarkup
}
\group-verses {
\vspace #5
\nochordverse #(stanza 5) \fifthVerseMarkup
\nochordverse #(stanza 6) \sixthVerseMarkup
\nochordverse #(stanza 7) \seventhVerseMarkup
}
\override #'(verse-cols . 2) %Spalten
%\override #'(verse-ordering-horizontal . #t) % Verse horizontal fortlaufend anordnen
% \override #'(verse-hspace . -5) %Abstand zwischen Spalten geringer
%\translate #'(2 . 0) %das nächste was er printed, printed er nicht dahin wo es eigentlich hinkommt sondern verschiebt es um (x.y)
\group-verses {
\override #`(verse-break-voice . ,#{ s4 \repeat unfold 2 { s1 } \break #})
\chordlyrics \secondVerse
\chordverse #(stanza 8) \columnVerseMarkup
\chordverse #(stanza 9) \columnVerseMarkup
\override #'(intraverse-vspace . 3) % Abstand der Zeilen eines Verses vergrößern
\chordverse #(stanza 10) \columnVerseMarkup
\chordverse #"XI." \columnVerseMarkup
\override #'(custom-verse-breaks "Strophen" "auch" "krass")
\chordverse #(stanza 11) \columnVerseMarkup
}
\group-verses {
%\override #'(baseline-skip . 1) %Damit verändert man den Abstand der Notenzeilen
\bridgeverse
\chordverse #""
#"(,\\repeats-around-chords { a:m c } d)"
\score {
\chords { \repeats-around-chords { a4:m c } d }
\layout { \generalLayout }
}
}
\fret-chord #"x;2;4;4;4;o;" #"h:1.3.5.11"
}
\include "../../lilypond-common-includes/standalone_output.ly"

View File

@ -1,7 +1,9 @@
\version "2.18.0" \version "2.25.8"
%songStyle = #'büdel %songStyle = #'büdel
\include "../../lilypond-custom-includes/base_config.ly" \include "../../lilypond-custom-includes/base_config.ly"
%#(set-default-paper-size "a4" 'portrait) %Seitenformat ändern
HEADER = \bookpart { HEADER = \bookpart {
@ -9,6 +11,9 @@ HEADER = \bookpart {
%page-count = #1 % dieser Befehl quetscht alles auf diese Seitenanzahl %page-count = #1 % dieser Befehl quetscht alles auf diese Seitenanzahl
%markup-system-spacing.padding = 4 %Abstand zwischen Titel und Noten %markup-system-spacing.padding = 4 %Abstand zwischen Titel und Noten
%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 %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
%#(layout-set-staff-size 13) %Größe ändern
%print-page-number = ##f %keine Seitenzahlen drucken
%system-system-spacing.padding = 1 %verändert den Abstand zwischen zwei Systemen
} }
\header { \header {
@ -16,8 +21,11 @@ HEADER = \bookpart {
alttitle = "Alternativtitel" alttitle = "Alternativtitel"
titlesize = 11 titlesize = 11
titletopspace = 2 titletopspace = 2
poetId = "dude" authors = #'(
composerId = "dude" ("dude" melody)
("kumpel" text))
year_text = "2020"
year_melody = "2021"
copyright = "Fumpeverlag" copyright = "Fumpeverlag"
categories = "see" categories = "see"
songinfo = "Hintergrund songinfo = "Hintergrund
@ -30,8 +38,6 @@ HEADER = \bookpart {
LAYOUT = \layout { LAYOUT = \layout {
\generalLayout \generalLayout
% #(layout-set-staff-size 13) %alles kleiner machen
% #(define fonts (default-pango (- globalSize 1))) %Notengröße kleiner machen
} }
@ -109,7 +115,10 @@ MUSIC =
e \once \set chordChanges = ##f e %gleichbl. Akkord sichtbar machen e \once \set chordChanges = ##f e %gleichbl. Akkord sichtbar machen
h:1.3.5.11 h:1.3.5.11
} }
\new ChoirStaff = "firstStaff" \new ChoirStaff = "firstStaff" \with {
%\override StaffGrouper.staff-staff-spacing.padding = #0
%\override StaffGrouper.staff-staff-spacing.basic-distance = #1
}
<< <<
\new Voice = "firstVoice" { \firstVoice } \new Voice = "firstVoice" { \firstVoice }
\addlyrics { \firstVerse } \addlyrics { \firstVerse }
@ -145,6 +154,7 @@ TEXT = \markuplist
\\repStart deswegen \\concat{ \\underline { wer } den } die hier mittels \\bold { nochordverse } automatisch \\repStart deswegen \\concat{ \\underline { wer } den } die hier mittels \\bold { nochordverse } automatisch
entfernt! \\repStop" entfernt! \\repStop"
} }
\group-verses { \group-verses {
\vspace #5 \vspace #5
@ -167,6 +177,7 @@ TEXT = \markuplist
Anführungszeichen sind so „ und so “" Anführungszeichen sind so „ und so “"
} }
\override #'(verse-cols . 2) %Spalten \override #'(verse-cols . 2) %Spalten
%\override #'(verse-ordering-horizontal . #t) % Verse horizontal fortlaufend anordnen
% \override #'(verse-hspace . -5) %Abstand zwischen Spalten geringer % \override #'(verse-hspace . -5) %Abstand zwischen Spalten geringer
%\translate #'(2 . 0) %das nächste was er printed, printed er nicht dahin wo es eigentlich hinkommt sondern verschiebt es um (x.y) %\translate #'(2 . 0) %das nächste was er printed, printed er nicht dahin wo es eigentlich hinkommt sondern verschiebt es um (x.y)
\group-verses { \group-verses {
@ -198,6 +209,12 @@ TEXT = \markuplist
\BRIDGE \BRIDGE
\layout { \generalLayout } \layout { \generalLayout }
} }
\chordverse #""
#"(,\\repeats-around-chords { a:m c } d)"
\score {
\chords { \repeats-around-chords { a4:m c } d }
\layout { \generalLayout }
}
} }
\fret-chord #"x;2;4;4;4;o;" #"h:1.3.5.11" \fret-chord #"x;2;4;4;4;o;" #"h:1.3.5.11"
} }

View File

@ -5,9 +5,12 @@
HEADER = \bookpart { HEADER = \bookpart {
\header { \header {
title = "Titel" title = "Titel"
songId = "a-song-id" alttitle = "Liedanfang"
categories = "" authors = #'(
songinfo = "wasauchimmer" ("" ))
year_text = ""
year_melody = ""
infotext = ""
} }
} }
@ -29,6 +32,8 @@ firstVoice = \relative c' {
\bar "|." \bar "|."
} }
verseChords = \chordmode { c }
MUSIC = { MUSIC = {
<< <<
\chords { \chords {
@ -41,7 +46,7 @@ MUSIC = {
>> >>
>> >>
} }
%}
TEXT = \markuplist { TEXT = \markuplist {
\group-verses { \group-verses {
\chordverse #"2." \chordverse #"2."

View File

@ -6,8 +6,11 @@ HEADER = \bookpart {
\header { \header {
title = "Chorsatz" title = "Chorsatz"
alttitle = "" alttitle = ""
composerId = "dude" authors = #'(
songId = "a-song-id" ("dude" melody text)
("kumpel" composition))
year_text = ""
year_melody = ""
categories = "" categories = ""
songinfo = "" songinfo = ""
} }

View File

@ -15,11 +15,13 @@ songPath = "../../lieder"
%Liedteil -> hier werden alle Lieder inkludiert %Liedteil -> hier werden alle Lieder inkludiert
%Reihenfolge im Liederbuch: Von oben nach unten %Reihenfolge im Liederbuch: Von oben nach unten
\includeSong "sandbox"
\includeSong "vorlage" \includeSong "vorlage"
\blankpage \blankpage
\includeSong "vorlage_light" \includeSong "vorlage_light"
\imagepage #125 "see.eps" \imagepage #125 "see.eps"
\includeSong "vorlage_satz" \includeSong "vorlage_satz"
%}
%Zur Übersichtlichkeit: %Zur Übersichtlichkeit:
%A %A
%B %B
@ -94,6 +96,16 @@ songPath = "../../lieder"
% die Liederausgabe % die Liederausgabe
\songs \songs
%Kategorienverzeichnis
\bookpart {
\markuplist {
\index-in-columns-with-title #'categories \column {
\fontsize #5 \sans \bold \fill-line { \null "Inhaltsverzeichnis nach Kategorien" \null }
\vspace #1
}
}
}
% Inhaltsverzeichnis % Inhaltsverzeichnis
\bookpart { \bookpart {
\indexSection #"A" \markup { "A" } \indexSection #"A" \markup { "A" }
@ -136,14 +148,4 @@ songPath = "../../lieder"
} }
} }
} }
\bookpart {
\markuplist {
\index-in-columns-with-title #'categories \column {
\fontsize #5 \sans \bold \fill-line { \null "Inhaltsverzeichnis nach Kategorien" \null }
\vspace #1
}
}
}
} }

@ -1 +1 @@
Subproject commit c26fddd9632d3d770da602f2e9fe480cf4cd9df3 Subproject commit 88f0dc9f8fee1cd3f7152cd7e56798bb97699ee0

View File

@ -1,9 +1,8 @@
#(ly:set-option 'relative-includes #t) #(ly:set-option 'relative-includes #t)
defaultSongStyle = #'börnel
customStyleOverridesFile = "../lilypond-custom-includes/custom_style_overrides.ly" customStyleOverridesFile = "../lilypond-custom-includes/custom_style_overrides.ly"
\include "categories.ly" \include "categories.ly"
\include "../lilypond-common-includes/general_include.ly" \include "../lilypond-common-includes/general_include.ly"
AUTHOR_DATA = #(call-with-input-file "../../data/authors.json" json->scm) AUTHOR_DATA = #(resolve-inherits (call-with-input-file "../../lilypond-song-includes/data/authors.json" json->scm))
SONG_DATA = #(call-with-input-file "../../data/songs.json" json->scm) SONG_DATA = #(resolve-inherits (call-with-input-file "../../lilypond-song-includes/data/songs.json" json->scm))

View File

@ -2,3 +2,4 @@ customChordPrintings = {
<h dis' fis' e''>-\markup { \small "add11" } <h dis' fis' e''>-\markup { \small "add11" }
<a cis' gis' h'>-\markup { \small "maj9" } <a cis' gis' h'>-\markup { \small "maj9" }
} }
songFormatAndSize = "a4"

View File

@ -10,5 +10,13 @@
"trail_name": "dudekumpel", "trail_name": "dudekumpel",
"death_year": "2050", "death_year": "2050",
"organization": "Bund der krassen Kumpels" "organization": "Bund der krassen Kumpels"
},
"nocheiner": {
"name": "Jemand anderes",
"death_year": "2050"
},
"kumpelerbe": {
"inherits": "kumpel",
"organization": "Bund der crazy Kumpels"
} }
} }

View File

@ -0,0 +1,175 @@
\version "2.25.8"
\include "../../lilypond-common-includes/snippet_include.ly"
basicSongInfo = \header {
title = "Liedtitel"
alttitle = "Alternativtitel"
authors = #'(
("kumpel" melody)
("dude" text composition))
infotext = "
Also zu der Sandbox gibts echt verdammt viel zu sagen, aber wär zu krass das hier alles reinzuschreiben. Zum Testen muss hier aber mal viel stehen, damit man das mit dem automatischen Zeilenumbruch gut sieht und das mit den Abständen gut debuggen kann.
Sogar manuelle Zeilenumbrüche gehen hier."
copyright = "Fumpeverlag"
translation = "sandkasten"
pronunciation = "wie mans spricht halt"
year_text = "2023"
year_melody = "2012"
}
global = {
%Takt
\time 4/4
%Tonart
\key c \major
}
firstVerse = \lyricmode {
\ref
Hier \repeat unfold 6 { _ } ist der Text für Stro -- phe eins. \set ignoreMelismata = ##t \unset ignoreMelismata % Bindebögen irgnorieren
}
secondVerse = \lyricmode {
#(stanza 2)
Mit _ ü -- ber -- springt man No -- ten. \markup { \bold { fett! krass } }
"Mehrere Silben" auf ei -- ne No -- te. Me -- lis -- ma -- \set ignoreMelismata = ##t ta aus \unset ignoreMelismata und wieder an
}
firstVoice = \relative c' {
\global
%\clef "bass" % Bassschlüssel
\partial 4 % Auftakt
a'4 % mit ' und , oktaviert man
\repeat volta 2 { % Wiederholung
d,4 e fis g
a8 a (a) a d,4~d % Bindebögen
<< { \voiceTwo
g4. c,8 c4 d
}
\new Voice { \voiceOne \secondVoiceStyle
g4. g8 g4 f
}
>> \oneVoice
}
\alternative { %Klammer eins und zwei
{e2. a4}
{e2. r4}
}
e1
e1
e2^\markup \bold "I. hier einsetzen!" (f)
e1 \mark \markup { \italic { fine } }
a1_\markup { \italic Zwischenspiel } a1
\once \override Score.TimeSignature.stencil = ##f \time 2/4 %unsichtbarer Taktwechsel (ansonsten nur \time macht sichtbaren Taktwechsel)
a2 <a c>2
r2 \once \override Score.RehearsalMark.break-visibility = #end-of-line-visible
\once \override Score.RehearsalMark.self-alignment-X = #RIGHT
\mark "D.C. al Fine"
\bar "|."
}
bridge = \relative c' {
\global
\time 3/4
a4 h c a h c
}
bridgeVerse = \lyricmode {
\set stanza = "Bridge:"
Das hier ist ei -- ne Bridge
}
verseChords = \chordmode {
s4 d2 h:m fis:m b g1 \klamm{a2. d4} c1/h
e \once \set chordChanges = ##f e %gleichbl. Akkord sichtbar machen
h:1.3.5.11
}
songChords = \chords { \verseChords }
bridgeChords = \chords { a2:m a:m a:m a:m }
thirdVerseMarkup =
"Test (Akk,a:m)orde (ü,a:1.3.7+.9)ber den (Stro,d:m)phen (test)
\\repStart sind (sup,e)er \\underline {(cpjl,a:m)} \\repStop
und (sie,a:m) sind (jetzt,\\klamm{d:m}) auch (klam,\\klamm { d })mer(bar,\\klamm g)
\\italic { hier i(s,fis)t mal was (kur,d:m)siv } das k(lLA,g:m)pt (je,a)tzt"
fourthVerseMarkup =
"Hier ist leider nicht genug (Platz,g)
für (Akk,a:m)orde über den (Stro,d:m)phen
\\repStart deswegen \\concat{ \\underline { wer } den } die hier mittels \\bold { nochordverse } automatisch
entfernt! \\repStop"
fifthVerseMarkup =
"Hier geht die 5. Strophe los, die zusammen mit der 6. und 7. auf
eine Seite soll"
sixthVerseMarkup =
"Strophen in einer \\concat{\\char ##x5C group-verses} Umgebung werden aneinander
ausgerichtet und auf der Seite zentriert.
Man beachte auch wie widerlich der Backslash
vor group-verses eingegeben werden muss!
Falls ihr mal runde (Klammern) braucht: \\concat{\\char ##x28 Klammer} auf und Klammer \\concat{zu \\char ##x29 }"
seventhVerseMarkup =
"Wir achten bitte auch auf typografisch korrekte Zeichen.
Ein deutsches Apostroph sieht so aus und nicht so '
Ein Gedankenstrich, wie er auch zur Trennung von Jahreszahlen
genutzt wird ist so und nicht so -
Anführungszeichen sind so „ und so “"
columnVerseMarkup =
"Stro(phen,a:m) können jetzt auch in (Spal,f)ten!
Voll (krass,e) (eh,a:m)!"
BRIDGE =
{
<<
\bridgeChords
\new Voice { \bridge }
\addlyrics { \bridgeVerse }
>>
}
bridgeverse = \markup {
\score {
\inline-score
\BRIDGE
\layout { \generalLayout }
}
}
MUSIC =
{
<<
\songChords
\new ChoirStaff = "firstStaff"
<<
\new Voice = "firstVoice" { \firstVoice }
\addlyrics { \firstVerse }
\addlyrics { \secondVerse }
>>
>>
}
TEXT = \markuplist
{
\group-verses {
\chordverse #(stanza 3) \thirdVerseMarkup
\chordverse #(stanza 4) \fourthVerseMarkup
\chordverse #(stanza 5) \fifthVerseMarkup
}
\group-verses {
\chordverse #(stanza 6) \sixthVerseMarkup
\chordverse #(stanza 7) \seventhVerseMarkup
\chordverse #(stanza 8) \columnVerseMarkup
\bridgeverse
}
}
\include "../../lilypond-common-includes/default_output.ly"

988
snippets_20240110_DE.xml Normal file
View File

@ -0,0 +1,988 @@
<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>