1 %% Do not edit this file; it is auto-generated from LSR!
6 In music that contains many occurrences of the same sequence of notes
7 at different pitches, you can use the following music function. It
8 takes a note, of which the pitch is used. The supporting Scheme
9 functions were borrowed from the Tips and Tricks document in the manual.
11 This example creates the rhythm used throughout Mars, from The Planets,
15 #(define (make-note-req p d)
16 (make-music 'NoteEvent
20 #(define (make-note p d)
21 (make-music 'EventChord
22 'elements (list (make-note-req p d))))
24 #(define (seq-music-list elts)
25 (make-music 'SequentialMusic
28 #(define (make-triplet elt)
29 (make-music 'TimeScaledMusic
35 rhythm = #(define-music-function (parser location note) (ly:music?)
36 "Make the rhythm in Mars (the Planets) at the given note's pitch"
37 (let* ((p (ly:music-property
38 (car (ly:music-property note 'elements))
41 (make-triplet (seq-music-list (list
42 (make-note p (ly:make-duration 3 0 2 3))
43 (make-note p (ly:make-duration 3 0 2 3))
44 (make-note p (ly:make-duration 3 0 2 3))
46 (make-note p (ly:make-duration 2 0))
47 (make-note p (ly:make-duration 2 0))
48 (make-note p (ly:make-duration 3 0))
49 (make-note p (ly:make-duration 3 0))
50 (make-note p (ly:make-duration 2 0))