[Top][All Lists]

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

[Denemo-devel] Diminish/Augment upgraded to work with selections (As exa

From: Nils
Subject: [Denemo-devel] Diminish/Augment upgraded to work with selections (As examples)
Date: Tue, 19 Jan 2010 23:08:11 +0100

With latest git you now can apply diminish/augment (keypad + and -) to whole 
selections as well as single notes. Non-Note/Chord/Rests object are ignored and 
do no harm to the rest of the script.
Multistaff selections are still missing but will work in the moment 
(d-NextSelectedObject) works with multiple staffs.

There is a new script that can be used to upgrade any existing script to work 
with selections automatically.
Documentation from denemo.scm:

;SingleAndSelectionSwitcher by Nils Gey Jan/2010
;Automatically applies a script to a whole selection. You can give different 
commands or command blocks with (begin) for single items or whole selections. 
You can enter a complete scheme script with (),  arguments and everything you 
would want to run standalone. Don't forget to escape chars like  \" . You can 
even use a complete (begin ) block.
;But attention! SingleAndSelectionSwitcher will still try to apply the given 
script to each of the single items alone. If you need a script which differs 
completly in beaviour for single/selection you have to write your own. You have 
to take out the (let loop () section for this and write your own selection part 
;The applied script itself has to take care if the command can be applied to 
each potential item. If you want only notes/chords/rests you have to make sure 
the script does not abort on other objects. Its the same as giving proper 
return values for a single item, just return #f if a command is not possible 
for an item. While a single item just returns an error if you don't do it 
correctly, but does no harm otherwise, a script applied to a selection will 
stop on that item and leaves you on half on the way.
;Return values are the return values the script itself gives.
;Example: (SingleAndSelectionSwitcher  "(d-ChangeDurationByFactorTwo *)" 
"(d-ChangeDurationByFactorTwo *)")

I will continue to rewrite the commands/scripts with SingleAndSelectionSwitcher 
where it makes sense and is easy to do.
But with every script upgraded the need for Undo gets more pressing.


reply via email to

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