X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fgenerating-random-notes.ly;h=5a840facc307700bb6539053c1a101a0d980f961;hb=ac1f5ee6bc66e39e4fec27434ebb7c7300bab71e;hp=983823ba4a2ad50ee5beec33d776500c0e274dfa;hpb=d7a465a71d44e4710602cfe618edddddd437872a;p=lilypond.git diff --git a/Documentation/snippets/generating-random-notes.ly b/Documentation/snippets/generating-random-notes.ly index 983823ba4a..5a840facc3 100644 --- a/Documentation/snippets/generating-random-notes.ly +++ b/Documentation/snippets/generating-random-notes.ly @@ -4,12 +4,12 @@ %% and then run scripts/auxiliar/makelsr.py %% %% This file is in the public domain. -\version "2.12.2" +\version "2.15.32" \header { - lsrtags = "pitches" + lsrtags = "really-cool, pitches, scheme-language" -%% Translation of GIT committish: 91eeed36c877fe625d957437d22081721c8c6345 +%% Translation of GIT committish: b482c3e5b56c3841a88d957e0ca12964bd3e64fa texidoces = " Este fragmento de código basado en Scheme genera 24 notas aleatorias (o tantas como se necesiten), basándose en la @@ -31,11 +31,11 @@ get different random note patterns, just change this number. doctitle = "Generating random notes" } % begin verbatim + \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 @@ -46,6 +46,6 @@ get different random note patterns, just change this number. (quotient idx 7) (remainder idx 7) 0)))))) - (make-list 24))))) + (make-list 24)))) } }