257
Perhaps something like this?!?:
!NoteWorthyComposerClip(2.75,Single)
|Clef|Type:Bass
|Note|Dur:32nd,Grace,Slur|Pos:b5|Opts:Muted|Visibility:Never
|Note|Dur:8th|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:5|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End
295
Just tried it out. This is what went in:
!NoteWorthyComposerClip(2.51,Single)
|Note|Dur:16th|Pos:0|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:2|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:5|Opts:Stem=Up,Beam=End
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:0|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Up,Beam=End
|Chord|Dur:8th|Pos:-2,1,#3|Opts:Stem=Up|Dur2:8th|Pos2:-9,-6,#-4
|Rest|Dur:8th|Opts:Stem=Down
|Chord|Dur:8th,Accent|Pos:-13,-6|Opts:Stem=Down|Dur2:8th|Pos2:1,8
|Rest|Dur:8th,Accent|Opts:Stem=Up
!NoteWorthyComposerClip-End
And what came out:
!NoteWorthyComposerClip(2.51,Single)
|Note|Dur:16th|Pos:-12|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-11|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-10|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:16th|Pos:-13|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-12|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-11|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-8|Opts:Stem=Up,Beam=End
|Text|Text:"\}Chord\}Dur:8th\}Pos: ..."|Font:StaffBold|Pos:8|Wide:Y
|Rest|Dur:8th|Opts:Stem=Down
|Chord|Dur:8th,Accent|Pos:-25,-18|Opts:Stem=Down|Dur2:8th|Pos2:-11,-4
|Rest|Dur:8th,Accent|Opts:Stem=Up
!NoteWorthyComposerClip-End
Thanks for submitting it, it looks useful. Any plans to add other clefs?
I haven't studied your code, but it seems other clefs could be added easily. Each one has an offset from middle C so the difference between clef offsets plus or minus any octave shift would give the Pos: change for all other objects.
298
When a note requires constant effort (moving bow, column of air) to produce, it's volume can change with a cresc., decres., or hairpins, but velocity and volume must be specified on each dynamic. Save the following under the name "dynamic.js". Installation instructions are shown on the first four lines.
/* Dynamic Velocity by Warren Porter "dynamic.js"
After downloading this file, when setting it up in NWC User Tools create this command line:
wscript "'Browse can insert the path for you' \dynamic.js" <PROMPT:DYN?:=|Yes|Undo> <PROMPT:Dynamics:=*127,108,92,75,60,45,30,10>
*/
// Substitutions: Wscript.Arguments <-> parms
// Item(n) <-> [n]
var rc=0, errMsg="";
function calculate(clip) {
var dyn_table = [ "fff", "ff", "f", "mf", "mp", "p", "pp", "ppp" ]
var dyn_vol1 = new Array();
var i, j, OutText = "", relPos=0, absPos=0, goSwitch=false, dynSuffix;
var lines = new Array(), result = new Array();
// lines = clip.split("\n"); // As webpage
lines = clip.split("\r\n");
if (WScript.Arguments.length != 2) {
errMsg="Needs option to override velocity or undo it as well as default dynamic levels";
rc=1;
return lines; }
if (WScript.Arguments.Item(0) == "Undo") {
for (j = 0; j < lines.length; j++) {
if (lines[j].slice(1,8) == "Dynamic")
lines[j]=lines[j].replace(/\|Opts[^\|]*\|/,"|"); }
return lines;
}
// First, break down the 2nd parm
dyn_vol1 = WScript.Arguments.Item(1).split(",");
if (dyn_vol1.length != 8 ) {
errMsg="I need eight dynamic levels, the 2nd prompt was " + WScript.Arguments.Item(1);
rc=1;
return lines; }
for (j = 0; j < lines.length; j++) { // Main processing loop
var str = lines[j];
result = str.match(/\|Dynamic\|Style:(mf|mp|[fp]{1,3})\|Pos:/)
if (result == null)
continue;
switch (result[1]) {
case "fff":
i=0; break;
case "ff":
i=1; break;
case "f":
i=2; break;
case "mf":
i=3; break;
case "mp":
i=4; break;
case "ppp":
i=7; break;
case "pp":
i=6; break;
case "p":
i=5; break;
default: errMsg="switch failed on " + result[1]; rc=1; return lines; }
var newstr="|Dynamic|Style:" + dyn_table[i] + "|Opts:Velocity=127,Volume=" + dyn_vol1[i] + "|Pos:"
str = str.replace(result[0],newstr);
lines[j] = str;
} // end of lines[j] loop;
return lines;
}
var myLines=calculate(WScript.StdIn.ReadAll()).join("\r\n");
if (rc == 0)
WScript.StdOut.Write(myLines);
else
WScript.StdErr.Write(errMsg);
WScript.quit(rc);