lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help to install sensible transposing LSR


From: Mats Bengtsson
Subject: Re: Help to install sensible transposing LSR
Date: Tue, 08 Aug 2006 10:03:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417

I am not sure that I understand your question (actually, I'm not sure if you
understand it completely either).

First of all, LSR, the LilyPond Snippet Repository, is just a collection of
example files, so there's really nothing you can "install". Rather, you can
copy ideas and maybe lines of code from these examples.

Also, many of the examples in LSR are also available in the on-line
documentation for LilyPond, in the "Tips and Tricks" document. The
advantage of looking there instead of in LSR is that you can be more
sure that the examples in Tips and Tricks are up-to-date, if you just
look into the on-line documentation corresponding to your version
of LilyPond.

My guess is that you are asking about the example called "smart-transpose"
in the Tips and Tricks document. This example contains some code written
in the Scheme programming language, which defines a new function
which replaces double sharps/flats with an enharmonicly equivalent pitch
with fewer accidentals. For this particular example, I actually recommend you
to forget what I just wrote about LilyPond versions. This example has been
modified and simplified in the Tips and Tricks document for LilyPond 2.9:
http://lilypond.org/doc/v2.9/input/test/collated-files.html
but should still work well with your version.

So, how can you exploit this example file yourself? There are two main options:

1. Just copy all the lines from
#(define (naturalise-pitch p)
down to
 music))

and paste them at the top of your own .ly file.
Then, if your current \score{...} contains a section of music
such as
{cisis fisis gis}
or
\transpose c cis \mymusic
that you want to modify enharmonically, then just add a
\naturaliseMusic{...} around it, for example:
\naturaliseMusic{cisis fisis gis}
or
\naturaliseMusic{\transpose c cis \mymusic}

2. If you want to use the same feature in several different .ly files, then
it's silly to paste the same lines of code into all of the files. Instead you
 can make a separate file, for example called "globaldefinitions.ly", where
 you paste the lines you copied from smart-transpose. Then, at the top of
 each .ly file, where you want to use this feature, add
\include "globaldefinitions.ly"
 Then, you can use \naturaliseMusic, just as I described earlier. See
http://lilypond.org/doc/v2.9/Documentation/user/lilypond/Style-sheets.html#Style-sheets
 for more information.

  /Mats


alanvw wrote:

Win XP Version 2.8.5

I am trying to naturalise the pitch by reducing the number of accidentals using the LSR. Could someone tell me how to install this LSR? (I am not a programmer).

Thanks in advance

Vincent Albury-Ward


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.10.7/411 - Release Date: 7/08/2006

------------------------------------------------------------------------

_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]