151
Messages
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.
Messages - Warren Porter
152
General Discussion / Re: With a little help from my friends...
Quote
wscript Scripts\mmr.js <PROMPT:MMR?:=|Yes|Undo> <PROMPT:Options:=|HideAll|ShowAll|ShowBar|ShowRst|LayerHide>
Code: [Select · Download]
wscript "C:\Users\Porter Household\Documents\My Webs\javascript\mmr.js" <PROMPT:MMR?:=|Yes|Undo> <PROMPT:Options:=|HideAll|ShowAll|ShowBar|ShowRst|LayerHide>Before adding that line, click Browse to find the file, put "wscript " at the beginning and the prompts at the end. On mine, "wscript.exe" is in \Windows\System32.
HTH
153
General Discussion / Re: With a little help from my friends...
mmr.js
154
General Discussion / Re: Triplet of triplets
155
General Discussion / Re: Using accompaniment with a capella passages.
156
General Discussion / Re: Using accompaniment with a capella passages.
Sorry, Warren, but I miss the point.
Isn't obvious when the piano stops playing by looking at its empty staves?
And, in case you have only your part and not the full score, why add another staff just to show the small rests and not putting a simple mark when the piano stops?
157
General Discussion / Using accompaniment with a capella passages.
I know, I shouldda practiced this a lot more.
Thias Test
158
General Discussion / Re: Easy Search-Replace for 1 shape in a 7-shape shape-note score?
Code: [Select · Download]
/*
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);
Save it as unShape.js and follow installation steps at the top.
159
General Discussion / Rest Chords from midi files?
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)Is there a better way to fix this?
|Bar
|Note|Dur:4th|Pos:-3
|Chord|Dur:4th|Pos:#-8,-4
|Chord|Dur:4th|Pos:-8,-4,-2
|Bar
|RestChord|Dur:4th|Opts:Stem=Down,ArticulationsOnStem|Dur2:Half|Pos2:-3
|Chord|Dur:4th|Pos:#-8,-4|Opts:Stem=Down
|Chord|Dur:4th|Pos:-8,-4,-2
!NoteWorthyComposerClip-End
Related to this file, the first time through it is piano, second time forte. In addition there are crescendos and decrescendos. Would putting a p just before the open repeat with a f before the close repeat help with hairpins in place?
160
General Discussion / Re: Hidden MMRs and Spacers
Spacer.htm
Sorry I haven't converted that to a function yet. Open it at the same time NWC is running.
Click on "How to Use" for instructions. HTH
161
General Discussion / Re: Things I Don't Know
162
General Discussion / Re: Things I Don't Know
I find the visibility settings a little complicated for the multibar rest feature. For me it's always a bit of trial and error.
163
General Discussion / Re: Things I Don't Know
164
General Discussion / Re: When using TIE's over several notes, only the 1st one is heard when playing back
165
General Discussion / Re: Happy Birthday
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|Editor|ActiveStaff:1|CaretIndex:1|CaretPos:-1
|SongInfo|Title:"Birthday Cadenza"|Author:"Warren Porter"|Lyricist:""|Copyright1:"Copyright © 2000 by Warren Porter"|Copyright2:"All Rights Reserved"
|PgSetup|StaffSize:26|Zoom:5|TitlePage:Y|JustifyVertically:Y|PrintSystemSepMark:N|ExtendLastSystem:Y|DurationPadding:Y|PageNumbers:0|StaffLabels:None|BarNumbers:None|StartingBar:1|AllowLayering:N
|Font|Style:StaffItalic|Typeface:"Times New Roman"|Size:17|Bold:Y|Italic:Y|CharSet:0
|Font|Style:StaffBold|Typeface:"Times New Roman"|Size:13|Bold:Y|Italic:N|CharSet:0
|Font|Style:StaffLyric|Typeface:"Times New Roman"|Size:12|Bold:N|Italic:N|CharSet:0
|Font|Style:PageTitleText|Typeface:"Times New Roman"|Size:24|Bold:Y|Italic:N|CharSet:0
|Font|Style:PageText|Typeface:"Times New Roman"|Size:12|Bold:N|Italic:N|CharSet:0
|Font|Style:PageSmallText|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User1|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User2|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User3|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User4|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User5|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User6|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|PgMargins|Left:1.78|Top:0.25|Right:1.78|Bottom:2.29|Mirror:N
|AddStaff|Name:"Staff"|Label:"Staff"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:15|BoundaryBottom:15|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Patch:40|Trans:0|DynVel:10,30,45,60,75,92,108,127
|PerformanceStyle|Style:Legato|Pos:0|Visibility:Never
|Clef|Type:Treble
|Key|Signature:F#|Tonic:G
|TimeSig|Signature:3/4
|Dynamic|Style:f|Opts:Velocity=127,Volume=92|Pos:-8
|Tempo|Tempo:100|Pos:10
|Note|Dur:8th,Dotted|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:2
|Note|Dur:4th|Pos:5
|Bar
|Tempo|Tempo:48|Pos:10
|Note|Dur:32nd,Triplet=First,Slur|Pos:4|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:-1|Opts:Stem=Down,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:-3|Opts:Stem=Up,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:-5|Opts:Stem=Up,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:-8|Opts:Stem=Up,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:-5|Opts:Stem=Up,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:-1|Opts:Stem=Up,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Triplet=End|Pos:4^|Opts:Stem=Down,Beam=End
|Tempo|Tempo:100|Pos:10
|Note|Dur:4th|Pos:4
|TempoVariance|Style:Breath Mark|Pause:1|Pos:9
|Note|Dur:8th,Dotted|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:2
|Note|Dur:4th|Pos:6
|Bar
|Tempo|Tempo:48|Pos:10
|Note|Dur:32nd,Triplet=First,Slur|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:0|Opts:Stem=Down,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:-2|Opts:Stem=Up,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:-5|Opts:Stem=Up,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:-7|Opts:Stem=Up,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:-9|Opts:Stem=Up,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:-7|Opts:Stem=Up,Beam
|Note|Dur:32nd,Triplet=End,Slur|Pos:-5|Opts:Stem=Up,Beam=End
|Note|Dur:32nd,Triplet=First,Slur|Pos:-2|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,Triplet,Slur|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:32nd,Triplet=End|Pos:2|Opts:Stem=Down,Beam=End
|Tempo|Tempo:100|Pos:10
|Note|Dur:4th|Pos:5
|TempoVariance|Style:Breath Mark|Pause:1|Pos:8
|Note|Dur:8th,Dotted|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:9
|Note|Dur:4th|Pos:7
|Note|Dur:4th|Pos:5
|Bar
|Note|Dur:4th|Pos:4
|TempoVariance|Style:Fermata|Pause:2|Pos:9|Justify:Center|Placement:AtNextNote
|Note|Dur:4th|Pos:3
|TempoVariance|Style:Breath Mark|Pause:1|Pos:4
|Chord|Dur:8th,Staccato,Slur|Pos:3,8|Opts:Stem=Down,Beam=First
|Chord|Dur:16th,Staccato|Pos:3,8|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:4th|Pos:2,7
|Chord|Dur:4th|Pos:0,5
|Chord|Dur:4th|Pos:1,6
|Bar
|Dynamic|Style:mp|Opts:Velocity=127,Volume=60|Pos:9
|Chord|Dur:8th,Slur|Pos:-9,-5^|Opts:Stem=Up,Beam=First
|Chord|Dur:16th|Pos:-5,0^|Opts:Stem=Up,Crescendo,Beam=End
|Chord|Dur:Half,Dotted|Pos:0,5|Opts:Crescendo,Lyric=Never
|Dynamic|Style:ff|Opts:Velocity=127,Volume=108|Pos:-5
!NoteWorthyComposer-End
166
General Discussion / Measure numbers in viewer
167
Object Plugins / Primer for writing NWC Objects?
TIA
168
General Discussion / Slur into grace notes
Is there any way to notate this? Any workarounds?
TIA
169
General Discussion / Re: Support???
170
General Discussion / Re: Gliss going the wrong way
Thanks for looking at it.
171
General Discussion / Re: Gliss going the wrong way
TIA
172
General Discussion / Re: Gliss going the wrong way
173
General Discussion / Gliss going the wrong way
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)the violin is sliding from a C# down to a F# but the slide is going up. How do I fix this?
|Dynamic|Style:f|Pos:-11
|Note|Dur:Half|Pos:10^
|Note|Dur:8th,Dotted|Pos:10|Opts:Stem=Down,Beam=First
|Text|Text:"2"|Font:StaffItalic|Pos:13|Placement:AtNextNote
|Note|Dur:16th,Slur|Pos:7|Opts:Stem=Down,Beam=End
|Bar
|User|Glissando.ms|Pos:8|Text:|Weight:1.4
|Text|Text:"2"|Font:StaffItalic|Pos:14|Placement:AtNextNote
|Note|Dur:Half|Pos:9^|Opts:Diminuendo
|Note|Dur:8th,Dotted|Pos:9|Opts:Stem=Down,Diminuendo,Beam=First
|Text|Text:"1"|Font:StaffItalic|Pos:12|Placement:AtNextNote
|Note|Dur:16th,Slur|Pos:8|Opts:Stem=Down,Diminuendo,Beam=End
|Bar
|Text|Text:"1"|Font:StaffItalic|Pos:8|Placement:AtNextNote
|User|Glissando.ms|Pos:8|Text:|Weight:1.4
|Note|Dur:Half,Dotted|Pos:4^|Opts:Diminuendo
!NoteWorthyComposerClip-End
TIA
174
General Discussion / Re: Hidden Staffs
175
General Discussion / Re: New Strange Sound Issue
176
General Discussion / Re: Quintuplets?
177
General Discussion / User tools problem
178
General Discussion / Re: Swing rhythm
If you put them on top, they can also double as a system-break staff; and for collecting other general information - very helpful and organized e.g. if you need to extract voices. One day I'll explain how to work with it (and write a few small tools that should help even more).
179
General Discussion / Re: Stacked Rests
To hide a rest (or just about anything else on the staff) select it, Cntl/E, then Visibility tab. This is Rick's example hiding the eighth rest:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)You can hide the text rest the same way, but why? Text is never necessary for NWC to work so to hide it, take it out.
|Text|Text:""|Font:StaffSymbols|Pos:4|Justify:Center|Placement:AtNextNote
|Rest|Dur:8th|Opts:VertOffset=-4|Visibility:Never
|Note|Dur:8th|Pos:0
|Chord|Dur:4th|Pos:-1|Opts:Stem=Down|Dur2:4th|Pos2:4
!NoteWorthyComposerClip-End
180
General Discussion / Re: Left hand in treble clef
HTH
181
General Discussion / Fast forward and wait
Has anyone else run into this problem? Any workarounds?
TIA
182
General Discussion / Re: Hairpins
HTH
183
General Discussion / Re: An idea
184
General Discussion / Re: An idea
185
General Discussion / Re: Change the widge of measures?
186
General Discussion / Re: Italics again
Good luck!
P.S. You would have to take your italic words out of the staff lyric window.
187
General Discussion / Re: Multiple Rests (Please Help! I'm such a beginner)
Mike's method also works, this just automates the process and counts the measures for you.
188
General Discussion / Re: Switching Clef?
BTW, welcome to the forums.
189
General Discussion / Re: Switching Clef?
190
User Tools / Turn grace notes into real ones.
There is no undo with this so either save before using or on a copy from another staff.
Code: [Select · Download]
/* Notes to Rests by Warren Porter "graceFix.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' \graceFix.js" <PROMPT:Which?:=|Prev|Next>
This converts grace notes to real ones while reducing the duration of the previous object. First, copy an entire staff (which
you will make visible and muted) to the clipboard, create a new staff (will eventually be hidden and played),
then copy the clipboard to the new staff. Run this command on that new staff. Notes, chords, or rests which are followed
by grace notes will be shortened by the (total) duration of the grace notes and the grace attribute will be removed.
The original (and still on the displayed/muted staff) grace notes will now sound BEFORE the beat instead of ON the beat.
Change: You can take time from the note/chord AFTER the grace note(s) by chosing "Next"
*/
// Substitutions: Wscript.Arguments <-> parms
// Item(n) <-> [n]
var rc=0, errMsg="", Wscript_Arguments = new Array();
var NoteLengths = [ "Whole", "Half", "4th", "8th", "16th", "32nd", "64th", "128th", "256th", "512th", "1024th" ] ;
var SearchDur;
function getNoteLength(notelet) { // Returns duration of note , whole = 768
// var shell = new ActiveXObject("WScript.Shell");
parts = notelet.split(","), numParts=1;
var noteLength= -1, searchstr="";
searchstr = parts[0].substr(0,3);
//shell.Popup(parts[0])
switch (searchstr) {
case "Who" : noteLength = 768; break;
case "Hal" : noteLength = 384; break;
case "4th" : noteLength = 192; break;
case "8th" : noteLength = 96; break;
case "16t" : noteLength = 48; break;
case "32n" : noteLength = 24; break;
case "64t" : noteLength = 12; break;
default: noteLength = -1;
}
if (noteLength == -1)
return -1;
for (var i = 1; i < parts.length; i++) {
if (parts[i].substr(0,9) == "DblDotted") {
numParts=2;
noteLength = noteLength * 7 / 4; }
else
if (parts[i].substr(0,6) == "Dotted") {
numParts=2;
noteLength = noteLength * 3 / 2; }
else
if (parts[i].substr(0,7) == "Triplet") {
numParts=2;
noteLength = noteLength * 2 / 3; } }
SearchDur = (numParts == 1)? parts[0]: parts[0] + "," + parts[1]
return noteLength;
}
function doNext(clip) {
var i, durTable = new Array(), newDur, binString="", saveDur, subDur=0, durSub = new Array(), saveOrig, newStrings = new Array();
var lines = new Array(), result = new Array(), lastDur = 0, locDur=0, locGraceFst, locGraceLst, durGrace, sumGrace=0
var saveBar="", locBar= -1, wholeRest=768;
lines = clip.split("\n");
for (i=0; i < lines.length; i++) {
result=lines[i].match(/Dur:([^\|]*)/);
if (sumGrace && (result == null)) {
errMsg="Unattached Grace note";
rc=1;
return lines; }
if (result == null)
continue; // No duration, didn't follow grace note.
if (lines[i].indexOf("Grace") > 0) { // Found a grace note/chord
durGrace = getNoteLength(result[1]); // Find duration
sumGrace+= durGrace; // Sum of grace notes so far
lines[i]=lines[i].replace(",Grace",""); // Remove grace attribute
continue; }
if (!sumGrace) // If has duration, is not grace, and doesn't follow grace
continue; // Ignore
/*
At this point something with a duration follows (a) Grace Note/Chord(s) and its duration must be reduced
by sumGrace.
*/
lastDur = getNoteLength(result[1]);
saveDur = SearchDur;
newDur = (lastDur - sumGrace)
if ((newDur % 3) != 0) {
lines[i]+="\n|Text|Text:\"Can't do triplets.\"|Font:StaffItalic|Pos:10|Color:1"
break; }
newDur /= 3;
if (newDur < 4) {
errMsg="Note to convert isn't long enough, aborting.";
rc=1;
return lines;}
binString=""
for (var ii=0; ii < 9; ii++) { //Convert to binary
binString = (newDur % 2) + binString;
newDur = Math.floor(newDur/2); }
durTable.length = 0, subDur=0;
while (binString != "000000000") {
for (ii=0; ii < 3; ii++)
durSub[ii] = Number.POSITIVE_INFINITY;
result = binString.match("111")
if (result != null)
durSub[0] = result.index;
result = binString.match("110")
if (result != null)
durSub[1] = result.index;
result = binString.match("10")
if (result != null)
durSub[2] = result.index;
if (durSub[0] <= durSub[1] && durSub[0] <= durSub[2]) {
durTable[subDur++] = NoteLengths[durSub[0]] + ",DblDotted";
binString = binString.replace("111","000");
continue;}
if (durSub[1] < durSub[0] && durSub[1] <= durSub[2]) {
durTable[subDur++] = NoteLengths[durSub[1]] + ",Dotted";
binString = binString.replace("11","00");
continue;}
if (durSub[2] < durSub[0] && durSub[2] < durSub[1]) {
durTable[subDur++] = NoteLengths[durSub[2]];
binString = binString.replace("1","0");
continue;} }
// Code to manipulate durations goes here
saveOrig = lines[i]; // Save so can modify it several times if necess;
newStrings.length = 0;
for (ii = 0; ii < subDur;ii++) {
newStrings[ii] = saveOrig.replace(saveDur,durTable[ii]);
if (((subDur - 1) > ii) && (saveOrig.slice(0,6) != "|Rest|")) {
newStrings[ii] = newStrings[ii].replace(/(\d),/g, "$1^,"); ;
newStrings[ii] = newStrings[ii].replace(/$/, "^");
newStrings[ii] = newStrings[ii].replace("^^", "^"); } }
lines[i] = newStrings.join("\r\n");
sumGrace=0; } // So will not try to apply reductions again.
return lines;
}
function doPrev(clip) {
var i, durTable = new Array(), newDur, binString="", saveDur, subDur=0, durSub = new Array(), saveOrig, newStrings = new Array();
var lines = new Array(), result = new Array(), lastDur = 0, locDur=0, locGraceFst, locGraceLst, durGrace, sumGrace=0
var saveBar="", locBar= -1, wholeRest=768;
// lines = clip.split("\r\n");
lines = clip.split("\n");
for (i=0; i < lines.length; i++) {
if (lines[i].slice(0,4) == "|Bar") {
saveBar = lines[i];
locBar=i;
continue;
}
if (lines[i].slice(0,8) == "|TimeSig") {
result = lines[i].match(/re:(\d+)\/(\d+)/);
if (result != null)
wholeRest = 768 * result[1] / result[2];
continue; }
result=lines[i].match(/Dur:([^\|]*)/);
if (result == null)
continue;
if (lines[i].indexOf("Grace") == -1) { // Found something with duration not a grace note
lastDur = getNoteLength(result[1]);
saveDur = SearchDur;
locBar= -1; // This measure didn't start with (a) grace(s) note/chord.
locDur = i;
if (lines[i].slice(0,5) == "|Rest" && lastDur == 768)
lastDur = wholeRest; } // In case we need it.
else { // Found a grace note to convert
locGraceFst=i;
sumGrace=0;
for (locGraceLst=i; locGraceLst < lines.length; locGraceLst++) {
result=lines[locGraceLst].match(/Dur:([^\|]*)/);
var buggy = lines[locGraceLst].indexOf("Grace");
// if ((result == null) || (lines[locGraceLst].indexOf("Grace") > -1)) {// Doesn't have duration or not grace
// break; }
if (result == null)
break;
if (buggy == -1)
break;
durGrace = getNoteLength(result[1]);
sumGrace+= durGrace;}
locGraceLst--;
if (locDur > 0) { //There was something with duration earlier so will have to reduce it.
newDur = (lastDur - sumGrace)
if ((newDur % 3) != 0) {
lines[locGraceLst]+="\n|Text|Text:\"Can't do triplets.\"|Font:StaffItalic|Pos:10|Color:1"
break; }
newDur /= 3;
if (newDur < 4) {
errMsg="Note to convert isn't long enough, aborting.";
rc=1;
return lines;}
binString=""
for (var ii=0; ii < 9; ii++) { //Convert to binary
binString = (newDur % 2) + binString;
newDur = Math.floor(newDur/2); }
durTable.length = 0, subDur=0;
while (binString != "000000000") {
for (ii=0; ii < 3; ii++)
durSub[ii] = Number.POSITIVE_INFINITY;
result = binString.match("111")
if (result != null)
durSub[0] = result.index;
result = binString.match("110")
if (result != null)
durSub[1] = result.index;
result = binString.match("10")
if (result != null)
durSub[2] = result.index;
if (durSub[0] <= durSub[1] && durSub[0] <= durSub[2]) {
durTable[subDur++] = NoteLengths[durSub[0]] + ",DblDotted";
binString = binString.replace("111","000");
continue;}
if (durSub[1] < durSub[0] && durSub[1] <= durSub[2]) {
durTable[subDur++] = NoteLengths[durSub[1]] + ",Dotted";
binString = binString.replace("11","00");
continue;}
if (durSub[2] < durSub[0] && durSub[2] < durSub[1]) {
durTable[subDur++] = NoteLengths[durSub[2]];
binString = binString.replace("1","0");
continue;} }
// Code to manipulate durations goes here
saveOrig = lines[locDur]; // Save so can modify it several times if necess;
newStrings.length = 0;
for (ii = 0; ii < subDur;ii++) {
newStrings[ii] = saveOrig.replace(saveDur,durTable[ii]);
if (((subDur - 1) > ii) && (saveOrig.slice(0,6) != "|Rest|")) {
newStrings[ii] = newStrings[ii].replace(/(\d),/g, "$1^,"); ;
newStrings[ii] = newStrings[ii].replace(/$/, "^");
newStrings[ii] = newStrings[ii].replace("^^", "^"); } }
lines[locDur] = newStrings.join("\r\n"); }
for (ii = locGraceFst; ii <= locGraceLst; ii++)
lines[ii]=lines[ii].replace(",Grace","");
if (locBar > -1) {
lines[locGraceLst]+= "\n" + saveBar; // Add barline after the grace notes
lines[locBar] = "#"; } // Turn original bar into a comment.
if (locDur == 0)
lines[locGraceLst]+="\n|Bar\n|Text|Text:\"New bar added\"|Font:StaffItalic|Pos:8|Color:1";
i=locGraceLst; // So won't try to redo the same string of grace notes.
}
} //End main processing loop
return lines;
}
var myLines;
if (WScript.Arguments.length != 1) {
errMsg="NO Prompt read.";
rc=1; }
else {
if (WScript.Arguments.Item(0).slice(0,4) == "Prev")
myLines=doPrev(WScript.StdIn.ReadAll()).join("\r\n");
else
myLines=doNext(WScript.StdIn.ReadAll()).join("\r\n"); }
if (rc == 0)
WScript.StdOut.Write(myLines);
else
WScript.StdErr.Write(errMsg);
WScript.quit(rc);
Edit: Change documentation in first few lines of the script.
191
General Discussion / Re: Looking for portamente
192
General Discussion / Re: Tremolo and Note Value.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Clef|Type:Treble
|Key|Signature:Bb,Eb,Ab|Tonic:C
|TimeSig|Signature:6/8
|Note|Dur:16th,Accent|Pos:-9|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam=End
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam=First
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:16th,Accent|Pos:-9|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam=End
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam=First
|Chord|Dur:16th|Pos:-4,1|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Chord|Dur:16th|Pos:-9,-4|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-9|Opts:Stem=Up,Beam=End
!NoteWorthyComposerClip-End
193
General Discussion / Re: Tremolo and Note Value.
194
General Discussion / Re: Tremolo and Note Value.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Clef|Type:Treble
|Key|Signature:Bb,Eb,Ab|Tonic:E
|Note|Dur:16th|Pos:#-3|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam=End
|Bar
|Note|Dur:16th|Pos:#-3|Opts:Stem=Up,Beam=First
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:-1|Opts:Stem=Up,Beam=End
|Bar
|RestChord|Dur:4th,Dotted|Opts:Stem=Up,Muted,HideRest|Dur2:Half,Dotted,Accent|Pos2:#4
|User|Tremolo.ms|Pos:0|Beams:2|TripletPlayback:Y
|RestChord|Dur:4th,Dotted|Opts:Stem=Up,Muted,HideRest|Dur2:Half,Dotted|Pos2:6
|Bar
|Note|Dur:16th|Pos:#4|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:16th|Pos:#4|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:6|Opts:Stem=Down,Beam=End
|Bar
!NoteWorthyComposerClip-End
195
General Discussion / Re: Looking for portamente
Go here: nwc-scriptorium.org/helpful.html and download gliss.nwc. It isn't a straightforward process since you can only glide a few semitones at a time and hidden staves have to do it like a relay.
196
General Discussion / Stuck pedal makes other part stacatto.
TIA
197
General Discussion / Re: Request help to update links in older posts
198
General Discussion / Re: Convert Violin score to Viola score?
Edit: change 'key' to 'clef' in first sentence.
199
General Discussion / Re: Convert Violin score to Viola score?
200