Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - Warren Porter

1
General Discussion / Question on tremelo
I am trying to transcribe a two note tremolo on each note. Using TremoloSingle I can create one extra flag on each note, but is there a way to put two staccato dots on each note? Also, when using that object, the first note has a duration 2 or 3 times longer than the 2nd note.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Tempo|Tempo:108|Text:"Pas vite (gai)"|Pos:14
|Clef|Type:Treble
|Key|Signature:F#,C#,G#,D#,A#|Tonic:B
|TimeSig|Signature:2/4
|Tempo|Tempo:36|Pos:7
|Note|Dur:8th,Tenuto|Pos:-6|Opts:Stem=Up,Beam=First
|Note|Dur:8th,Tenuto|Pos:-6|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:-9|Opts:Stem=Up,Beam=First
|Note|Dur:64th,Slur|Pos:n-8|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-7|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-6|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-5|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-4|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-3|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:-2|Opts:Stem=Up,Beam
|Note|Dur:64th,Slur|Pos:n-1|Opts:Stem=Up,Beam=End
|Bar
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=First|Pos:0|Opts:Stem=Down,Beam=First
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet|Pos:1|Opts:Stem=Down,Beam
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=End|Pos:n2|Opts:Stem=Down,Beam=End
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=First|Pos:3|Opts:Stem=Down,Beam=First
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet|Pos:4|Opts:Stem=Down,Beam
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=End|Pos:n5|Opts:Stem=Down,Beam=End
|Bar
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=First|Pos:n6|Opts:Stem=Down,Beam=First
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet|Pos:7|Opts:Stem=Down,Beam
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=End|Pos:8|Opts:Stem=Down,Beam=End
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=First|Pos:#9|Opts:Stem=Down,Beam=First
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet|Pos:10|Opts:Stem=Down,Beam
|User|TremoloSingle.ms|Pos:-2|Beams:1
|Note|Dur:8th,Triplet=End|Pos:#10|Opts:Stem=Down,Beam=End
|Bar
!NoteWorthyComposerClip-End

Thanks in advance.
2
User Tools / Problem with my webpages on Scriptorium
I am really embarrassed that several webpages on Scriptorium didn't work until today. The pages ClearStaff, MoveChord, nummeas, Pentuplets, spacepart, and Triplets all used a function in the file notelength.js which I had forgotten about.

To test nwc-scriptorium.org/wp/pentuplets.html, open the webpage and attached file in different windows. Enter Alt/Tab to go from one window to the other and your cursor will be where you left it.
  • Copy the tempo into Tempo Here.
  • Copy the pentuplets (red notes) into the Textarea.
  • Choose the Tuplet Staff radio button and hit Submit. The Textarea will now have hidden tempo changes at the front and back ends of the notes with a 5 over the middle.
  • Change the radio button to Played (hidden) Staff.
  • Copy the lime green notes into the Textarea and hit Submit. Each note will be tied to a note with a quarter of its duration.
  • Click on Restore Last, choose Displayed (muted) Staff, and Submit.
  • The same notes will be in the Textarea, each followed with a hidden rest with a quarter of its duration.
Please let me know if you have any problem with this or anything else on that page.
3
General Discussion / What is 2 Ped.
I am transcribing a work by a French composer and the bass staff of the piano starts with 2 Ped. Besides Pedal Down, and Pedal Release, what else needs to be done?

Also, what is a good midi channel for a muted violin? I've been listening to patchtest.nwc (from nwc-scriptorium.org) and 64 is the only one that sounds close.

TIA
4
General Discussion / NWC won't open downloads
NWC won't open files found in my downloads folder. When I click on an *.nwc file, NWC starts but there is no file appearing in the work area.  The same thing happens when I open NWC first, choose open and navigate there.

Any ideas as to what happened? TIA
5
General Discussion / Script Bug Challenge
I haven't touched my fiddle in quite a while and noticed I was getting intonation problems. One idea to work on that would be to play the note, then the note would play through NWC and midi and I could hear if my note was in tune.

