[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generating random notes
From: |
David Kastrup |
Subject: |
Re: Generating random notes |
Date: |
Mon, 13 Jan 2014 12:06:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Philip Rhoades <address@hidden> writes:
> People,
>
> I am doing my own Alternative Notation for Classical Guitar and with a
> lot of help from Paul Morris am making good progress. I was about to
> write a little Ruby script to generate random notes (400 == 100 bars)
> within different ranges to practise jumping around the fretboard but
> it occurred to me that I might be able to do this in Scheme - which
> would help further the cause of learning for Lilypond. Is this a
> sensible thing to do or should I just do it with ruby and plug the
> results into a .ly file?
A bit sloppy:
\new Voice {
$@(let ((notes (ly:music-property #{ <c des d es e f fis g gis a bes b> #}
'elements)))
(map (lambda (x) (list-ref notes (random (length notes)))) (iota 400)))
}
--
David Kastrup