Re: (de)cresendi syntax

2009-04-20 Thread Reinhold Kainhofer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Montag, 20. April 2009 05:31:20 Carl D. Sorensen wrote:
> On 4/17/09 11:02 AM, "Reinhold Kainhofer"  wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Am Freitag, 17. April 2009 schrieb Frédéric Bron:
> >
> > Hmm, no you are right. It seems that when using a music-function, the
> > scheme expression is:
> >
> >   (make-music 'SequentialMusic
> > 'elements
> > (list (make-music 'EventChord
> > 'elements
> > (list (make-music 'NoteEvent
> > 'duration (ly:make-duration 2 0 1 1)
> > 'pitch (ly:make-pitch 0 0 0
> >   (make-music 'CrescendoEvent
> > 'crescendoText "blah.."
> > 'crescendoSpanner 'text
> > 'span-direction -1)))
> >
> > i.e. the CrescendoEvent is outside the EventChord, while with a simple
> > definition like crxxx=#(make-music 'CrescendoEvent ...), it is inside the
> > EventChord:
> >
> >   (make-music 'SequentialMusic
> > 'elements
> > (list (make-music 'EventChord
> > 'elements
> > (list (make-music 'NoteEvent
> > 'duration (ly:make-duration 2 0 1 1)
> > 'pitch (ly:make-pitch 0 0 0))
> >   (make-music 'CrescendoEvent
> > 'crescendoText "cresc."
> > 'crescendoSpanner 'text
> > 'span-direction -1)))
> >
> >
> > Does anyone have an idea how to create a function so that the return
> > value is inserted into the note event?
>
> Reinhold, I didn't see you get an answer.
>
> There are examples in the documentation for tweaks, which are how you get
> something inserted in a 'NoteEvent.

The problem with all these is that either
(1) The command needs to be written before the note, since it requires the 
note as an argument:
http://kainhofer.com/~lilypond/ajax/Documentation/user/lilypond/Adding-
articulation-to-notes-_0028example_0029.html

or 
(2) it's not possible to pass a parameter to the \mycresc "text" function:
http://kainhofer.com/~lilypond/ajax/Documentation/user/lilypond/Using-Scheme-
code-instead-of-_005ctweak.html#Using-Scheme-code-instead-of-_005ctweak

I haven't found a way how to define a function \mycresc "text", so that 
   c4\mycresc "cresc."  d4 e f\!
creates a crescendo event assigned to the c4 rather than the d4...

All I'm able is
   \mycresc c4 "cresc" d4 e f\!   (using a normal music function)
of
  mycresc=#(create-text-cresc-spanner "cresc")
  c4\mycresc d4 e f\!

Unfortunately, the first is inconsistent with the use of \< and the future 
predefined commands \cresc, \dim,\decresc, etc., while the second is not as 
flexible as a function taking the argument directly in the score.


> I'm not sure if you wanted a way to get the CrescendoEvent inside the
> Chord, as opposed to outside the chord.  I don't think you can put the
> CrescendoEvent inside the NoteEvent.

No, I just need it inside the chord, so it is attached to this chord and not 
inserted into the NEXT chord...

Cheers,
Reinhold
- -- 
- --
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJ7DBETqjEwhXvPN0RAq5tAJ93poVUq4iH8tAPK2gSUDwll2CHkgCgs9zO
HGuxpWl4EYDbaTDQE1hYsAs=
=teO3
-END PGP SIGNATURE-


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-19 Thread Carl D. Sorensen



On 4/17/09 11:02 AM, "Reinhold Kainhofer"  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Am Freitag, 17. April 2009 schrieb Frédéric Bron:
> 
> Hmm, no you are right. It seems that when using a music-function, the scheme
> expression is:
> 
>   (make-music 'SequentialMusic
> 'elements
> (list (make-music 'EventChord
> 'elements
> (list (make-music 'NoteEvent
> 'duration (ly:make-duration 2 0 1 1)
> 'pitch (ly:make-pitch 0 0 0
>   (make-music 'CrescendoEvent
> 'crescendoText "blah.."
> 'crescendoSpanner 'text
> 'span-direction -1)))
> 
> i.e. the CrescendoEvent is outside the EventChord, while with a simple
> definition like crxxx=#(make-music 'CrescendoEvent ...), it is inside the
> EventChord:
> 
>   (make-music 'SequentialMusic
> 'elements
> (list (make-music 'EventChord
> 'elements
> (list (make-music 'NoteEvent
> 'duration (ly:make-duration 2 0 1 1)
> 'pitch (ly:make-pitch 0 0 0))
>   (make-music 'CrescendoEvent
> 'crescendoText "cresc."
> 'crescendoSpanner 'text
> 'span-direction -1)))
> 
> 
> Does anyone have an idea how to create a function so that the return value is
> inserted into the note event?

Reinhold, I didn't see you get an answer.

There are examples in the documentation for tweaks, which are how you get
something inserted in a 'NoteEvent.

I'm not sure if you wanted a way to get the CrescendoEvent inside the Chord,
as opposed to outside the chord.  I don't think you can put the
CrescendoEvent inside the NoteEvent.

HTH,

Carl



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-17 Thread Reinhold Kainhofer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am Freitag, 17. April 2009 schrieb Frédéric Bron:
> > Attached is a sample file to show how the definition of spanners could
> > work with my patch. I've also implemented two functions to give the text
> > of the spanner directly in the postfix call.
>
> When I look at your dynamic_spanners_postfix.pdf file, it seems to me
> that on the second line (with the functions that take the text as an
> argument), the cresc starts on the following note, not on the previous
> note. Am I wrong?

Hmm, no you are right. It seems that when using a music-function, the scheme 
expression is:

  (make-music 'SequentialMusic
'elements
(list (make-music 'EventChord
'elements
(list (make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch 0 0 0
  (make-music 'CrescendoEvent
'crescendoText "blah.."
'crescendoSpanner 'text
'span-direction -1)))

i.e. the CrescendoEvent is outside the EventChord, while with a simple 
definition like crxxx=#(make-music 'CrescendoEvent ...), it is inside the 
EventChord:

  (make-music 'SequentialMusic
'elements
(list (make-music 'EventChord
'elements
(list (make-music 'NoteEvent
'duration (ly:make-duration 2 0 1 1)
'pitch (ly:make-pitch 0 0 0))
  (make-music 'CrescendoEvent
'crescendoText "cresc."
'crescendoSpanner 'text
'span-direction -1)))


Does anyone have an idea how to create a function so that the return value is 
inserted into the note event?

Cheers,
Reinhold

- -- 
- --
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJ6LYzTqjEwhXvPN0RAiHGAKCKE0zsPIvVcpzOPHdx0emX83UhgACeMgMQ
RxOPUOWzVG0zSvtYIIVplWc=
=/O8j
-END PGP SIGNATURE-


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-17 Thread Frédéric Bron
> Attached is a sample file to show how the definition of spanners could work
> with my patch. I've also implemented two functions to give the text of the
> spanner directly in the postfix call.

When I look at your dynamic_spanners_postfix.pdf file, it seems to me
that on the second line (with the functions that take the text as an
argument), the cresc starts on the following note, not on the previous
note. Am I wrong?

Frédéric


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-13 Thread Frédéric Bron
> So, I took a look at the issue today and created a patch, which will now allow
> all dynamic spanner starters to be implemented as postfix-operators.
>
> The short (<15 quite trivial lines!) patch is up for review at:
> http://codereview.appspot.com/39047
>
> Basically, my question for now is whether this the right approach. Call it a
> proof-of-concept patch.
> If so, we'll need to think about possible upgrade paths for the syntax changes
> that are introduced by making all dynamic spanners postfix operators...
> The patch also does not include the actual definitions of things like \dim,
> \cresc, etc.

Wonderful!!! Thanks a lot for this great job!
Frédéric


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-11 Thread Anthony W. Youngman
In message , Piero Faustini 
 writes


.ExternalClass .EC_hmmessage P {padding:0px;} .ExternalClass
body.EC_hmmessage {font-size:10pt;font-family:Verdana;}

recognising the original Italian from is adjectival.


thus sorry for them, but it is WRONG at all. This is plain english syntax
rules roughly applied to a foreign language: in english you can say both
"the sun keeps raising" and "the raising sun".


Actually, you can't. "raising" (if I've got my grammar right) is a 
transitive verb, ie the subject and object are not the same thing. You 
mean "rising", which is intransitive, and so can be applied to an 
object.


Cheers,
Wol
--
Anthony W. Youngman - anth...@thewolery.demon.co.uk



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


(de)cresendi syntax

2009-04-11 Thread Piero Faustini










> recognising the original Italian from is adjectival.

thus sorry for them, but it is WRONG at all. This is plain english syntax rules 
roughly applied to a foreign language: in english you can say both "the sun 
keeps raising" and "the raising sun".But in italian, gerund is never usable as 
an adjective. The corresponding adjective would be something like "crescente" 
and thus YES, would need a plural form ("crescenti").But as an english, you may 
still want to use gerund "crescendo" as an adjective - thus, in english - no 
need for a plural form.When will we burn our dictionaries?
Piero.
P.S. Why don't we translate ALL Lilypond syntax in italian???  Look:
\nuova Partitura {\nuovo RigoPianoforte {<<\contesto Rigo = "MD" {\chiave basso 
\relativo do' {
do re mi fa sol...

Can you imagine a better old-fashioned music code?

Please please please mum please

_
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-11 Thread Cameron Horsburgh
On Sat, Apr 11, 2009 at 10:40:24AM +0100, Trevor Daniels wrote:
>
> Werner LEMBERG wrote Saturday, April 11, 2009 9:35 AM
>
>
>>
>>> In an english context, the plural is simple: "crescendoes".
>>
>> Ouch.  I would use `crescendos'.
>
> To be pedantic, if "crescendo" is not a noun there is no
> plural, even in English.  It should always be written as "crescendo 
> markings" or "crescendo indications".  There is
> a similar situation with the anglicised Latin "requiems", which is 
> strictly incorrect. It should be "requiem masses".

This is quite true; however, the question must be asked---at what
point do we declare it to be an English word derived from the Italian?

For the record, the first definition of the term in the Oxford
Dictionary is in its noun state, listing 'crescendos' and 'crescendi'
as the plural forms. It also lists the term as an adverb/adjective and
a verb. The Merriam-Webster offers similar defnitions while
recognising the original Italian from is adjectival.

http://www.askoxford.com/concise_oed/crescendo

http://www.merriam-webster.com/dictionary/crescendo

-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


RE: (de)cresendi syntax

2009-04-11 Thread Piero Faustini

All of this, of course, to avoid answering Werner's question... that's REAL 
pedantery ;)

> To be pedantic, if "crescendo" is not a noun there is no



_
Quante ne sai? Scoprilo con CrossWire!
http://clk.atdmt.com/GBL/go/140630367/direct/01/___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-11 Thread Trevor Daniels


Werner LEMBERG wrote Saturday, April 11, 2009 9:35 AM





In an english context, the plural is simple: "crescendoes".


Ouch.  I would use `crescendos'.


To be pedantic, if "crescendo" is not a noun there is no
plural, even in English.  It should always be written as 
"crescendo markings" or "crescendo indications".  There is
a similar situation with the anglicised Latin "requiems", 
which is strictly incorrect. It should be "requiem masses".


Trevor



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-11 Thread Werner LEMBERG

> In an english context, the plural is simple: "crescendoes".

Ouch.  I would use `crescendos'.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-11 Thread MonAmiPierrot

...it's a dirty job but...

the italian term "crescendo" is not a noun, is a gerund (meaning "raising",
"growing"), so, when substantivated, in italian language, is indeclinable -
thus if I "amo il crescendo rossiniano", I still "amo tutti i crescendo
rossiniani" (if you find an italian who says "crescendi", you have the
license to kill him). In an english context, the plural is simple:
"crescendoes". 
If the english language respected italian (and french and spanish and
german...) language as it does with latin, I did not have to bother you!!!
But thanks for the try!
bye
Piero

-
Piero Faustini, PhD student
Dipartimento di Scienze Storiche
Sezione musicologia
Università di Ferrara 

Main Software used:

- LyX 1.6.1 on WinXP sp3; EndNote & JabRef
- MikTex
- LaTeX class: Koma book
- Lilypond 2.12 for example excerpts
- BibLaTeX for bibliographies 


-- 
View this message in context: 
http://www.nabble.com/%28de%29cresendi-syntax-tp22144542p22999061.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-10 Thread Graham Percival
On Sat, Apr 11, 2009 at 01:54:22AM +0200, Reinhold Kainhofer wrote:
> > I know that it is not possible to implement this only with scheme and
> > lily code but I am sure it is possible in C++.
> 
> Yes, some simple lines of C++ were required.
> 
> Attached is a sample file to show how the definition of spanners could work 
> with my patch. I've also implemented two functions to give the text of the 
> spanner directly in the postfix call.

Beautiful... simply beautiful.

As you mentioned, we need to be very careful with the upgrade path
here.  And we should spend at least two weeks discussing the new
syntax (\textCresc "my personal text" vs. \crText "" vs.
hard-coded \crPocoAPoco vs. whatever).

I can't speak to the actual C++ patch, but I'm *very* happy with
the flexibility those scheme functions give us.

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-10 Thread Carl D. Sorensen



On 4/10/09 5:54 PM, "Reinhold Kainhofer"  wrote:

> On Sonntag, 22. Februar 2009 09:25:57 Frédéric Bron wrote:
>> I am in charge of the question of (de)crescendo syntax issue in 2.12.2.
> 
> Okay, sorry if I'm working on the same issue as you now, but I simply got too
> frustrated with hundreds of pages of old scores suddenly changing
> cresc/hairpin behavior (they were created with 2.10 and now I've started
> revising them with 2.12...) and the huge work I have now with cross-checking
> every cresc/dim/hairpin.
> 
> So, I took a look at the issue today and created a patch, which will now allow
> all dynamic spanner starters to be implemented as postfix-operators.
> 

> 
> Attached is a sample file to show how the definition of spanners could work
> with my patch. I've also implemented two functions to give the text of the
> spanner directly in the postfix call.
> 
> Any comments / objections / suggestions?

Looks good to me.  Got at the essential issues in a very straightforward
way.

Carl



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-04-10 Thread Reinhold Kainhofer
On Sonntag, 22. Februar 2009 09:25:57 Frédéric Bron wrote:
> I am in charge of the question of (de)crescendo syntax issue in 2.12.2.

Okay, sorry if I'm working on the same issue as you now, but I simply got too 
frustrated with hundreds of pages of old scores suddenly changing 
cresc/hairpin behavior (they were created with 2.10 and now I've started 
revising them with 2.12...) and the huge work I have now with cross-checking 
every cresc/dim/hairpin.

So, I took a look at the issue today and created a patch, which will now allow 
all dynamic spanner starters to be implemented as postfix-operators. 

The short (<15 quite trivial lines!) patch is up for review at:
http://codereview.appspot.com/39047

Basically, my question for now is whether this the right approach. Call it a 
proof-of-concept patch.
If so, we'll need to think about possible upgrade paths for the syntax changes 
that are introduced by making all dynamic spanners postfix operators...
The patch also does not include the actual definitions of things like \dim, 
\cresc, etc.

> Current syntax is not satisfactory because:
>
> - syntax is different between \<, \>, \! and \cresc, \dim, \enddim,
> \endcresc (undocumented):
>. \<, \>, \! apply to the previous note,
>. \cresc, \dim, \enddim, \endcresc apply to the next note

With my patch, everything applies to the previous note, all spanners are ended 
with \!, no \endXXX are needed any more.

> - some people just want cresc. to be printed without dashed line (spanner)

That's a global setting of the DynamicTextSpanner, which (IMO) should be 
changed to no dashed line by default.

> - \<, \>, \! are used to start/stop (de)crescendo spanner (hairpin or
> text), 
> - crescTextXXX, dimTextXXX, crescHairpin, dimHairpin decide if \<,
> \>, \! produce text or hairpin (applies for ever until changed to something
> else), 

Yes, this behavior stays the same with my patch.

> - \<"cresc.", \<"cresc. poco a poco", \>"dim."... produce a text spanner
> with corresponding text, the spanner is ended with \!, the text applies
> only once, i.e. next (de)crescendo produces hairpin if this is the
> current setting

This would require a parser change to be able to use \>. However, with my 
patch it's easy to write a function, e.g. mycresc, which can be used as:
a4\mycresc "cresc. molto" a4 a4\fff

An example is given in the attached file.

> - \cresc, \dim, \decr, \decresc produce a text without spanner, applies
> only once to the previous note, no need to finish with \! or \endcresc,
> this could be implemented with a \markup command

No, using a markup would break e.g. MIDI, which needs information about the 
end. With my patch, those can simply create dynamic text spanners with or 
without dashed line, but must be finished with \!

> - remove unnecessary \cr, \endcr, \decr, \enddecr
> - remove unnecessary \enddim, \endcresc

Yes, unnecessary with my patch

> I know that it is not possible to implement this only with scheme and
> lily code but I am sure it is possible in C++.

Yes, some simple lines of C++ were required.

Attached is a sample file to show how the definition of spanners could work 
with my patch. I've also implemented two functions to give the text of the 
spanner directly in the postfix call.

Any comments / objections / suggestions?

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
\version "2.13.1"
#(ly:set-option 'point-and-click #f)

% Some sample text dynamic spanners, to be used as postfix operators
crxxx = #(make-music 'CrescendoEvent 'span-direction START 'crescendoSpanner 'text 'crescendoText "cresc.")
crpoco = #(make-music 'CrescendoEvent 'span-direction START 'crescendoSpanner 'text 'crescendoText "cresc. poco a poco")
dimxxx = #(make-music 'DecrescendoEvent 'span-direction START 'decrescendoSpanner 'text 'decrescendoText "dim.")

\relative c' { c4\crxxx d4 e4 f4 |
  g4 a4\! b4\crpoco c4 |
  c4 d4 e4 f4 |
  g4 a4\! b4\< c4 |
  g4\dimxxx a4\< b4\crxxx c4\!
}



% Two functions for (de)crescendo spanners where you can explicitly give the 
% spanner text.
mycresc = #(define-music-function (parser location mymarkup) (string?)
  (make-music 'CrescendoEvent 'span-direction START 'crescendoSpanner 'text 'crescendoText mymarkup)
)
mydecresc = #(define-music-function (parser location mymarkup) (string?)
  (make-music 'DecrescendoEvent 'span-direction START 'decrescendoSpanner 'text 'decrescendoText mymarkup)
)

\relative c' { c4\mycresc "blah.." c4 c4 c4 |
  c4\mydecresc "...halb" c4 c4 c4 |
  c4 c4\! c4 c4 }





dynamic_spanners_postfix.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lil

Re: (de)cresendi syntax

2009-03-18 Thread Graham Percival
On Tue, Mar 17, 2009 at 10:41:36AM +0100, Mats Bengtsson wrote:
>
> Graham Percival wrote:
>>
>>> I'm not sure why we have both \cr and \<.  If the two really are equivalent,
>>> one ought to be deprecated before it is ultimately removed.
>>
>> I have a vague notion that \cr *was* deprecated.
>>   
> No! If you look in ly/spanners-init.ly, you will see that \cr is used  
> internally in \cresc
> (though that's easy to fix, of course).

Sorry.  You know, I now have a vague notion that we've had this
conversation before.  I really need to start keeping better notes
while I advance into my old age.  :)

Cheers,
- Graham



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-03-17 Thread Mats Bengtsson



Graham Percival wrote:



I'm not sure why we have both \cr and \<.  If the two really are equivalent,
one ought to be deprecated before it is ultimately removed.



I have a vague notion that \cr *was* deprecated.
  
No! If you look in ly/spanners-init.ly, you will see that \cr is used 
internally in \cresc

(though that's easy to fix, of course).

   /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-03-16 Thread David Kastrup
Graham Percival  writes:

> On Sun, Feb 22, 2009 at 06:37:50PM -0700, Carl D. Sorensen wrote:
>> > - \cresc, \dim, \decr, \decresc produce a text without spanner, applies
>> > only once to the previous note, no need to finish with \! or \endcresc,
>> > this could be implemented with a \markup command
>> 
>> I don't like the idea of changing current syntax so dramatically, but I may
>> be in the minority here.
>
> It would certainly make the convert-ly rule a pain, or else raise
> howls of protest from people at the changing syntax.  :)
>
> Also, how would this version of \cresc work with MIDI volume?
> Would it just be an instant increase, or spread over a fixed 4
> notes, or what?
>
> I admit that MIDI volume is a fairly minor point in lilypond.

But one should not lose sight of it.  One reason is that MIDI might be
the most honest reflection of _meaning_ for a lot of musical features
(unfortunately, not including fingerings and a few other things), and
since we want to import/export not just to PDF but MIDI/MusicXML and
whatever, and since we want to be able to meaningfully transform input
(like being able to transpose it, or, say, tone down dynamics one notch
when handing over the recorder part to a trumpet), making changes that
render MIDI interpretation difficult might mean that we are moving to
visual rather than logical markup closer than appropriate for Lilypond.
I think it is one of Lilypond's strengths that it has a better
conceptual grasp of music than, say, MusiXTeX.

So it is a bad sign in my opinion when changes in the input are hard to
consistently make it to MIDI.

Even when one does not want to see MIDI as an output device (and I _do_
use it for accompaniment), it is nice for "proofhearing".

-- 
David Kastrup



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-03-16 Thread Graham Percival
On Sun, Feb 22, 2009 at 06:37:50PM -0700, Carl D. Sorensen wrote:
> > - \cresc, \dim, \decr, \decresc produce a text without spanner, applies
> > only once to the previous note, no need to finish with \! or \endcresc,
> > this could be implemented with a \markup command
> 
> I don't like the idea of changing current syntax so dramatically, but I may
> be in the minority here.

It would certainly make the convert-ly rule a pain, or else raise
howls of protest from people at the changing syntax.  :)

Also, how would this version of \cresc work with MIDI volume?
Would it just be an instant increase, or spread over a fixed 4
notes, or what?

I admit that MIDI volume is a fairly minor point in lilypond.

> > - remove unnecessary \cr, \endcr, \decr, \enddecr
> 
> I'm not sure why we have both \cr and \<.  If the two really are equivalent,
> one ought to be deprecated before it is ultimately removed.

I have a vague notion that \cr *was* deprecated.

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-02-22 Thread Carl D. Sorensen
Frederic,

I have made some comments in your message below.  Thanks for taking on this
project.

This type of proposal probably should go to lilypond-devel, rather than
-user, so I'm cross-posting to -devel.


On 2/22/09 1:25 AM, "Frédéric Bron"  wrote:

> Hello,
> 
> I am in charge of the question of (de)crescendo syntax issue in 2.12.2.
> 
> Here is what lilypond 2.12.2 currently does (in ly/spanners-init.ly):
> 
> - \< and \cr are equivalent: they start a crescendo event on the
> previous note: #(make-span-event 'CrescendoEvent START)
> - \> and \decr are equivalent: they start a decrescendo event on the
> previous note: #(make-span-event 'DecrescendoEvent START)
> - \!, \endcr and \enddecr are equivalent: they stop of (de)cresendo
> event on the previous note: #(make-span-event 'CrescendoEvent STOP),
> #(make-span-event 'DecrescendoEvent STOP) (is it really equivalent?)
> 
> - the following commands set the (de)cresendo to be text with dashed
> line or hairpin forever (until changed to something else):
>. crescTextCresc -> text "cresc."
>. dimTextDecresc -> text "decresc."
>. dimTextDecr -> text "decr."
>. dimTextDim -> text "dim."
>. crescHairpin -> hairpin
>. dimHairpin -> hairpin
> 
> 
> - the following commands start a text (de)crescendo on the next note
> (affects only the next (de)crescendo):
>. cresc -> text "cresc."
>. dim -> text "dim."
> - the following commands stop a (de)crescendo on the next note:
>. enddim
>. endcresc
> 
> 
> Current syntax is not satisfactory because:
> 
> - syntax is different between \<, \>, \! and \cresc, \dim, \enddim,
> \endcresc (undocumented):
>. \<, \>, \! apply to the previous note,
>. \cresc, \dim, \enddim, \endcresc apply to the next note
> - there is no symmetry between \crescText, \dimText commands and
> \ commands
> - some people just want cresc. to be printed without dashed line (spanner)
> - \endcresc does something different from \endcr which is confusing
> 
> 
> Here are my dreams:
> 
> - \<, \>, \! are used to start/stop (de)crescendo spanner (hairpin or text),
> - crescTextXXX, dimTextXXX, crescHairpin, dimHairpin decide if \<, \>,
> \! produce text or hairpin (applies for ever until changed to something
> else), I would prefer simpler syntax: \crescCresc, \crescHairpin,
> \dimDim, \dimDecr, \dimDecresc, i.e. remove Text

This part of the syntax got hashed out pretty heavily as part of 2.10.  I
think that the crescXXX and dimXXX syntax is where we want it.

The issue is that there are hairpin crescendos and decrescendos, and there
are text crescendos and decrescendos.  That's why the Text word was put in
there.  Perhaps we could make a change, but we ought to review this
carefully.

The previous conversation was at
http://thread.gmane.org/gmane.comp.gnu.lilypond.devel/15693/focus=15696

This is all coupled together with the idea that there are dynamic markings
that aren't really spanners, but are just markups for the individual note.

> - \<"cresc.", \<"cresc. poco a poco", \>"dim."... produce a text spanner
> with corresponding text, the spanner is ended with \!, the text applies
> only once, i.e. next (de)crescendo produces hairpin if this is the
> current setting

I believe that this will require a rewrite of the parser.  It will be
challenging to identify the difference between \< which starts a crescendo
spanner in your  proposal above, and \<"my crescendo text here" which starts
a text spanner.

> - \cresc, \dim, \decr, \decresc produce a text without spanner, applies
> only once to the previous note, no need to finish with \! or \endcresc,
> this could be implemented with a \markup command

I don't like the idea of changing current syntax so dramatically, but I may
be in the minority here.

> - remove unnecessary \cr, \endcr, \decr, \enddecr

I'm not sure why we have both \cr and \<.  If the two really are equivalent,
one ought to be deprecated before it is ultimately removed.

> - remove unnecessary \enddim, \endcresc


> 
> I know that it is not possible to implement this only with scheme and
> lily code but I am sure it is possible in C++.
> 
> Could you please comment on these propositions and give any other ideas.
> 
> F. Bron
> 
> PS: attached is a file that show the behaviour of the commands.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (de)cresendi syntax

2009-02-22 Thread Cameron Horsburgh
On Sun, Feb 22, 2009 at 09:25:57AM +0100, Frédéric Bron wrote:
> Hello,
>

>
> Here are my dreams:
>
> - \<, \>, \! are used to start/stop (de)crescendo spanner (hairpin or text),
> - crescTextXXX, dimTextXXX, crescHairpin, dimHairpin decide if \<, \>,  
> \! produce text or hairpin (applies for ever until changed to something  
> else), I would prefer simpler syntax: \crescCresc, \crescHairpin,  
> \dimDim, \dimDecr, \dimDecresc, i.e. remove Text

I would prefer it if the \< and \> forms produced hairpins and the
various textual forms produced the various text possibilities.

> - \<"cresc.", \<"cresc. poco a poco", \>"dim."... produce a text spanner  
> with corresponding text, the spanner is ended with \!, the text applies  
> only once, i.e. next (de)crescendo produces hairpin if this is the  
> current setting

This is a great idea. In fact, it would make sense to me to have the
\< and \> forms default to hairpins, but have some sort of attached
markup to describe a textual form instead. So, for instance,

   a\< 

would produce a hairpin starting on the a, while 

  a\<_"cresc."  

would produce a 'cresc.' attached to the a instead. I can see there
might be a problem if this was a fully fledged markup, because there
is already a lot of formatting applied to the text mark. (I can also
see that my syntax is ambiguous, because it could also mean that I
want a simple markup attached to the a).

I have no idea about the programming, but we might also be able to add
another symbol that would suggest the addition of dots. However, this
preference would often apply globally to a piece, so it might be best
set once for all in the current way.

> - \cresc, \dim, \decr, \decresc produce a text without spanner, applies  
> only once to the previous note, no need to finish with \! or \endcresc,  
> this could be implemented with a \markup command
> - remove unnecessary \cr, \endcr, \decr, \enddecr
> - remove unnecessary \enddim, \endcresc
>

I agree. These different forms are all confusing, and I always worry
I've been mixing forms and just hope I haven't used the wrong one!

> I know that it is not possible to implement this only with scheme and  
> lily code but I am sure it is possible in C++.
>
> Could you please comment on these propositions and give any other ideas.
>
> F. Bron
>
> PS: attached is a file that show the behaviour of the commands.


> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user


-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


(de)cresendi syntax

2009-02-22 Thread Frédéric Bron

Hello,

I am in charge of the question of (de)crescendo syntax issue in 2.12.2.

Here is what lilypond 2.12.2 currently does (in ly/spanners-init.ly):

- \< and \cr are equivalent: they start a crescendo event on the 
previous note: #(make-span-event 'CrescendoEvent START)
- \> and \decr are equivalent: they start a decrescendo event on the 
previous note: #(make-span-event 'DecrescendoEvent START)
- \!, \endcr and \enddecr are equivalent: they stop of (de)cresendo 
event on the previous note: #(make-span-event 'CrescendoEvent STOP), 
#(make-span-event 'DecrescendoEvent STOP) (is it really equivalent?)


- the following commands set the (de)cresendo to be text with dashed 
line or hairpin forever (until changed to something else):

  . crescTextCresc -> text "cresc."
  . dimTextDecresc -> text "decresc."
  . dimTextDecr -> text "decr."
  . dimTextDim -> text "dim."
  . crescHairpin -> hairpin
  . dimHairpin -> hairpin

- the following commands start a text (de)crescendo on the next note 
(affects only the next (de)crescendo):

  . cresc -> text "cresc."
  . dim -> text "dim."
- the following commands stop a (de)crescendo on the next note:
  . enddim
  . endcresc


Current syntax is not satisfactory because:

- syntax is different between \<, \>, \! and \cresc, \dim, \enddim, 
\endcresc (undocumented):

  . \<, \>, \! apply to the previous note,
  . \cresc, \dim, \enddim, \endcresc apply to the next note
- there is no symmetry between \crescText, \dimText commands and 
\ commands

- some people just want cresc. to be printed without dashed line (spanner)
- \endcresc does something different from \endcr which is confusing


Here are my dreams:

- \<, \>, \! are used to start/stop (de)crescendo spanner (hairpin or text),
- crescTextXXX, dimTextXXX, crescHairpin, dimHairpin decide if \<, \>, 
\! produce text or hairpin (applies for ever until changed to something 
else), I would prefer simpler syntax: \crescCresc, \crescHairpin, 
\dimDim, \dimDecr, \dimDecresc, i.e. remove Text
- \<"cresc.", \<"cresc. poco a poco", \>"dim."... produce a text spanner 
with corresponding text, the spanner is ended with \!, the text applies 
only once, i.e. next (de)crescendo produces hairpin if this is the 
current setting
- \cresc, \dim, \decr, \decresc produce a text without spanner, applies 
only once to the previous note, no need to finish with \! or \endcresc, 
this could be implemented with a \markup command

- remove unnecessary \cr, \endcr, \decr, \enddecr
- remove unnecessary \enddim, \endcresc

I know that it is not possible to implement this only with scheme and 
lily code but I am sure it is possible in C++.


Could you please comment on these propositions and give any other ideas.

F. Bron

PS: attached is a file that show the behaviour of the commands.
\version "2.12.2"
%{
1) Make a table of all the crescendo and decrescendo forms, so we can
see at a glance the missing/broken pieces.
2) Make a patch for v. 2.13 (when it's started) to get the appropriate
symmetry for all forms.  This will require posting the table from 1)
on -user and getting feedback from users.
3) Make a patch for convert-ly, which will do two things:
a) fix the problem you've identified for the previous convert-ly rule for
2.12
b) Make a correct convert-ly rule for 2.13.

\<
\!
cr = #(make-span-event 'CrescendoEvent START) -> equivalent to \<
decr = #(make-span-event 'DecrescendoEvent START) -> equivalent to \>
enddecr = #(make-span-event 'DecrescendoEvent STOP) -> equivalent to \!
endcr = #(make-span-event 'CrescendoEvent STOP) -> equivalent to \!

cresc =
2.10.33: { #(ly:export (make-event-chord (list cr)))\set crescendoText =   \markup { \italic "cresc." }   \set crescendoSpanner = #'dashed-line }
2.12.2:  { #(ly:export (make-event-chord (list cr)))  \once \set crescendoText =   \markup { \italic "cresc." } \once \set crescendoSpanner = #'text }
dim =
2.10.33: { #(ly:export (make-event-chord (list decr)))  \set decrescendoText = \markup { \italic "dim." } \set decrescendoSpanner = #'dashed-line }
2.12.2:  { #(ly:export (make-event-chord (list decr)))\once \set decrescendoText = \markup { \italic "dim." }   \once \set decrescendoSpanner = #'text }
enddim =
2.10.33: { #(ly:export (make-event-chord (list enddecr))) \unset decrescendoText \unset decrescendoSpanner }
2.12.2:  { #(ly:export (make-event-chord (list enddecr))) }
endcresc =
2.10.33: { #(ly:export (make-event-chord (list endcr)))   \unset crescendoText \unset crescendoSpanner }
2.12.3:  { #(ly:export (make-event-chord (list endcr))) }

2.10.33:
setTextCresc =   { \set crescendoText =   \markup { \italic "cresc." }   \set crescendoSpanner = #'dashed-line }
setTextDecresc = { \set decrescendoText = \markup { \italic "decr." }\set decrescendoSpanner = #'dashed-line }
setTextDim = { \set decrescendoText = \markup { \italic "dim." } \set decrescendoSpanner = #'dashed-line }
2.12.2:
crescTextCresc = { \set crescendoText =   \mar