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