X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Flsr%2Fcreating-a-sequence-of-notes-on-various-pitches.ly;h=1f624ee0ce218acb2b40534346229d8e79df8e42;hb=a8c9e8a7ca320ab0df5fd32e717fd62cd7635ce6;hp=9ae084f0bd420f8ade12e5a42e0316507198e419;hpb=ee442a6f8b7617abf82da5c7a26a8c99332ac28d;p=lilypond.git diff --git a/input/lsr/creating-a-sequence-of-notes-on-various-pitches.ly b/input/lsr/creating-a-sequence-of-notes-on-various-pitches.ly index 9ae084f0bd..1f624ee0ce 100644 --- a/input/lsr/creating-a-sequence-of-notes-on-various-pitches.ly +++ b/input/lsr/creating-a-sequence-of-notes-on-various-pitches.ly @@ -1,6 +1,6 @@ %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it %% This file is in the public domain. -\version "2.11.55" +\version "2.12.3" \header { lsrtags = "pitches" @@ -29,49 +29,44 @@ throughout Mars, from Gustav Holst's The Planets. " doctitle = "Creating a sequence of notes on various pitches" } % begin verbatim + #(define (make-note-req p d) - (make-music 'NoteEvent - 'duration d - 'pitch p)) + (make-music 'NoteEvent + 'duration d + 'pitch p)) #(define (make-note p d) - (make-music 'EventChord - 'elements (list (make-note-req p d)))) - -#(define (seq-music-list elts) - (make-music 'SequentialMusic - 'elements elts)) + (make-music 'EventChord + 'elements (list (make-note-req p d)))) #(define (make-triplet elt) - (make-music 'TimeScaledMusic - 'denominator 3 - 'numerator 2 - 'element elt)) - + (make-music 'TimeScaledMusic + 'denominator 3 + 'numerator 2 + 'element elt)) -rhythm = #(define-music-function (parser location note) (ly:music?) - "Make the rhythm in Mars (the Planets) at the given note's pitch" - (let* ((p (ly:music-property - (car (ly:music-property note 'elements)) - 'pitch))) - (seq-music-list (list - (make-triplet (seq-music-list (list - (make-note p (ly:make-duration 3 0 2 3)) - (make-note p (ly:make-duration 3 0 2 3)) - (make-note p (ly:make-duration 3 0 2 3)) - ))) - (make-note p (ly:make-duration 2 0)) - (make-note p (ly:make-duration 2 0)) - (make-note p (ly:make-duration 3 0)) - (make-note p (ly:make-duration 3 0)) - (make-note p (ly:make-duration 2 0)) - )))) +rhythm = +#(define-music-function (parser location note) (ly:music?) + "Make the rhythm in Mars (the Planets) at the given note's pitch" + (let ((p (ly:music-property + (car (ly:music-property note 'elements)) + 'pitch))) + (make-sequential-music + (list + (make-triplet (make-sequential-music + (list + (make-note p (ly:make-duration 3 0 2 3)) + (make-note p (ly:make-duration 3 0 2 3)) + (make-note p (ly:make-duration 3 0 2 3))))) + (make-note p (ly:make-duration 2 0)) + (make-note p (ly:make-duration 2 0)) + (make-note p (ly:make-duration 3 0)) + (make-note p (ly:make-duration 3 0)) + (make-note p (ly:make-duration 2 0)))))) -\score { - \new Staff { - \time 5/4 - \rhythm c' - \rhythm c'' - \rhythm g - } +\new Staff { + \time 5/4 + \rhythm c' + \rhythm c'' + \rhythm g }