denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Internal tags/markers needed for a new kind of selection.


From: Nils Gey
Subject: [Denemo-devel] Internal tags/markers needed for a new kind of selection.
Date: Wed, 1 Jun 2011 01:20:34 +0200

Hello list,

as mentioned briefly in IRC today I came to the conclusion that we
need a second kind of selection which is not a range from start to end
but where each item is tagged/marked as part of the selection until the
processing is finished.

This is needed for any destructive work with
selections, mostly inserting or deleting notes.

One way to achieve this is to have a temporary tag that can be applied
to any object in the score without difference. An object is anything
that can be placed, selected and deleted (or in other words anything
that reacts to d-GetType): notes, rests, chords, tuplet markers,
stand-alone directives, voice-directives, clefs, keysigs etc.

These tag must be different from the directive-tags for two reasons
1)Directive tags have a logical meaning connected to the music and
output, the new tags are purely technical and internal.

2)Handling directive tags is overly complex because you have to handle
so many cases and in the end, or if something goes wrong, you may have
tags on all objects. (see P.S.)

Conclusion:
A new tag, invisible to the user, lilypond and the "real" tag/directive
system is a good and direct way to apply all possible functions to a
selection. From "delete" over "split" to out-written embelishments.

These tags would be generated from the normal selection by a scheme
script. They shold be as temporary as possible, like the original
selection is. By no means they should be saved in the .denemo file. I
think they could even deleted automatically after a function (which may
call other functions) has finished. But even if they have to be deleted
manually (in the script while processing) please as simple as possible.
No custom name, no additional attached data. Just (d-Tag) (d-Untag)
(d-Tagged?) and if you look away they vanish into thin air :)

Greetings, 
Nils


P.S.
I have written one or two scripts with those work-around directive-tag
markers already. Most important d-DeleteSelectionLeaveEmpty. Its
horrible! Most of the code in there is just deciding which type of
object the current one is and using a different function to attach a
directive, or rename and delete the one in case of a stand-alone
directive. A new type of tags would reduce this to a few lines.




reply via email to

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