that is cool! :D i've been using lilypond for 10 years and it sometimes still surprises me at how powerful it is... ;)
On Sun, Oct 13, 2013 at 3:17 PM, Phil Holmes <[email protected]> wrote: > ----- Original Message ----- From: "Thomas Morley" > <[email protected]> > To: "David Kastrup" <[email protected]> > Cc: "lilypond-user" <[email protected]> > Sent: Saturday, October 12, 2013 2:29 PM > Subject: Re: Piano/Xylophone key diagrams > > >> 2013/10/12 David Kastrup <[email protected]>: >>> >>> "Phil Holmes" <[email protected]> writes: >>> >>>> At college, one of my ensembles is a mixed-music group performing >>>> modern music. I normally get away with singing or "playing" a >>>> triangle and bits of other untuned percussion. Imagine my surprised >>>> when I was given a xylophone piece to play. Fortunately, it's only >>>> one note at a time, and most of them are the same note, repeated for >>>> four bars, so I generally have the time to work out where the next key >>>> is when I'm playing the current one. However, I thought it might be >>>> interesting and vaguely useful to have some piano key diagrams which >>>> show which key is to be played, rather like the fingering diagrams. >>>> The attached image illustrates the kind of thing: playing D#. >>>> >>>> I know I could use box, rounded-box or filled-box, or moveto/lineto >>>> commands to draw the boxes, so I clearly could create the diagrams >>>> individually for each note. However, I thought it would be better to >>>> create a function to do this. I'd presume the location of each box >>>> would be in some sort of array/list, and that the function would use >>>> the 'pitch of the note to determine which to fill. However, I've read >>>> our documentation on scheme and am stuck on how to start, either >>>> creating the array/list and iterating over it to draw boxes, or >>>> grabbing the pitch value of a note. >>>> >>>> Could anyone start me off on this and help when I get stuck again? >>> >>> >>> Starting off would be on >>> <URL:http://code.google.com/p/lilypond/issues/detail?id=3563#c4>. Check >>> its output. This is basically what you need, except that you need to >>> replace the C-Griff function which uses filled and non-filled circles in >>> a three-row arrangement with a more tedious rectangular arrangement. >>> >>> The c-griff function here only does the formatting and would need to be >>> completely replaced. In contrast, the stuff in define-scheme-function >>> could be kept unchanged. >> >> >> Or maybe >> http://lsr.dsi.unimi.it/LSR/Item?id=791 >> might give some inspiration. >> >> Cheers, >> Harm > > > Thanks to David and Harm for their suggestions. For now I've gone with > adapting what Harm suggested - I've tidied the code a little and added a > scaling parameter that varies the width of the keys and the size of the dot. > Example output is attached, together with the file used to create this. > > -- > Phil Holmes > _______________________________________________ > lilypond-user mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- Do not meddle in the affairs of trombonists, for they are subtle and quick to anger. _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
