NWC2 Scripts - Scratch


Author: Andrew Purdam.

Comments to NoteWorthy Composer Forum

Download: v1.1.3 Beta 24/05/05

(Rightclick and Save Target As... to your NWC2 Scripts folder as scratch.php)

Briefly: Cut/copy/paste/merge using a scratch file. Cut or copied data is saved to a file called SCRATCH.TXT in the folder that the tool runs in (normally the NWC2 program folder).
Usage: php scratch.php <action> [<type>,<comparison>,...]
Parameters:
<action>is either
cut - delete the matching objects (replaces time-consuming notes with rests)
copy - copy matching objects to scratch
merge - merge scratch with this staff
paste - paste scratch onto end of this staff
<type>
is eg Note, Chord, Clef, Key, TimeSig, Dynamic etc, or the reserved word "ALL". Note that keywords are case sensitive.
<type> and <comparison> function only for the cut and copy actions.
<comparison> is of form
<opt>, meaning the named option is present or
<opt>==<value>, meaning that <opt> is the given value, or value is present if opt is an array. or
<opt><=<value>, meaning that the single value of opt is LTE value, ditto >, <, >= and !=
NB: If <opt> is <opts>.<subopt> it will deal with subopt as a subtype of opt. eg Dur.Dotted or Opts.VertOffset>=0 If no type or comparison is made, everything will be copied or cut.
Additional Help :
Scratch   Invocation Instructions   These are pdf documents
Comments: For example:
To merge two staves:
1) Select first stave. Use
php scratch.php copy Note Chord
2) Select stave to merge to. Use
php scratch.php merge This tool is still in beta test. It has a fair bit of trouble merging complex chords. You are warned!
History: 1.1 Finally released for public beta testing
1.1.1 Fixed some bad bugs in merging notes with chords
1.1.2 Continued to fix bugs in merging chords/restchords
1.1.3 Fixed bug in merging notes of equal line, but differing accidental status