[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 26 Jun 2011 17:49:08 +0100
Nils and I were discussing Multi Measure rests on irc recently and I
have written up some ideas here (they are on the Design Notes page
http://www.denemo.org/Design+Notes as well)
Spanners in Denemo
We need to protect our users against trying to print or play files with
incomplete "spanners". "Spanners" are things that span notes (such as
start repeat section end repeat section, start tuplet end tuplet, start
cresc end cresc...). We might extend the concept to things that span
'vertically' such as start piano staff end piano staff.
The sort of operations a user can do to damage a spanner is to delete
the start or end object (possibly a note with directive attached), to
delete an object enclosed in a span, to cut a range of objects including
one end of a span. To paste back such a cut, possibly now enclosing more
objects, possibly now with the end span pasted before the start span.
The simplest thing would be to run a check before typesetting or
midi-creation. Such a check routine would need updating every time a new
sort of spanner was introduced by scripters.
Better would be some spanner support. Simplest would be some convention
for tags that indicate if the directive is the start or end of a
spanner. (And then more elaborate schemes such as might be used for
repeat, first time, second time constructions). Again these would be
used by a check routine, but now a new sort of spanner could
automatically be checked by creating its directives following the
Better still - but needing some real design work - would be a flag to
mark DenemoObjects as being involved in a spanner. These would trigger a
callback to when something happened to the object. The callback could be
the original command used to create the spanner with a parameter so say
what was being done. So the one script handles both creation and what to
do on deletion. Handling what to do on object creation (extra objects
within the span) would also be possible - but it could become difficult
to avoid a performance hit without building elaborate indexes (where
spans start and end).
With some support it would be possible for the callback to indicate if
it was d-Cut or d-DeleteObject that was causing the deletion. How that
information could be used is moot.
The bottom line is that experienced users don't much need this stuff,
though the checker would be handy; we know what to look out for. But it
is crippling to beginners who just get no print out (especially on
windows where the lilypond stdout/err is getting lost). And without
beginners, Denemo will never get users.
|[Prev in Thread]
||[Next in Thread]|
- [Denemo-devel] Spanners,
Richard Shann <=