This is the working part of my script, it determines half the duration of the note and creates a rest followed by the note with it:
Code: [Select · Download]
function calculate(clip) {
  var i, saveDur, saveDurB, saveDurE;
  var lines = new Array(), result = new Array(); 
  lines = clip.split("\r\n");

  for (i=0; i < lines.length; i++) {
      result=lines[i].match(/(.*Dur:)([^\|]*)(.*$)/);
  if (result == null)
  continue;  // No duration, didn't follow grace note.
  if (lines[i].indexOf("Grace") > 0) {  // Found a grace note/chord
        continue;  }
  if (lines[i].indexOf("Rest") > 0) {  // Found a rest, ignore
        continue;  }
// shell.popUp(lines[i]);
saveDur = result[2];
//shell.popUp(saveDur);
saveDur = saveDur.replace("32nd","64th");
saveDur = saveDur.replace("16th","32nd");
saveDur = saveDur.replace("8th","16th");
saveDur = saveDur.replace("4th","8th");
saveDur = saveDur.replace("Half","4th");
saveDur = saveDur.replace("Whole","Half");
shell.popUp(saveDur);
   // thisDur = getNoteLength(saveDur);
   // shell.popUp(saveDur);
// Code to manipulate durations goes here
saveDurB = saveDur.replace("=End",""); // In case of triplets.
saveDurE = saveDur.replace("=First",""); // In case of triplets.
lines[i] = "|Rest|Dur:" + saveDurB + "\r\n" + result[1] + saveDurE + result[3];
    }
  return lines;
So far, so good except it changes a 32nd note to a 68th note.
This was my test data:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|MPC|Controller:vol|Style:Linear Sweep|TimeRes:Sixteenth|SweepRes:1|Pt1:0,127|Pt2:1,123|Pt3:1,120|Pos:-6
|DynamicVariance|Style:Sforzando|Pos:-8
|Note|Dur:8th,DblDotted,Slur|Pos:n-3|Opts:Stem=Up,Beam=First
|Note|Dur:32nd|Pos:-4|Opts:Stem=Up,Beam=End
|Note|Dur:4th|Pos:-4^
|Note|Dur:8th|Pos:-4
|Note|Dur:4th,Tenuto|Pos:-3
|Note|Dur:8th,Tenuto|Pos:-3
|Bar
!NoteWorthyComposerClip-End
Please hold off 24 hours after this is posted to let others take a shot at it.
6
User Tools / Repeated Measures
This tool allows the user to repeat a measure many times. After selecting the measure to be repeated, there will be a prompt for the total number of times that measure will be played. For example, if you answer 10 to the prompt, the measure will be repeated 9 times showing only bar lines, the repeat measure sign, and repetition number on every 4th bar.

Staff Bold is 0.5 the size of Staff Metrics and Boxmark2 under User1 is 1.375 that of Staff Metrics.

 wscript "'Browse can insert the path for you' \repMeas.js <PROMPT:Tot Times?=#>"
     Suggested path \Program Files (x86)\Noteworthy Software\Noteworthy Composer 2\Scripts\

Rename the attachment removing .txt before installing.

This was my sample file, but you will have to change the User1 font if it doesn't contain Boxmark2.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Clef|Type:Treble
|Key|Signature:F#|Tonic:G
|TimeSig|Signature:5/4
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:-2
|Note|Dur:8th|Pos:-4
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-7
|Note|Dur:4th|Pos:-5
|Bar
!NoteWorthyComposerClip-End

You may need to change lines 58 and/or 59 to use a different font or User font number.
Enjoy!
** Updated attachment 02/28/2024 **
7
User Tools / Examine clipboard
When working on a script for a NWC tool, it can be helpful to see what is being passed to the script, especially the Fake and Context lines. This reads the clipboard and copies it to StdErr where a return code of 1 will display it. I called it seeClip.js:
Code: [Select · Download]
WScript.StdErr.Write(WScript.StdIn.ReadAll());
WScript.quit(1);

Create the file in your usual Scripts folder (must end in .js). When installing it as a new script, browse for the name of it, then add "wscript " (note trailing space) to the beginning of the line. No prompts.

8
User Tools / Audit Bar Lines tool
The Audit Bar Lines tool that NWC provides assumes the note lengths are correct and it will move the bar lines if necessary.
This tool assumes the bar lines are correct and will point out the measures that are short or long in beats defined by the most recent Time Signature.

After downloading this file, please remove the .txt from the end of the file name.

I'll submit it to Scriptorium in a few weeks after I can check feedback.

*** Attachment replaced 12/21/2023. ***
Latest changes: Does not count bar lines excluded from count or empty measures.
*** Attachment replaced 12/22/2023. ***
*** Attachment replaced 12/24/2023. ***
Multi measure rests, Whole rest by itself works for any time signature.
*** Attachment replaced 01/01/2024 ***
Better documentation--cleaned up potential bug.
*** Attachment replaced 01/22/2024 ***
Selecting part of staff just before a bar line could throw the measure count off.
*** Attachment replaced 01/30/2024 ***
Line 96, changing "whole note" to "whole rest"
*** Attachment replaced 03/31/2024 ***
9
General Discussion / Normalizing MIDI files
In most music, especially popular music, 32nd and 64th notes are extremally rare but are all to frequent in downloaded midi files. Is there any way to fix this?  My guess is they come when someone is playing to create a midi file and their timing isn't perfect (whose is?) or middle notes in a guitar chord for example.

These are some sample measures (treble clef, E major)
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Rest|Dur:Half,Dotted
|Chord|Dur:4th|Pos:-2,1
|Bar
|Chord|Dur:4th,Dotted|Pos:-1,1
|Chord|Dur:8th|Pos:-1^,1^
|Chord|Dur:4th|Pos:-1,1|Opts:Stem=Down
|Note|Dur:16th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam
|Note|Dur:64th|Pos:n1|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted|Pos:#1|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:Half,Dotted|Pos:1,3
|Chord|Dur:8th|Pos:1,3|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:1,3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End


TIA
10
Tips & Tricks / My former NWC website
I thank Richard Woodroffe for hosting the NWC part of my old website on nwc-scriptorium.

If you have a problem with anything on that page, please let me know what you were trying to do and include the nwc or nwctxt file if appropriate. I won't ask Rich to make changes to my site more than once a month.
11
General Discussion / Up and Down beams on same set of notes
I am trying to beam the eighth (dotted) notes in the following snippet:
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Chord|Dur:16th,Slur|Pos:5|Opts:Stem=Up,Beam=First,XDotSpace=-1|Dur2:8th,Dotted|Pos2:-1
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Up,Beam=End
|Chord|Dur:16th,Slur|Pos:5|Opts:Stem=Up,Beam=First,XDotSpace=-1|Dur2:8th,Dotted|Pos2:-1
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Up,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Up,Beam=End
!NoteWorthyComposerClip-End
Can this be done with an object now? I don't want to add a hidden staff if at all possible.
TIA
13
General Discussion / Shutting down my website
I regret to announce that I will be shutting down my website later this month. If there are any pages or scripts you use frequently or used to use that don't work as well now, please let me know now. I'll do my best to debug / document what I can before pulling the plug.

Richard has offered to host my NWC folder on Scriptorium and I thank him for that.

wjporter.com/nwc
14
General Discussion / Fermatas vs Arpeggios
In this snippet I have a fermata in the last measure where a chord in the piano is arpeggiated. When played, there are a few extra notes added to the measure.

Is there any way to make this work or workaround?

TIA
15
General Discussion / Hiding objects on a staff
Without going through the process of hidden-played, muted-displayed staves for every part, is there a way to make the following look like pentuplet 16ths by hiding the top beam and the dots on 32nd notes?
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Key|Signature:F#,C#,G#,D#|Tonic:E
|Note|Dur:32nd,Dotted,Slur|Pos:8|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,DblDotted,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:32nd,DblDotted,Slur|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:-2|Opts:Stem=Down,Beam=End
|Note|Dur:32nd,Dotted,Slur|Pos:-6|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,DblDotted,Slur|Pos:-2|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:32nd,DblDotted,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted|Pos:5|Opts:Stem=Down,Beam=End
|Note|Dur:32nd,Dotted,Slur|Pos:8|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,DblDotted,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:32nd,DblDotted,Slur|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:-2|Opts:Stem=Down,Beam=End
|Note|Dur:32nd,Dotted,Slur|Pos:-6|Opts:Stem=Down,Beam=First
|Note|Dur:32nd,DblDotted,Slur|Pos:-2|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted,Slur|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:32nd,DblDotted,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:32nd,Dotted|Pos:5|Opts:Stem=Down,Beam=End
|Bar
!NoteWorthyComposerClip-End

Thanks in advance.
16
General Discussion / Duration parts in NwcTxt
When something on the staff has a duration, can there be anything else in the Dur: field outside of note length, dot or triplet status, and presence of a slur?  If I need to change the duration of a note or chord, I need to keep the slur intact.

Anything else to be on the alert for? I need to clear this up before converting ThreeEight.html to a user tool.

TIA
17
General Discussion / Christmas humor.
I saw this in a Music Humor group--the copyright notice gave the right to share, so I swapped out the lyrics. Don't know how to not play the refrain in verses 2 and 3 though.
18
General Discussion / Is the NWC Viewer/Player available as a webpage
Quite a few years ago there was a NWC page that played the Mendelssohn Violin Concerto without the need for the user to have any NWC product installed. Is there anything like that now and, if so, how would it be directed to play the specified .nwc file?

TIA

This is how it looks on another system: score.
21
Tips & Tricks / Guidelines for posting in Tips & Tricks
If you have a useful technique, script, function, or object  to share with other NWC users, this is the place to post it.  If you want to know "How do I ..." please put it in the General Discussion section.
TIA
22
General Discussion / Flow problem
In transcribing a minuet, the Trio consists of two repeated sections. The first part repeats with no problem but the second part goes da capo after only playing once.
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|Editor|ActiveStaff:1|CaretIndex:1|CaretPos:0
|SongInfo|Title:"Eine Kleine Nachtmusik K. 525 2 - Romanze"|Author:"Mozart"|Lyricist:""|Copyright1:""|Copyright2:""|Comments:"Transcription: Warren Porter"
|PgSetup|StaffSize:18|Zoom:4|TitlePage:Y|JustifyVertically:Y|PrintSystemSepMark:N|ExtendLastSystem:N|DurationPadding:Y|PageNumbers:1|StaffLabels:First System|BarNumbers:Boxed|StartingBar:0
|Font|Style:StaffItalic|Typeface:"Times New Roman"|Size:11.45|Bold:Y|Italic:Y|CharSet:0
|Font|Style:StaffBold|Typeface:"Times New Roman"|Size:8.18|Bold:Y|Italic:N|CharSet:0
|Font|Style:StaffLyric|Typeface:"Times New Roman"|Size:8.18|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:"AR DECODE"|Size:72|Bold:N|Italic:N|CharSet:1
|Font|Style:User2|Typeface:"Times New Roman"|Size:5|Bold:N|Italic:N|CharSet:0
|Font|Style:User3|Typeface:"Times New Roman"|Size:5|Bold:N|Italic:N|CharSet:0
|Font|Style:User4|Typeface:"Times New Roman"|Size:5|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:2.54|Top:2.54|Right:2.54|Bottom:2.54|Mirror:N
|AddStaff|Name:"Conductor"|Group:"Standard"
|StaffProperties|EndingBar:Master Repeat Close|Visible:Y|BoundaryTop:10|BoundaryBottom:10|Lines:1|WithNextStaff:Layer|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:6
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|TimeSig|Signature:3/4
|Spacer|Width:125
|Tempo|Tempo:168|Text:"Allegretto"|Pos:10.5
|Rest|Dur:4th|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Half|Visibility:Never
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|Style:MasterRepeatOpen|XBarCnt:Y
|Rest|Dur:4th|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Half|Visibility:Never
|Flow|Style:Fine|Pos:-8|Wide:Y
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|Style:MasterRepeatOpen|XBarCnt:Y
|Text|Text:"Trio"|Font:PageTitleText|Pos:10.5
|Rest|Dur:4th|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Half|Visibility:Never
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|Style:MasterRepeatOpen|XBarCnt:Y
|Rest|Dur:4th|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Whole|Visibility:Never
|Bar|Visibility:Never
|Rest|Dur:Half|Visibility:Never
|Flow|Style:DCalFine|Pos:-7|Wide:Y
!NoteWorthyComposer-End
How do I get the last section to repeat?
TIA
23
General Discussion / Reading staff symbols
I am working on a function looking for accidentals as text in StaffCueSymbols. Sometimes it is only one character, sometimes it is three high ASCII characters. When I used stdErr for debugging, I get a character looking like a lowercase m with something dragging to the right (see picture).  What is that character?  Is it possible to read and interpret the text for a special font?

In the following code saveText is the content of the quoted character(s) without spaces.
Code: [Select · Download]
	switch(saveText) {
case "e":
case "?":
case "∩üÑ":  //Natural
    saveAcc = "n";
break;
case "f":
case "∩üª":  //Flat
    saveAcc = "b";
break;
case "d":
case "∩üñ":  //Sharp
    saveAcc = "#";
break;
case "g":             // Double sharp
case "":
    saveAcc = "x";
break;
case "h":             // Double Flat
case "":
    saveAcc = "v";
break;
default:
    errMsg+= ti + "->" + saveText + "<- " + lines[i] + "\n";
    errMsg += "Couldn't find accidental in " + lines[ti], rc = 1; return lines; // change += to = when live
}
24
General Discussion / Object for turns
I am trying to avoid adding a hidden/played staff to a 4 part piece I'm transcribing. The objects work well for trills and tremolos, but is there something to do turns?  If not, what is a good resource for writing objects in lua?

Attached is a short example.

TIA
27
General Discussion / Rest Chords from midi files?
Yesterday, to help celebrate our anniversary, I visited Let Me Call You Sweetheart to get a midi file from which to start.  On the Sheet Music tab, RestChords in the right hand piano part are used in the majority of the song but on the midi file these are nowhere to be found--just a quarter note starting most measures that cuts off on the 2nd beat.  I changed the first measure into the second measure in the following with a recorded keystroke macro working with a nwctxt version of the song.
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|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
Is there a better way to fix this?

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?
29
Object Plugins / Primer for writing NWC Objects?
I am trying to grasp the trill object and while I understand parts of it, I am a long way for having a handle on it.  Is there a primer or template for creating an object to add, remove, or change what NWC would normally show or print?  Same for what happens during playback?  Is there a library of functions with instructions on how and when to use them?

TIA
30
General Discussion / Slur into grace notes
On bowed string instrument, a slur indicates a number of notes to be played on one bow. In this section, a half note slurs into a number of grace notes but the bow changes direction on the next measure.

Is there any way to notate this?  Any workarounds?

TIA
31
General Discussion / Gliss going the wrong way
In this snippet from Souvenir
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|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
the violin is sliding from a C# down to a F# but the slide is going up.  How do I fix this?
TIA
32
General Discussion / User tools problem
I just replaced nummeas.js on my NWC Tools page after someone told me it wasn't working.  If you have a problem with something on that page, please let me know and I'll take a look at it.
33
General Discussion / Fast forward and wait
When using NWC for accompaniment, there are a capella passages (like a cadenza) or the other instrument hasn't come in yet such as Ashokan Farewell before the guitar enters.  Someone else would hit the "Resume" key (or soloist with a foot pedal) when the accompaniment returns.

Has anyone else run into this problem?  Any workarounds?

TIA
34
User Tools / Turn grace notes into real ones.
This script turns grace notes into real ones and steals time from either the prior note or the following one.

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.
35
General Discussion / Stuck pedal makes other part stacatto.
I was revisiting a Grieg sonata I worked on quite a few years ago to put pedal markings in it.  The last pedal mark I had was down and until I fixed it the violin part had nothing but short notes, regardless of note lengths and slurs.  A score review showed each staff with a different midi channel (not 10).  Any idea why?

TIA
36
Tips & Tricks / Swapping between 4 and 2 staves for a chorus.
Printed scores for (especially) major choral works may alternate between one staff per part (i.e., a fugue) or having sopranos and altos sharing a staff with tenors and basses doing likewise for a chorale.  This may seem impossible to do in NoteWorthy since a staff is either layered or unlayered for the whole file.

The workaround is to give sopranos and tenors an extra staff each--the top one stands alone and the bottom one is layered with the next part.  By using boundary collapse commands and stop boundary collapse commands on either side of a bar line, the two soprano and tenor parts will never be on the printed parts at the same time.  They should also share the same midi channel and use the same midi patch (like Choral Aahs).

When two parts share (by layering) a staff, it will be necessary to force stem direction and perhaps slur and tie direction as well.  Also, extra space may be needed for notes and/or accidentals when the notes are too close to each other otherwise.  See the attachment for an example.
37
General Discussion / Recording video and sound from NWC playback
Is there a way to record NWC playback without having to use another camera or cellphone.  I have been trying to use some free products from VSDC, but can't get off the ground.  Also, I don't have the option of recording audio.

Am open to ideas.  TIA
38
General Discussion / Putting notes in the other staff in piano music
I am trying to transcribe some fast arpeggios and sometimes a note or two at the beginning or ending of a beamed set will be on the other staff, perhaps with an N shaped beam (notes out of both sides).

Does anyone have a workaround for this?  TIA

Finishing Grieg III Sonata for Violin & Piano
42
General Discussion / Can't see verse three notechase with da capo & coda
I am transcribing a song with three verses--there is a simple repeat w/ 1st and 2nd endings, an instrumental interlude, the rrd verse and a coda.  Lyrics for the first two verses turn red when that note is reached, but nothing happens to 3rd verse lyrics.  Any ideas or useful previous threads on this?  TIA
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|Editor|ActiveStaff:1|CaretIndex:5|CaretPos:0
|SongInfo|Title:""|Author:"<Name>"|Lyricist:""|Copyright1:"Copyright © 2008 <Name>"|Copyright2:"All Rights Reserved"
|PgSetup|StaffSize:16|Zoom:4|TitlePage:Y|JustifyVertically:Y|PrintSystemSepMark:N|ExtendLastSystem:N|DurationPadding:Y|PageNumbers:0|StaffLabels:None|BarNumbers:None|StartingBar:1
|Font|Style:StaffItalic|Typeface:"Times New Roman"|Size:10|Bold:Y|Italic:Y|CharSet:0
|Font|Style:StaffBold|Typeface:"Times New Roman"|Size:8|Bold:Y|Italic:N|CharSet:0
|Font|Style:StaffLyric|Typeface:"Times New Roman"|Size:7|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:"Boxmark2"|Size:16|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.27|Top:1.27|Right:1.27|Bottom:1.27|Mirror:N
|AddStaff|Name:"Staff"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:12|BoundaryBottom:12|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Name:"Violin"|Patch:40|Trans:0|DynVel:10,30,45,60,75,92,108,127
|PerformanceStyle|Style:Legato|Pos:0|Visibility:Never
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar|Style:MasterRepeatOpen
|Flow|Style:Segno|Pos:11|Wide:Y
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Flow|Style:ToCoda|Pos:5|Wide:Y
|Bar
|Ending|Endings:1
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar|Style:MasterRepeatClose
|Ending|Endings:2
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Bar
|Note|Dur:4th|Pos:5
|Note|Dur:4th|Pos:6
|Note|Dur:4th|Pos:7
|Note|Dur:4th|Pos:8
|Bar
|Note|Dur:8th|Pos:-2|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:-2|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=End
|Flow|Style:DSalCoda|Pos:8|Justify:Right|Placement:BestFitForward
|Bar|Style:Double
|Flow|Style:Coda|Pos:8|Wide:Y
|Chord|Dur:Whole|Pos:-1,1
|AddStaff|Name:"Staff-1"|Group:"Standard"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:10|BoundaryBottom:22|Lines:5|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:2
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|Lyrics|Placement:Bottom|Align:Standard Rules|Offset:0
|Lyric1|Text:"verse one verse one verse one verse one verse one verse one verse one verse one verse one verse one\n"
|Lyric2|Text:"verse two verse two verse two verse two verse two verse two verse twoverse two verse two verse two verse two verse two verse two verse two\n"
|Lyric3|Text:"verse three verse three verse three verse three verse three verse three verse three verse three verse three verse three verse three verse three\n"
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Rest|Dur:Whole
|Bar
|Rest|Dur:Half
|Rest|Dur:4th
|Rest|Dur:8th
|Note|Dur:8th|Pos:-2
|Bar|Style:MasterRepeatOpen
|Flow|Style:Segno|Pos:11|Wide:Y
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:2
|Bar
|Note|Dur:8th|Pos:-1|Opts:Stem=Up,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Up,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:2
|Flow|Style:ToCoda|Pos:5|Wide:Y
|Bar
|Ending|Endings:1
|Note|Dur:8th|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Bar|Style:MasterRepeatClose
|Ending|Endings:2
|Note|Dur:8th|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:1|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=End
|Note|Dur:Half|Pos:-1
|Bar
|Rest|Dur:Whole
|Bar
|Rest|Dur:Whole
|Flow|Style:DSalCoda|Pos:8|Justify:Right|Placement:BestFitForward
|Bar|Style:Double
|Flow|Style:Coda|Pos:8|Wide:Y
|Note|Dur:Whole|Pos:-1
!NoteWorthyComposer-End
43
General Discussion / Ties at a repeat, appear unresolved.
In the following snippet (treble clef, A major) within the first ending, the ties are resolved after a previous Master Repeat Open.  In the first bar of the 2nd ending, the ties carry over looking for a resolution.  Fortunately the same tied chord is at the end of the measure.

Is there any way to eliminate the unwanted "lens" in that measure?  TIA
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Chord|Dur:8th|Pos:n-2,0
|Chord|Dur:4th|Pos:-1,1
|Chord|Dur:8th|Pos:-4^,-1^
|Chord|Dur:Half|Pos:-4^,-1^
|Bar
|Chord|Dur:Half,Dotted|Pos:-4,-1
|Rest|Dur:8th
|Chord|Dur:8th|Pos:-1^,1^
|Bar|Style:MasterRepeatClose
|Chord|Dur:Half|Pos:-8^,-6^,-4^
|Chord|Dur:4th,Dotted|Pos:-8,-6,-4
|Chord|Dur:8th|Pos:-1^,1^
|Bar
|Chord|Dur:8th|Pos:-1,1
|Chord|Dur:4th|Pos:-1,1
|Chord|Dur:8th|Pos:0^,2^
|Chord|Dur:8th|Pos:0,2
|Chord|Dur:4th|Pos:0,2
|Chord|Dur:8th|Pos:n-2^,0^
|Bar
|Chord|Dur:8th|Pos:-2,0
!NoteWorthyComposerClip-End
44
User Tools / Force Stem Up for unstemmed middle line notes.
Code: [Select · Download]
/*
 doStem.js  by Warren Porter
                                  Stem Tool
 This tool will change all notes on the middle line where no stem direction is specified to stem up.

 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 doStem.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 (lines[i].indexOf("Stem=") > 0)  // Already has stem direction specified
    continue;
  else {
    result = lines[i].match(/(\|Note.*Pos:)([n#bvx]?)0/) // 1. Note thru Pos 2. Accidental 3. Position 4. Shape 5. Ties 6. To end of line
if (result != null) {
  lines[i] += "|Opts:Stem=Up" }
   } }    // 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);
If you have to transpose after running this, run Audit Note Stems and then rerun it.
45
User Tools / Insert accumulated time after each bar line
Save the following with the name TimeText.js .  When installing a new user tool and doing the Browse to get this, add "wscript " (note trailing space) to the beginning of the line and the prompts on line 6 to the end of it.  Accept the defaults.

I wanted to give a warning when a Tempo Varience was found, but didn't find a way to do it.
Code: [Select · Download]
/* Time Through Current Bar by Warren Porter "TimeText.js"

   This script will insert the cumulative time at the beginning of each bar line.
   After downloading this file, when setting it up in NWC User Tools create this command line:

   wscript "'Browse can insert the path for you' \TimeText.js" <PROMPT:Run?:=|Yes|Undo> <PROMPT:BeginTime:=*00:00.0>

   The first parm will run the whole script ("Yes") or simply remove timings from a previous run ("Undo").
   Use the second parameter to specify a starting time for the song.
 */

var rc=0, errMsg="";
function getNoteLength(notelet) {  // Returns duration of note , whole = 768
var NoteLengths = { "16th":48, "32nd":24, "4th":192, "64th":12, "8th":96, "Half":384, "Whole":768 } ;

parts = notelet.split(",");
var  noteLength= -1;
noteLength = NoteLengths[parts[0]];
if (typeof(noteLength) == "undefined")
  return -1;

  for (var i = 1; i < parts.length; i++) {
    if (parts[i].substr(0,9) == "DblDotted") {
  noteLength = noteLength * 7 / 4; }
else
      if (parts[i].substr(0,6) == "Dotted") {
    noteLength = noteLength * 3 / 2; }
  else
    if (parts[i].substr(0,7) == "Triplet") {
      noteLength = noteLength * 2 / 3; } }
  return noteLength;
}
function tempoLength(notelet) {  // Returns duration of tempo
var NoteLengths = { "Eighth Dotted":144, "Eighth":96, "Quarter Dotted":288, "Quarter":192, "Half Dotted":576, "Half":384}
var noteLength = -1;
noteLength =NoteLengths[notelet];
if (typeof(noteLength) == "undefined")
  return -1;
return noteLength;  }

function calculate(clip) {
 
  var i, a, cumDur=0, durVal=0, durLen, min, sec, cumTime, wholeMeas=768, preTime=0, unDo=0, doWarn=1;
  var base=192;  //Default for tempo
  var beatletLength=0;  //Duration of "768th" note
  var result = new Array();
  var lines = new Array();
   var shell = new ActiveXObject("WScript.Shell");
    if (WScript.Arguments.length != 2) {
  errMsg = "I need two parms: Yes or Undo and initial time offset";
  rc=1;
return; }

  if (WScript.Arguments.Item(0) == "Undo")
  unDo=1;

  result = WScript.Arguments.Item(1).match(/(\d+):(\d+\.*\d*)/)
  if (result != null) {  // Read starting time
    min=parseInt(result[1]);
sec=parseFloat(result[2]);
preTime=min*60 + sec;}

  lines = clip.split("\r\n");
 
  for (i=0; i < lines.length; i++) {    //Main processing loop
 
result=lines[i].match(/\|Font:PageSmallText\|Pos:10\|Color:[36]/)
if (result != null)    // Remove earlier comments
  lines[i] = "#";
 
    if (unDo)
  continue;
 
if (lines[i].slice(0,15) == "|TempoVariance|") {  //Found tempo varience, give a warning
  if (doWarn) {
    shell.Popup("A Tempo Varience has been found, results are unpredictable");
    doWarn=0; } // Don't say it more than once.
      continue;   }
  
    if (lines[i].slice(0,5) == "|Flow") {
    errMsg="Repeats or flow changes not allowed";
rc=1;
return;}
 
if (lines[i].slice(0,7) == "|Tempo|") {  //Found tempo, look for base
  if (lines[i].substr(6,5) == "|Base") {
    result=lines[i].match(/Base:(.+)\|Tempo/)
base= tempoLength(result[1]); }
  else
    base = 192;
  result=lines[i].match(/(\|Tempo.*Tempo:)(\d+)/)
  a=parseInt(result[2]);
  beatletLength= 60 / (a * base);
      continue;   }  // End of Tempo code
 
    if (lines[i].slice(0,15) == "|Rest|Dur:Whole" && lines[i].indexOf(",") == -1) {
  cumDur += wholeMeas;   //Found whole rest but use duration of last time signature.
      continue;}
 
    result=lines[i].match(/Dur:([^\|]*)/);  // Looking for anything with duration not grace
if ((result != null) && (!/Grace/.test(lines[i]))) { // Has duration but is not grace.
  var durVal = result[1];
  var durLen = getNoteLength(durVal);
  cumDur += durLen;
      continue;   }
 
 
    result=lines[i].match(/Signature:(\d+)\/(\d+)/)
if (result != null)
  wholeMeas = 768 * result[1] / result[2];
 
result=lines[i].match(/\|RestMultiBar\|NumBars:(\d+)\|/)
if (result != null)
  cumDur += wholeMeas * result[1];
 
if (lines[i].slice(0,4) == "|Bar") { // Found a bar line
  if (beatletLength == 0) { // Shouldn't happen
    errMsg="Bar before Tempo indication, aborting";
rc=1;
return;}

  if (lines[i].search("Repeat") != -1) {
    errMsg="Repeats or flow changes not allowed";
rc=1;
return;}

  cumTime = preTime + cumDur * beatletLength;
      min = Math.floor(cumTime/60);
  sec = cumTime;
  sec -= min * 60;
  smin=min.toString()
  if (min < 10)
    smin = "0" + smin;
  sec =  Math.round(sec*1000)/1000;
  ssec = sec.toString();
  if (sec < 10)
    ssec = "0" + ssec;

  lines[i] += "\r\n|Text|Text:\"" + smin + ":" + ssec + "\"|Font:PageSmallText|Pos:10|Color:3" }

if (lines[i].slice(0,27) == "!NoteWorthyComposerClip-End") {
  cumTime = cumDur * beatletLength;
      min = Math.floor(cumTime/60);
  sec = cumTime;
  sec -= min * 60;
  smin=min.toString()
  if (min < 10)
    smin = "0" + smin;
  sec =  Math.round(sec*1000)/1000;
  ssec = sec.toString();
  if (sec < 10)
    ssec = "0" + ssec;

  lines[i] = "|Text|Text:\"" + smin + ":" + ssec + " " + cumDur + "\"\|Font:PageSmallText|Pos:10|Color:6\n" + lines[i];
  break;  }  // Don't do the end clip again
  } 
   rc = 0;
  return lines;
  }   // End main processing loop

var myLines=calculate(WScript.StdIn.ReadAll()).join("\r\n");
if (rc == 0)
  WScript.StdOut.Write(myLines);
else
  WScript.StdErr.Write(errMsg);
WScript.quit(rc);

Edited change:  Got a popup to warn of tempo variences.
46
General Discussion / Problem getting a page off the ground.
I have been working on TimeTxt.html to insert the minutes and seconds that have been played so far right after each barline.  This only works with songs with no tempo variences but, if you put a final bar line before the end, the last time doesn't agree with NWC displays while playing it.  After finding a tempo indication, it alerts the duration of each 768th note, on which all other durations are based.

Cntl/U displays the source code on many browsers.

TIA
47
General Discussion / Object plugins
Is there a primer for using object plugins?  How to install, when to use, how to change options, and (assuming someone knows lua), what steps are needed to modify or create a new one.

TIA
48
General Discussion / Loss of website
Comcast is shutting down all hobby websites including mine around Oct 10.  wporter211/realsite/nwc.htm If you regularly / occasionally use it, download the pages or scripts you need soon.  If you use a web page, when you download it change its name to .hta instead of .htm or .htlm.  The "avoidance" pages would be extremely difficult to turn into scripts most of the rest already have.

If you use anything on it, what is is?
49
General Discussion / Request for a grace note tool
In the attached snippet (711a), the grace notes take time from the quarter note in the 2nd beat, sounding like the measure in the middle staff (although the grace notes sound faster in the top staff), but what I would like is the bottom staff.

As an experiment I put the three measures on the same staff, exported to midi, and imported them back (711b).  The 16th grace notes had turned into 32nds. How does this work?

If anyone has or is working on a tool that can change the top staff to the bottom, please let me know before I try to tackle this.

TIA
50
User Tools / Tool to add (or undo) velocity and volume to a dynamic
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.
Code: [Select · Download]
/* 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);