X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Flsr%2Fcreating-a-sequence-of-notes-on-various-pitches.ly;h=acaae74b0a697a417cbe344d38e65bc6fcabe4e9;hb=5b2bdf8c532aa1b4aa8626f6847938f2ef4ba1be;hp=7f5a1edf553d1972a0263ef487c11168f7ab7b4c;hpb=adfdbf4765643e9e12256634d655382fc7966f36;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 7f5a1edf55..acaae74b0a 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,10 +1,23 @@ %% 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.50" +\version "2.12.0" \header { lsrtags = "pitches" + texidoces = " +En una música que tenga muchas apariciones de la +misma secuencia de notas a distintas alturas, podría ser de +utilidad la siguiente función musical. Admite una nota, de la que +sólo se utiliza su altura. Las funciones de apoyo en Scheme se +han tomado prestadas del documento de \"Consejos y trucos\" de la +versión 2.10 del manual. Este ejemplo crea las duraciones +rítmicas que se usan a todo lo largo de «Marte», de «Los Planetas» +de Gustav Holst. + +" + doctitlees = "Crear una secuencia de notas a distintas alturas" + texidoc = " In music that contains many occurrences of the same sequence of notes at different pitches, the following music function may prove useful. @@ -16,6 +29,7 @@ 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 @@ -36,29 +50,28 @@ throughout Mars, from Gustav Holst's The Planets. '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))) + (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)) + )))) -\score { - \new Staff { - \time 5/4 - \rhythm c' - \rhythm c'' - \rhythm g - } +\new Staff { + \time 5/4 + \rhythm c' + \rhythm c'' + \rhythm g }