You can't do this; the format-metronome-markup is run during interpreting, from Metronome_mark_engraver, which will pass the context object by doing context()->self_scm() in C++.
I suggest you refactor the code a bit, so your call and format-metronome-markup use the same code. On Mon, Oct 6, 2008 at 7:10 PM, Graham Percival <[EMAIL PROTECTED]> wrote: > I'm experimenting with calling (format-metronome-markup) directly, > but I'm having difficulty with the context argument. > // main code: > (define-public (format-metronome-markup text dur count context) > ... > > My code: > \header{ > piece = #(format-metronome-markup "Allegro" 4 120 'Global) > } > \relative c' { c } > > Error message: > foo.ly:3:11: error: GUILE signaled an error for the expression > beginning here > piece = # > (format-metronome-markup "Allegro" 4 120 'Global) > Wrong type argument in position 1 (expecting Context): Global > > > I've tried #f, '(), 'void, 'Score, and a few other things I can't > remember. The only time that context occurs in the function is > (let* ((hide_note (eq? #t (ly:context-property context > 'tempoHideNote))) which doesn't concern me -- I want this to always > resolve to false. How do I give the function a Context? -- 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