Erik Sandberg wrote:

it's possible, but you have to have extra error checking to catch things
like

  \transpose { f } \lyrics { bar }  { ..victic-music.. }


What if we just define transpose using something like
transpose = #(def-music-function .. (ly:pitch? ly:pitch? ly:music?) .. )
?

I think this would catch the above with something like
wrong type for argument 1.  Expecting pitch.
which IMHO even is better than the current
Unexpected '{'

yes, but a ly:pitch? object is a C++ Pitch object, which is different from Music. So you would define transpose as

  (ly:music? ly:music? ly:music?)

and check that the first 2 arguments are event-chords with a single noteevent inside. Right now, you cannot define it as

  (pitch, pitch, music)

since lily interprets

  \transpose c d {..stuff..}

as

  \transpose c4 d4 {..stuff..}

where c4 and d4 are in fact EventChords.

--
 Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


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

Reply via email to