X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fgenerating-random-notes.ly;h=a21dce761228828ef72bbaf7ff69805301a6975f;hb=c6abab57aae2a0114cec864c95213be6d874aa6a;hp=12052ea4beb19314e10795f2f6046a8b7345bced;hpb=f2fbf0dd215c8af6a30aae6c9634f3b92333b0ab;p=lilypond.git diff --git a/Documentation/snippets/generating-random-notes.ly b/Documentation/snippets/generating-random-notes.ly index 12052ea4be..a21dce7612 100644 --- a/Documentation/snippets/generating-random-notes.ly +++ b/Documentation/snippets/generating-random-notes.ly @@ -1,12 +1,15 @@ -%% Do not edit this file; it is automatically +%% 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.12.2" +\version "2.15.25" \header { lsrtags = "pitches" -%% Translation of GIT committish: fa19277d20f8ab0397c560eb0e7b814bd804ecec +%% Translation of GIT committish: 6977ddc9a3b63ea810eaecb864269c7d847ccf98 texidoces = " Este fragmento de código basado en Scheme genera 24 notas aleatorias (o tantas como se necesiten), basándose en la @@ -30,9 +33,8 @@ get different random note patterns, just change this number. \score { { - #(let ((random-state (seed->random-state (current-time)))) - (ly:export - (make-sequential-music + $(let ((random-state (seed->random-state (current-time)))) + (make-sequential-music (map (lambda (x) (let ((idx (random 12 random-state))) (make-event-chord @@ -43,6 +45,6 @@ get different random note patterns, just change this number. (quotient idx 7) (remainder idx 7) 0)))))) - (make-list 24))))) + (make-list 24)))) } }