[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
create custom context definitions using a scheme function
From: |
Janek Warchoł |
Subject: |
create custom context definitions using a scheme function |
Date: |
Thu, 9 Jan 2014 20:44:54 +0100 |
Hi,
I want to create custom context definitions using a scheme function.
Later on the function will take some arguments and actually do
something interesting, but right now i cannot get the most basic
examples to work:
%%%%% why the override isn't applied here?
test =
#(define-scheme-function (parser location)()
#{
\layout {
\context {
\Staff
\override NoteHead #'color = #blue
}
}
#})
\layout { \test }
% this doesn't work either:
%\test
melody = \relative c'' {
c b a f
}
\score {
\new Staff \melody
}
%%%%%%%%%%%%%%%%%%%%
% another snippet. why this doesn't work?
test =
#(define-scheme-function (parser location)()
#{
\layout {
\context {
\ChoirStaff
\accepts "TestStaff"
}
\context {
\Staff
\name "TestStaff"
\alias "Staff"
instrumentName = "Lol"
}
}
#})
\layout { \test }
% this doesn't work either:
%\test
melody = \relative c'' {
c b a f
}
\score {
\new ChoirStaff <<
\new TestStaff \melody
>>
\layout {
\override TestStaff.NoteHead #'color = #blue
}
}
- create custom context definitions using a scheme function,
Janek Warchoł <=