documentation for \displayLilyMusic?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

documentation for \displayLilyMusic?

Nicolas Sceaux
Hi Graham,

I don't know where I may put some doc about \displayLilyMusic in the
manual. It's not an interface for programmers, so could not really fit
where \displayMusic is described.
Here is what is about to be added in NEWS.tely:

@item
Music expressions can be displayed, in LilyPond notation, using the
new @code{\displayLilyMusic} function. For instance:

@verbatim
\displayLilyMusic \transpose c a, { c d e f }
@end verbatim

will print:

@verbatim
{ a, b, cis d }
@end verbatim

nicolas


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: documentation for \displayLilyMusic?

Graham Percival

On 24-Jul-05, at 3:14 AM, Nicolas Sceaux wrote:
> I don't know where I may put some doc about \displayLilyMusic in the
> manual. It's not an interface for programmers, so could not really fit
> where \displayMusic is described.

Interesting question!

The first place I considered was 6.2 Alternate music entry, but it
doesn't fit
all that well -- and I don't really consider \displayLilyMusic as
useful for
beginners.

Who would use this in Real Life?  The only thing I can think of is a
composer
(or copyist) who wants to untranspose music (I can't imagine why
anybody would
want to un-relative some music).  Either they've been playing around
with
different keys, or they were dealing with a transposing instrument.
Assuming that's the only use, I suppose that it could go in 8.2
Preparing parts.

...

Actually, right now I'm leaning towards 11 Interfaces for programers.  
I realize
that this isn't intended for programmers, but I think that making a
section after
the \displayMusic section is the best bet.  In the \transpose and
\relative sections
we'll stick links to this new section (and include it in the index), so
it should be
easy enough to find.

Cheers,
- Graham



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: documentation for \displayLilyMusic?

Nicolas Sceaux
Graham Percival <[hidden email]> writes:

> Actually, right now I'm leaning towards 11 Interfaces for programers.
> I realize
> that this isn't intended for programmers, but I think that making a
> section after
> the \displayMusic section is the best bet.  In the \transpose and
> \relative sections
> we'll stick links to this new section (and include it in the index),
> so it should be
> easy enough to find.

Ok that's fine with me. I'll try to post something before my vacations.

nicolas


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: documentation for \displayLilyMusic?

Graham Percival
In reply to this post by Graham Percival

On 27-Jul-05, at 4:30 PM, Cameron Horsburgh wrote:
> I'm not subscribed to lilypond-developer, so you might like to forward
> this as appropriate.

You can send stuff to lilypond-devel as a non-member; we CC emails to
individuals, so you can also take part in the discussion.

> I would find the \displayLilyMusic useful as an external utility. Most
> of my serious typesetting involves transposing instruments, and I
> frequently need to have subtle differences between different
> instruments playing similar parts. For example, a trumpet and a horn
> may have essentially the same harmony line, but one instrument may
> have to change octave part way through, depending on how I have scored
> the piece. Or there may be some instrument specific instructions that
> need to be added on one part. This is very difficult to do without
> manually typing each part separately.

You can get around this problem by using \transpose, \transposition,
and copying.
(not that \displayLilyMusic isn't useful; see below)

> I can imagine people writing graphical front ends to lilypond would
> find an 'unrelativize' utility useful as well, especially if they are
> trying to import Lilypond code.

This isn't my area; anybody want to comment on this?

> I'm envisaging a command line utility that takes various arguments
> depending on what is needed. Let's call the utility
> 'convertylilymusic'
>
> A command like
>
> convertylilymusic --transpose bes f, --keeprelative --output horn.ly
> trumpet.ly
>
> would change the trumpet part into a transposed horn part called
> horn.ly. I would then go through, make a few instrument specific
> tweaks and be ready to go!

You can do this already -- suppose you write your Bb trumpet part in Bb
(instead of
in C).  You can copy those lines, but add a
\transpose bes c { blah blah }
around it all.  Then you can add _another_
\transpose c f { blah blah }
around the whole thing to get your horn part.

See this thread about using two (or more) transpose commands:
http://lists.gnu.org/archive/html/lilypond-user/2005-02/msg00124.html
(if you already know about this, then sorry for going over old material)


Where \displayLilyMusic is useful is that you could get some
untransposed
code.  ie instead of always using
\transpose bes c { blah blah }
you could do this:
\displayLilyMusic \transpose bes c { blah blah }

Then in the future you can deal with that material written in C.

> I'm presuming most of the code exists to do this sort of thing. What
> would be needed to wrap it up into a the sort of utility I'm
> envisaging?

If you're willing to edit your input file a few times (once to add the
\display function,
then again to remove it and replace the original \transpose line), then
it already
exists.

