Valentin Villenave escreveu: > Hello everybody, > > after having spent months (if not years) wondering "why the hell has > it to be the way it is?", today it's finally time for me to ask here > if anyone knows any logical answer to the following question: > > The most basic syntax, in LilyPond, is: > > notename/accidental/octave/duration, right? > ==> example: fis''2 > > So, if I understand correctly, all accidental-related stuff comes > right after the note, but *before* the octave indication. > Then why, when you want to add a cautionary accidental, do you have to put: > > notename/accidental/octave/cautionary/duration > ==> fis''!2 > instead of > > notename/accidental/cautionary/octave/duration > ==> fis!''2 > > and why has the later to cause the compilation to crash? > > > Some of you might answer that since cautionary accidentals are not > mandatory, it makes sense to put them afterwards, like one would do > with expressive marks (wrong example: expressive marks come after the > duration; the cautionaries are the *only* stuff which have to come > between the octave and the duration). > But you have to admit that it makes sense to put all > accidental-related stuff together, such as fis!''2 (it's so natural to > me that every time I write cautionaries, that means in every bar, I > use this syntax, launch the compilation, and have to tell me "oh, > right, I forgot"... before correcting it). > > I'm not asking to change the whole LilyPond syntax of course; but is > it unreasonable to ask if LilyPond could accept cautionaries before > *and* after the octave indication? Or at least, ignore it and go on > with the compilation? > It wouldn't break anything, and it would make the syntax much more > flexible and tolerant. It already is, in many ways: > spaces-insensitiveness, ties notation where you can put the tildes > wherever you want, bar checks when you want, and many cool features.
>From the top of my head, this is because ! and ? only make sense for notes, where pitches make sense in a broader context. If you look at parser.yy, you see simple_element: pitch exclamations questions octave_check optional_notemode_duration optional_rest { there is no place to store exclamations inside a pitch. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user