lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

User-defined messages in .ly compilation output?


From: Han-Wen Nienhuys
Subject: User-defined messages in .ly compilation output?
Date: Fri, 18 Jun 2004 17:08:58 +0200

address@hidden writes:
> generated by a certain piece of code are to be expected, as in:
> 
> \version "2.2.2"
> guitarPart = \notes {
>   \key d \major
>   d1 
>   \key a \major
>   a1
> }
> \score {
>   \notes {
>     <<
>       \new Staff {
>         %% COMPILES OK
>         \clef bass
>         \guitarPart
>       }
>       \new TabStaff {
>         %% EXPECT WARNINGS: Junking event: `KeyChangeEvent'
>         \guitarPart
>       }
>     >>
>   }
>   \paper{}
> }
> 
> Is there a way to insert into the compilation output something like:
> 
> lilypond (GNU LilyPond) 2.2.2
> Running lilypond-bin...
> Now processing `file.ly'
> Parsing...
> Interpreting music... 
> 
> message:  expect errors in TabStaff       <----------- CAN I DO THIS?
> 
> file.ly:2:14: warning: Junking event: `KeyChangeEvent':
>   \key d \majo
>               r


Jan's try is a 1st start, but outputs the message during the parse.  I
think you're looking for

  \applycontext #(lambda (x) (display "HI THERE"))

See also  "Context evaluation"  in the manual.


-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]