[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Expert question on named contexts
From: |
Trevor Daniels |
Subject: |
Re: Expert question on named contexts |
Date: |
Wed, 13 Aug 2008 23:32:09 +0100 |
Mats Bengtsson wrote Saturday, August 09, 2008 11:37 AM
Han-Wen Nienhuys wrote:
Perhaps we should have a nice scheme hack that will print out the
context hierarchy at any point.
That would be great!
Does this get close to helping? A little more scheming to check
for the top context rather than hard-coding the number would
generalise this.
contextHeirarchy =
#(lambda (context)
(format #t "Context heirarchy: ~a"
(ly:context-parent
(ly:context-parent
(ly:context-parent
(ly:context-parent context))))))
\new Score = "Score 1" {
\new StaffGroup = "StaffGroup 1" {
\new Staff = "Staff 1" {
\new Voice = "Voice 1" {
{ \applyContext \contextHeirarchy a }
}
}
}
}
/Mats
Trevor
Re: Expert question on named contexts, Han-Wen Nienhuys, 2008/08/08