Like this? Installation instructions are on lines 11-15 of the following:
/*
unShape.js by Warren Porter
Un-shape Tool
This tool will remove the shape attribute
This tool can operate on ONLY a selected part of a staff, or, if nothing has been selected, the entire staff.
To install:
1) Save this file with the name unShape.js on your computer and remember its location.
2) Start NWC and press Alt/F8. Pick new
3) After choosing a name and group, browse for this file and click "Open".
4) Insert "wscript " at the beginning of the command.
5) Clip text should be selected and check no options.
*/
rc=0, errMsg="";
function doProcess(clip) {
var displ=0, upDispl=0;
var result = new Array();
var lines = clip.split("\r\n");
for (i = 1; i < lines.length; i++) { // Main processing loop
if (/Fake/.test(lines[i]))
lines[i] = "#";
else {
result = lines[i].match(/(\|Note.*Pos:)([n#bvx]?)(-?\d+)([a-h])(\^?)(.*)$/) // 1. Note thru Pos 2. Accidental 3. Position 4. Shape 5. Ties 6. To end of line
if (result != null) {
lines[i] = result[1] + result[2] + result[3] + result[5] + result[6] }
} } // End main loop
return lines;
}
var myLines;
myLines=doProcess(WScript.StdIn.ReadAll()).join("\r\n");
if (rc == 0)
WScript.StdOut.Write(myLines);
else
WScript.StdErr.Write(errMsg);
WScript.quit(rc);
It works on notes only--no chords, restchords, etc.