X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fcreating-a-sequence-of-notes-on-various-pitches.ly;h=837c03d30d7d9c9b9088ac728701b568e9327ef9;hb=1b29d0ce3e3143bdc26504917578dc3f8b07e861;hp=c1ee07cb0d0c0b8f96249d6c4bdc6f3beb1fdc9d;hpb=33fd36cc8b74a2a0e80e43a8dc9dbfcb7d1f7df1;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 c1ee07cb0d..837c03d30d 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,27 +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.19.22 +\version "2.19.22" \header { - lsrtags = "pitches" - -%% Translation of GIT committish: 615cbf212fdaf0b220b3330da417d0c3602494f2 - 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" + lsrtags = "pitches, real-music, really-cool, scheme-language" texidoc = " In music that contains many occurrences of the same sequence of notes @@ -34,39 +21,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 (p) (ly:pitch?) + "Make the rhythm in Mars (the Planets) at the given pitch" + #{ \tuplet 3/2 { $p 8 8 8 } 4 4 8 8 4 #}) \new Staff { \time 5/4