Guide, node Updating translation committishes..
@end ignore
-@c \version "2.16.0"
+@c \version "2.19.22"
-@node Scheme-Übung
-@chapter Scheme-Übung
+@node Scheme-Tutorium
+@chapter Scheme-Tutorium
@translationof Scheme tutorial
Die Eingabe von LilyPond ist in Zeichen und Ausdrücke gegliedert, so etwa
wie die menschliche Sprache sich in Wörter und Sätze gliedert. LilyPond
hat einen Lexer, der Zeichen erkennt (Zahlen, Zeichenketten, Scheme-Elemente,
-Tonhöhen usw.) und einen Parser, der die Syntax versteht, @ruser{LilyPond grammar}.
+Tonhöhen usw.) und einen Parser, der die Syntax versteht,
+@rcontribnamed{LilyPond grammar, LilyPond-Grammatik}.
Wenn dann eine bestimmte Syntaxregel als zuständig erkannt wurde, werden die
damit verknüpften Aktionen ausgeführt.
wird intern in die Scheme-Definition
@example
-(define traLaLa @var{Scheme-Wert von `@code{... }'})
+(define traLaLa @var{Scheme-Wert von `... '})
@end example
@noindent
LilyPond-Syntax hierfür ist:
@example
-\override Stem #'thickness = #2.6
+\override Stem.thickness = #2.6
@end example
Diese Anweisung verändert die Erscheinung der Notenhälse. Der Alist-Eintrag
Y-Koordinate.
@example
-\override TextScript #'extra-offset = #'(1 . 2)
+\override TextScript.extra-offset = #'(1 . 2)
@end example
Hierdurch wird das Paar @code{(1 . 2)} mit der Eigenschaft @code{extra-offset}
@cindex Musikausdrücke anzeigen
@cindex Anzeigen von Musikausdrücken
-@funindex displayMusic
@funindex \displayMusic
Wenn man eine musikalische Funktion erstellt, ist es oft
'text
"f"))
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 0 0))))
@end example
(make-music 'AbsoluteDynamicEvent
'text
"f"))
- 'duration (ly:make-duration 2 0 1 1)
+ 'duration (ly:make-duration 2 0 1/1)
'pitch (ly:make-pitch 0 0 0))))
@end example
(make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 0 0))
@end example
(list (make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 0 0))))
@end example
(make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 0 0))
@end example
@code{'pitch}-Eigenschaft umdefiniert:
@funindex \displayLilyMusic
-@funindex displayLilyMusic
@example
#(set! (ly:music-property (first (ly:music-property someNote 'elements))
'span-direction
-1))
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 5 0))
(make-music
'span-direction
1))
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 5 0))))
@end example
(make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch 0 5 0))))
@end example
Element vor die @code{articulations}-Eigenschaft gesetzt wird.
@example
-doubleSlur = #(define-music-function (parser location note) (ly:music?)
+doubleSlur = #(define-music-function (note) (ly:music?)
"Return: @{ note ( note ) @}.
`note' is supposed to be a single note."
(let ((note2 (ly:music-deep-copy note)))
Am einfachsten können Artikulationszeichen zu Noten
hinzugefügt werden, indem man zwei musikalische Funktionen
in einen Kontext einfügt, wie erklärt in
-@ruser{Kontexte erstellen}. Hier soll jetzt eine musikalische
+@ruser{Kontexte erstellen und referenzieren}. Hier soll jetzt eine musikalische
Funktion entwickelt werden, die das vornimmt. Daraus ergibt sich
der zusätzliche Vorteil, dass diese musikalische Funktion eingesetzt
werden kann, um eine Artikulation (wie etwa eine Fingersatzanweisung)
(make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch -1 0 0))))
=====
'articulation-type
"accent"))
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch -1 0 0))
\displayMusic c4
(list (make-music
'NoteEvent
'duration
- (ly:make-duration 2 0 1 1)
+ (ly:make-duration 2 0 1/1)
'pitch
(ly:make-pitch -1 0 0))))
@end example
eine Deklaration des Typs ihres einzigen @qq{wirklichen} Arguments:
@example
-addAccent = #(define-music-function (parser location note-event)
+addAccent = #(define-music-function (note-event)
(ly:music?)
"Add an accent ArticulationEvent to the articulations of `note-event',
which is supposed to be a NoteEvent expression."
Wir haben gesehen wie LilyPond-Eingabe massiv beeinflusst
werden kann, indem Befehle wie etwa
-@code{\override TextScript #'extra-offset = ( 1 . -1)}
+@code{\override TextScript.extra-offset = ( 1 . -1)}
benutzt werden. Aber es wurde gezeigt, dass Scheme noch
-mächtiger ist. Eine bessere Erklärung findet sich in der@ref{Scheme-Übung} und in
+mächtiger ist. Eine bessere Erklärung findet sich in der@ref{Scheme-Tutorium} und in
@ruser{Schnittstellen für Programmierer}.
Scheme kann auch in einfachen @code{\override}-Befehlen
@lilypond[quote,verbatim,ragged-right]
-padText = #(define-music-function (parser location padding) (number?)
+padText = #(define-music-function (padding) (number?)
#{
- \once \override TextScript #'padding = #padding
+ \once \override TextScript.padding = #padding
#})
-\relative c''' {
- c4^"piu mosso" b a b
+\relative {
+ c'''4^"piu mosso" b a b
\padText #1.8
c4^"piu mosso" d e f
\padText #2.6
@c It is - 'padding still works
@lilypond[quote,verbatim,ragged-right]
-tempoPadded = #(define-music-function (parser location padding tempotext)
+tempoPadded = #(define-music-function (padding tempotext)
(number? markup?)
#{
- \once \override Score.MetronomeMark #'padding = #padding
+ \once \override Score.MetronomeMark.padding = #padding
\tempo \markup { \bold #tempotext }
#})
-\relative c'' {
+\relative {
\tempo \markup { "Low tempo" }
- c4 d e f g1
+ c''4 d e f g1
\tempoPadded #4.0 "High tempo"
g4 f e d c1
}
Sogar ganze Musikausdrücke können eingefügt werden:
@lilypond[quote,verbatim,ragged-right]
-pattern = #(define-music-function (parser location x y) (ly:music? ly:music?)
+pattern = #(define-music-function (x y) (ly:music? ly:music?)
#{
#x e8 a b $y b a e
#})