denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Initialization code for scripts.


From: Richard Shann
Subject: [Denemo-devel] Initialization code for scripts.
Date: Fri, 05 Dec 2008 09:01:30 +0000

I've pushed code that allows scripts (and collections of scripts) to
have some initialization code that does not get evaluated every time the
script is called. The code is stored in files called init.scm in the
directory containing the commands that need it. A command can test to
see if it has been initialized and then run the initialization code if
need be. A global variable CurrentScript is set to the name of the
action that has invoked the currently running script, and the procedure
(d-InitializeScript CurrentScript) will execute the code in init.scm
belonging to the action that invoked the current script.

This has all been triggered by thinking about applying scripts
repeatedly (e.g. to each note in a selection) as opposed to the current
MIDI filter applications where the script only runs once, the looping
occurring inside the script.

I now have all the pieces in place to put Jeremiah's transpose script
into the command set.

Richard







reply via email to

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