-----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" <reinh...@kainhofer.com> 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-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel