]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/creating-a-sequence-of-notes-on-various-pitches.ly
Merge branch 'master' into lilypond/translation
[lilypond.git] / Documentation / snippets / creating-a-sequence-of-notes-on-various-pitches.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.15.27
8 \version "2.15.27"
9
10 \header {
11 %% Translation of GIT committish: 6977ddc9a3b63ea810eaecb864269c7d847ccf98
12   texidoces = "
13 En una música que tenga muchas apariciones de la
14 misma secuencia de notas a distintas alturas, podría ser de
15 utilidad la siguiente función musical.  Admite una nota, de la que
16 sólo se utiliza su altura.  Las funciones de apoyo en Scheme se
17 han tomado prestadas del documento de \"Consejos y trucos\" de la
18 versión 2.10 del manual.  Este ejemplo crea las duraciones
19 rítmicas que se usan a todo lo largo de «Marte», de «Los Planetas»
20 de Gustav Holst.
21
22 "
23   doctitlees = "Crear una secuencia de notas a distintas alturas"
24
25   lsrtags = "pitches"
26
27   texidoc = "
28 In music that contains many occurrences of the same sequence of notes
29 at different pitches, the following music function may prove useful.
30 It takes a note, of which only the pitch is used.   This example
31 creates the rhythm used throughout Mars, from Gustav Holst's The
32 Planets.
33
34 "
35   doctitle = "Creating a sequence of notes on various pitches"
36 } % begin verbatim
37
38
39 rhythm =
40 #(define-music-function (parser location p) (ly:pitch?)
41    "Make the rhythm in Mars (the Planets) at the given pitch"
42   #{ \times 2/3 { $p 8 $p $p } $p 4 $p $p 8 $p $p 4 #})
43
44 \new Staff {
45   \time 5/4
46   \rhythm c'
47   \rhythm c''
48   \rhythm g
49 }