Reinhold Kainhofer wrote: > Hello Han-Wen, > Do you have any opinion about this patch (adds \ottava #x, which is > supposed > to make #(set-octavation x) obsolete)? Okay to apply to master?
Shouldn't that really be \octave #x since other commands are in English? Paul Scott > > Cheers, > Reinhold > ---------- Weitergeleitete Nachricht ---------- > > Subject: [PATCH] Re: Octavation syntax consistency (was: grand > predefined-command thread) > Date: Samstag, 28. Juni 2008 > From: Reinhold Kainhofer <[EMAIL PROTECTED]> > To: lilypond-devel@gnu.org > > Am Samstag, 28. Juni 2008 schrieb Reinhold Kainhofer: > > Am Samstag, 28. Juni 2008 schrieb Valentin Villenave: > >> This is not really a predef, but for the past couple of weeks I've > >> been trying to implement an easier syntax for octavations, e.g. > >> > >> \octava 1 > >> or > >> \octava #1 > >> > >> instead of > >> > >> #(set-octavation 1) > >> > >> Such a command would be much more consistent with the rest of the > >> (non-Scheme) LilyPond syntax (not to mention much easier to type, > >> since typing the hash character on a French keyboard requires you to > >> twist your arm ;-)... > >> > >> I couldn't come up with a patch, but I thought someone more skilled > >> than me could write it in a sec... > > Well, you don't need to be skilled too much, but that part about "a > sec" is > > definitely true ;-) Attached is an example. > > > Basically, you write a music-function and inside that music function you > > simply copy the stripped-down contents (which is only one line, > anyway!) of > > the set-octavation function, which is for some strange reason > defined as a > > scheme function rather than a music function. What's the reason for > this? > > AFAICS, that scheme function is not used inside any other code, so I > see no > > reason why that shouldn't be a music function. > > > So the whole function boils down to: > > > ottava = #(define-music-function (parser location octave) (number?) > > (_i "set the octavation ") > > (make-ottava-set octave) > > ) > > Attached is a patch, which adds this music function to LilyPond and > musicxml2ly, together with a conversion rule, docs changes (I don't know > French, so please check if the text there needs to be changed, too!), > updated > regression tests, etc. > > I choose ottava as the name, since that's the musical term. However, > there > might arise some confusion with the function \octave, which I propose to > rename to \octaveCheck (similar to \barNumberCheck) to make its purpose > clearer. > > What do you think about this? > > Cheers, > Reinhold > ------------------------- _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel