]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly
Doc: run makelsr locally
[lilypond.git] / Documentation / snippets / creating-a-sequence-of-notes-on-various-pitches.ly
index eceb14919a8f4f39b7c3b828f9b9151bfb597661..634c8cac043a2924b1ccdb3ce5115b7b3d56f4d1 100644 (file)
@@ -1,12 +1,14 @@
-%% Do not edit this file; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.13.4"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.15.27
+\version "2.15.27"
 
 \header {
-  lsrtags = "pitches"
-
-%% Translation of GIT committish: b2d4318d6c53df8469dfa4da09b27c15a374d0ca
+%% Translation of GIT committish: b482c3e5b56c3841a88d957e0ca12964bd3e64fa
   texidoces = "
 En una música que tenga muchas apariciones de la
 misma secuencia de notas a distintas alturas, podría ser de
@@ -20,6 +22,8 @@ de Gustav Holst.
 "
   doctitlees = "Crear una secuencia de notas a distintas alturas"
 
+  lsrtags = "pitches"
+
   texidoc = "
 In music that contains many occurrences of the same sequence of notes
 at different pitches, the following music function may prove useful.
@@ -31,39 +35,11 @@ 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))
-
-#(define (make-note p d)
-   (make-music 'EventChord
-              'elements (list (make-note-req p d))))
-
-#(define (make-triplet 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)))
-     (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))))))
+#(define-music-function (parser location p) (ly:pitch?)
+   "Make the rhythm in Mars (the Planets) at the given pitch"
+  #{ \times 2/3 { $p 8 $p $p } $p 4 $p $p 8 $p $p 4 #})
 
 \new Staff {
   \time 5/4