X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fcreating-a-sequence-of-notes-on-various-pitches.ly;h=2193220390f5eabe015bd99e6eaea70cfee34e30;hb=1488d5b9c8b56595eb93ef5c0532c5f61cd6354d;hp=07e793e7bfe6d1050f45d6fc4d8296575cd418f3;hpb=2055f35c47a045a50a01ff4dba8524322cfc3b48;p=lilypond.git diff --git a/Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly b/Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly index 07e793e7bf..2193220390 100644 --- a/Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly +++ b/Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly @@ -1,15 +1,14 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.14.0" +% 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: 59caa3adce63114ca7972d18f95d4aadc528ec3d +%% Translation of GIT committish: 6977ddc9a3b63ea810eaecb864269c7d847ccf98 texidoces = " En una música que tenga muchas apariciones de la misma secuencia de notas a distintas alturas, podría ser de @@ -23,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. @@ -34,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