From: Chris Cannam <cannam@al...> - 2002-06-24 21:24:39
I've just implemented something that begins to make it possible
to change some aspects of the notation rendering, primarily the
choice of note heads. Each event can now have a style property
which defines which of a user-extensible set of note styles is
used to render it.
There's only a very basic GUI so far: the Style options on the
Notes menu let you change the style for a particular selection,
but you can't edit styles or (rather fundamentally) change the
default style for insertion yet.
The styles themselves are defined in little XML files that get
installed into share/apps/rosegarden/styles/ under the KDE tree.
(That means recent updates from CVS need to be reinstalled.)
Even the default style is defined there, in Classical.xml,
which means the application itself no longer needs to know (and
indeed no longer does know) that a semiquaver has a tilted oval
filled head, a stem, two flags, etc; that just comes from the
style. I've also defined basic triangle, cross and "mensural"
styles (mensural is just classical with diamond-shaped note
heads, so don't get excited).
At the moment you can't do terribly much with this feature: you
can make pointless and confusing tweaks to supposedly well-known
styles, or you could define your own completely new style with
grinning skulls for noteheads or something, but you can't really
do anything more ambitious than just change the note heads or
switch off stems and tails or whatever. There will soon be
support for drawing numbers or other text instead of heads, but
it's not quite there yet. And the basic note durations etc, as
well as the dots, are still completely hardcoded; this is purely
a visual thing.
The real reason I'm talking about it at such length is that I
don't really have any idea what exactly people might want to use
something like this for, except that it seemed like a good way
to provide basic support for things like cross heads. I don't
think I've ever used a non-oval note head myself, let along an
entirely non-classical-shaped note. I'd like some suggestions
for likely uses, or for someone to take a look and tell me it's
_nearly_ able to do such-and-such, or to ask how it could be made
to do whatever else. And I'm happy to explain anything about the
XML format or code. The amount of code involved is still very
small, so there's plenty of scope for interesting changes.