If you want an actual separate command-line utility, then... well, I'm
not the person
to ask about it.  Somebody else can comment on that.

Cheers,
- Graham



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: documentation for \displayLilyMusic?

Mats Bengtsson-6


Graham Percival wrote:

>
> On 27-Jul-05, at 4:30 PM, Cameron Horsburgh wrote:
>
>> I'm not subscribed to lilypond-developer, so you might like to forward
>> this as appropriate.
>
>
> You can send stuff to lilypond-devel as a non-member; we CC emails to
> individuals, so you can also take part in the discussion.
>
>> I would find the \displayLilyMusic useful as an external utility. Most
>> of my serious typesetting involves transposing instruments, and I
>> frequently need to have subtle differences between different
>> instruments playing similar parts. For example, a trumpet and a horn
>> may have essentially the same harmony line, but one instrument may
>> have to change octave part way through, depending on how I have scored
>> the piece. Or there may be some instrument specific instructions that
>> need to be added on one part. This is very difficult to do without
>> manually typing each part separately.
>
>
> You can get around this problem by using \transpose, \transposition, and
> copying.
> (not that \displayLilyMusic isn't useful; see below)

Also, read "8.2.8 Different editions from one source" in the manual.

    /Mats


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

displayLilyMusic tests

Han-Wen Nienhuys
In reply to this post by Nicolas Sceaux

hi Nicolas,

Nicolas Sceaux wrote:
>
> Ok that's fine with me. I'll try to post something before my vacations.
>

Could you have a look at the displayLilyMusic regtest file?  I think it
should not be part of the regression/ test suite, but rather in
no-notation/ as it doesn't excercise the notation, but rather  the input
     part.
--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: displayLilyMusic tests

Nicolas Sceaux
Han-Wen Nienhuys <[hidden email]> writes:

> Could you have a look at the displayLilyMusic regtest file?  I think
> it should not be part of the regression/ test suite, but rather in
> no-notation/ as it doesn't excercise the notation, but rather  the
> input    part.

Right.
The test file has been fixed and moved to input/no-notation/.

nicolas


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: displayLilyMusic tests

Han-Wen Nienhuys
Nicolas Sceaux wrote:

> Han-Wen Nienhuys <[hidden email]> writes:
>
>
>>Could you have a look at the displayLilyMusic regtest file?  I think
>>it should not be part of the regression/ test suite, but rather in
>>no-notation/ as it doesn't excercise the notation, but rather  the
>>input    part.
>
>
> Right.
> The test file has been fixed and moved to input/no-notation/.

OK. I'm still confused why display-init must be called first. If it's
unavoidable, then we should call it from init.ly, and not burden the
user with it

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: displayLilyMusic tests

Nicolas Sceaux
Han-Wen Nienhuys <[hidden email]> writes:

> Nicolas Sceaux wrote:
>> Han-Wen Nienhuys <[hidden email]> writes:
>>
>>>Could you have a look at the displayLilyMusic regtest file?  I think
>>>it should not be part of the regression/ test suite, but rather in
>>>no-notation/ as it doesn't excercise the notation, but rather  the
>>>input    part.
>> Right.
>> The test file has been fixed and moved to input/no-notation/.
>
> OK. I'm still confused why display-init must be called first. If it's
> unavoidable, then we should call it from init.ly, and not burden the
> user with it

The Joe LilyPond user, who only wants to call the music function
\displayLilyMusic, does not have to call the init function -- the music
function takes care of that.

The advanced user, who wants to call the scheme function
display-lily-music, will have to make the init first, in case an other
language file has been loaded, say, italiano.ly: the purpose of the
init function is to set the note names.

Hm... Excuse me for the trouble, I'm changing the way note names are
retrieved, so that it should not require an init stage.

nicolas


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel