Skip to main content


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

General Discussion / Re: Measure numbers
If having the measure number in the middle of the measure is important, there is an old user function that may help.  Create a model measure number (text object with only digits) in the first measure where you need it to be (beats from the beginning of the measure).  If, in 4/4 time, you create a model measure number just before the 3rd beat, later selected measures will have a measure number at the same place or as soon as possible. (If measure is quarter, half, quarter, the measure number would be before the 4th beat.)  Download nummeas.js and note where you stored it. Open a NWC file and select a new user tool.  On the "command", browse for the location, then prepend "wscript " to it.  Accept other defaults.

When running it, the measure with your model measure number must be the first one selected.  All attributes of the text measure number will be replicated in later measures.

General Discussion / Re: Selectively suppressing staves when printing
This tool can create multi measure rests and suppress staves when creating a conductor's score--to do this use the HideAll option.  If creating a "tempo" staff with just tempo, tempo variances (rit., acc., etc) and rehearsal symbols, choose LayerHide.


Chop off the "/mmr.js" to see installation instructions.  This shows all instruments at the beginning of the score, but you can move the first collapse symbol to the beginning of each staff if it starts with a long rest.
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; }
      if (parts[i].substr(0,6) == "Dotted") {
    noteLength = noteLength * 3 / 2; }
    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";
return; }

  if (WScript.Arguments.Item(0) == "Undo")

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

  lines = clip.split("\r\n");
  for (i=0; i < lines.length; i++) {    //Main processing loop
if (result != null)    // Remove earlier comments
  lines[i] = "#";
    if (unDo)
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";
if (lines[i].slice(0,7) == "|Tempo|") {  //Found tempo, look for base
  if (lines[i].substr(6,5) == "|Base") {
base= tempoLength(result[1]); }
    base = 192;
  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.
    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;   }
if (result != null)
  wholeMeas = 768 * result[1] / result[2];
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";

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

  cumTime = preTime + cumDur * beatletLength;
      min = Math.floor(cumTime/60);
  sec = cumTime;
  sec -= min * 60;
  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;
  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)

Edited change:  Got a popup to warn of tempo variences.
General Discussion / Re: Problem getting a page off the ground.
Thanks, but I believe I found the bug-- I was counting whole note rests twice.  The script determined the length of a whole rest from the time signature but after finding it I didn't continue* the loop.  Code that looked for anything with a duration processed it again.

I'll be adding some more stuff before putting it on the web again.

*continue - In JavaScript, "continue" means to do the next iteration of the loop.  It goes to the top adding 1 to the value of I.
General Discussion / Re: Problem getting a page off the ground.
What is "a final bar line?"
Just an unneeded bar line at the end of the piece to show the total duration since otherwise info on the last measure (total dur) wouldn't be reported.  A later version will show the duration of a 768th note, total duration of the song in 768th notes, and total minutes / seconds in a textbox so an alert wouldn't be needed.  It also needs warnings for tempo variances and flow directions.

I am trying to use this to help me transcribe parts from an audio file "editor" (audacity? <sp>) which shows starting points and selected durations to a thousandth of a second.  Have picked off the fiddle part from "Hey Good Lookin'" and just started on steel guitar--link is on my website's splash page.
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.

General Discussion / Re: Positioning accidentals
Select a note/chord and then Cntl/E. One of the options is "Extra Accidental Spacing" in addition to "Extra Note Spacing".  This comes in handy when notes/chords on different staves are layered and the accidentals or notes are on top of each other.  If you download the first attachment from this thread, this page fixes the note collisions upstairs and accidental collusions downstairs.
General Discussion / Re: Loss of website
Just added a script to convert midi triplets into real ones.  This assumes an NWC file has just been imported from midi so there is no check for grace notes.  The B147Ch04 file is a good demo of it--run it on the top staff and it should look like the bottom one.
User Tools / Re: "Compactify rests"?
I have a tool that can do this, and it creates whole rests when the duration of all objects matches what the key signature says its supposed to have. nwc Look for "Resting Staff" at the bottom of "User Tools". 

Run against both of your samples it creates a pair of hidden whole rests.

Edit: This might not be exactly what you need, but it should be easy to modify.  The tool was for those occasions when you realize you need a new layered staff 100 measures into your transcription.
General Discussion / Re: Triplets and Duplets?
I needed to upload some *.js functions to let it work (note duration in 768th notes).  The link is Tuplets.htm

For duplets (assuming 6/8), the hidden & played staff would have dotted eighth notes while the visible & muted staff would have eighth notes followed by hidden 16th rests with a literal "2" (italicized) above or below the beam.
General Discussion / Re: Clef transposition
To go from a G to an F staff, do the Ctrl+Shift+Up 12 times like Rick suggested.  If one of the staves has an octave shift, subtract or add 7 as well.  For example to move an octave down treble staff (like a tenor part) to a true bass staff, move all notes up 5 times.

I think there is a user tool to handle these and all other possible staves (Middle C on the 3rd or 4th line or 3rd space)--I'm not able to look it up now.
General Discussion / Re: Trustworthy
Attached is what I've been getting. The only difference between the suggested link and what a mouseover on my frequently visited bar shows is a trailing slash (/).
General Discussion / Re: Trustworthy
Just converted to Windows 10.  Firefox won't let me in directly, I have to choose forum from the main website.  Also had certificate problem.
Object Plugins / Re: (1.6)
In creating a "muted, displayed" staff, I had a trilled half-note slured into a pair of graced 16ths that did not slur into the following measure.  The tool did exactly what was needed.  :)
General Discussion / Re: Relative speed changes?
I need to work on lua myself.  JavaScript works for user tools but it isn't as 'programmer friendly' as other languages in NWC.  Right now the tool will take your tempo factor, the inverse of that factor, or just "give me the current and requested duration of your song and I'll figure out the factor".  It might be a problem selecting which factor to select.

It's straightforward to change a tempo indication, but changing an MPC:Tempo was the hassle and a half, IIRC.
General Discussion / Re: StaffLabel
Try printing staff labels on All Systems, but (via F2), give each staff an abbreviation like H 2 that will be used after the first time.  On the first page "Harp 3" would be shown but it would be "H 3" on every system after that.
General Discussion / Re: NWC - the big picture?
It is true there are many user tools, it can be a problem for a new user to become familiar with them: when to use and how.  Also, in choral music, it is far from intuitive (much less built in) how to use four staves in the fugue and just two staves in the chorale.  E.g.: two staves for the Alto part and avoiding slur, tie, note, and accidental collisions when layering.  Tuples over 3 still require work arounds.
General Discussion / Re: Loss of website
I think the plug was finally pulled on the 1st of the month.  "" turned into "xfinity??" followed by ~wporter..." but then nothing was found.  This far I have registered a webpage name but haven't followed through on getting a host for it.
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.

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?
General Discussion / Re: Notation of violin harmonics - layering?
I visited that website and read the midi file into NWC.  You might want to try patch 92  for the harmonics at measure 24.  Of course that staff would have to be hidden while the harmonics you display would be muted.  If you want to try other patches for the harmonics, you can get the Patch Test from Scriptorium Files.
General Discussion / Re: Request for a grace note tool
Thank you, gentlemen!  I already have functions in JavaScript that can convert the nwctxt Dur (like Dur:16th,Dotted) to the equivalent number of 768th notes and back if need be, but messing with the last note of the previous bar could get tricky.

Flurmy, that observation of 32nd notes for grace makes sense.  Thanks.
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.