Skip to main content
Topic: Audit Bar Lines (Read 3107 times) previous topic - next topic

Audit Bar Lines

Is there a tool (user or native) which will audit measures and show any measure which does not have the proper number of beats matching the time signature, without actually moving the bar lines?

Re: Audit Bar Lines

Reply #1
Not that I'm aware of, but as a work around, you could perform a normal bar audit, have a look through and if you see something erroneous, note the bar, press <Ctrl+Z> and then go to the errant bar and fix it.

Not perfect, but functional.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Audit Bar Lines

Reply #2
I have several tools with a function to determine the duration (in 768th notes) of anything with a Dur: attribute. Unless someone beats me to it, I'll give that function a shot. Right now, Rubato has me pulling my hair out.

You could create and copy a staff and then audit the new staff. Then look for the first place they don't match. Correct the problem then replace your new staff with the corrected staff. Repeat until no changes.
Since 1998

Re: Audit Bar Lines

Reply #3
Thank you both. I actually used Lawrie's method and found it difficult to find the changed measures. But Warren's method worked great. I had to clear and recopy the extra staff three times to find the two errors and the corrected version, but that wasn't hard.

Re: Audit Bar Lines

Reply #4
I created a user tool to do this. Please check out this new post in User Tools.
Since 1998

Re: Audit Bar Lines

Reply #5
Can you post a link or instructions on how to install the tool? Is there an automated way, or do you manually copy the file to an nwc folder? Which one? You delete the .txt extension, but do you have to add a .php or .lua extension?

Re: Audit Bar Lines

Reply #6
It doesn't really matter where you put it, BUT the traditional location is the "scripts" directory under where NWC itself is:
"C:\Program Files (x86)\Noteworthy Software\NoteWorthy Composer 2\Scripts" (64 bit) or
"C:\Program Files\Noteworthy Software\NoteWorthy Composer 2\Scripts" (32 bit)

I think a more recent installation than mine puts them under the C:\Users\YourHomeDirectory structure somewhere, but mine uses the original NWC2 under WinXP location.

Anyhow, pick the location you need, save the file - remove the .txt extension (the required .js extension remains)

In NWC, press <Alt+F8>,
Click "New...",
Choose the group, or write the name of a new group, for the tool to reside,
Type "WScript " in the command field (don't forget the trailing space),
Click "Browse..."
locate the "auditBar.js" file and click "Open"
check the command line to make sure there is a space after "WScript", then click "OK".

The tool is now ready to roll.

<edit> fixed close italics tag
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

 

Re: Audit Bar Lines

Reply #7
Thanks from me too.
Lorenzo

Re: Audit Bar Lines

Reply #8
Can you post a link or instructions on how to install the tool? Is there an automated way, or do you manually copy the file to an nwc folder? Which one? You delete the .txt extension, but do you have to add a .php or .lua extension?
No, it ends in ".js". Lawrie's reply # 6 describes the installation very well.
Since 1998

Re: Audit Bar Lines

Reply #9
I'm still having trouble. I download the file, copy it to
"C:\Program Files (x86)\Noteworthy Software\NoteWorthy Composer 2\Scripts"
and delete the .txt extension. That folder has 3 sub-folders: lib, wx, and wxtools, and 18 files. All files except the new one have a .php extension. When I hit Alt-F8 I get a pop-up titled "User Tools" with 5 Groups listed, with the second, ".Plugins" selected. Under "Available Commands" there are 12 tools listed. I click the "New..." button and get another pop-up titled "User Tool Description". The first Text Box is "Group:". The drop-down list is empty. I filled in ".Developer Tools". I put "Audit Bars" in the Name, and
"WScript " in the Command. Input Type was pre-selected as "Clip Text" and none of the 4 Options were selected. I click "Browse".  
and the Scripts directory opens. I select auditBar.js and click "Open". The User Tool Description pop-up updates with "auditBar" in the Name and "Scripts\auditBar.js" in the Command.
Lawrie's last step: <check the command line to make sure there is a space after "WScript", then click "OK".> does not seem to apply, since the Command has changed. Clicking OK at this point seems to do nothing. Changing the Command back to "WScript " and pressing OK also seems to do nothing.

Re: Audit Bar Lines

Reply #10
On my installation the command line reads: "wscript Scripts\auditBar.js ". While installing (or Editing an install) it may help to browse and open the file, then insert "wscript " into the front of the command line.

My generic instructions in Scriptorium on the right side might also be helpful.

If I change the script to prompt for a list or a text comment when an error is found, the end of the command will need to be changed, but I will wait until I replace the script before giving the details.
Since 1998

Re: Audit Bar Lines

Reply #11
I'm still having trouble. I download the file, copy it to
"C:\Program Files (x86)\Noteworthy Software\NoteWorthy Composer 2\Scripts"
and delete the .txt extension.
Good, this should leave the file entitled "auditBars.js"
Quote
That folder has 3 sub-folders: lib, wx, and wxtools, and 18 files. All files except the new one have a .php extension.
When user tools were first introduced the default language used for them was PHP.  What you are seeing are the User Tools that are distributed with the "User Tool Starter Kit", which were all written in the early days, and are thus written in PHP.
I believe the "wx" and "wxtools" folders comprise a Windows eXtensions library for PHP.
The starter kit installs a PHP interpreter.
The current recommended user tool language is lua, and the lua interpreter is built into NWC
However, you are not forced to use lua or PHP to create user tools.  EG, this one uses javascript, hence the .js extension.  I've personally written tools with vbscript (.vbs) - the Microsoft supplied "WScript" interpreter handles both these languages just fine.
Quote
When I hit Alt-F8 I get a pop-up titled "User Tools" with 5 Groups listed, with the second, ".Plugins" selected. Under "Available Commands" there are 12 tools listed. I click the "New..." button and get another pop-up titled "User Tool Description". The first Text Box is "Group:".
The drop-down list is empty.
The empty dropdown just means that you haven't manually installed any user tools before, so haven't created any groups to put them in.
The groups that start with a period "." are automatic ones, and I, personally, don't put any other user tools in them.
E.G. The .Plugins group is populated automatically by User Objects that have built-in User Tools.  These enable User Tool type use of the related Object - it only applies to some objects as not all contain user tools.
My system uses a holdover from the early days and thus I have a group called "ConsoleClipScripts" where my manually installed tools go.  You can have as many groups as you want.
I also have a group called "Default" but I don't recall how it was created, too many moons have passed in the meantime.
If you type in the name of a group that doesn't exist, then that group will be created automatically.  If you delete, or move, the last tool within a group then that group will automatically be deleted too.
Quote
I filled in ".Developer Tools". I put "Audit Bars" in the Name, and
"WScript " in the Command. Input Type was pre-selected as "Clip Text" and none of the 4 Options were selected. I click "Browse".  
and the Scripts directory opens. I select auditBar.js and click "Open". The User Tool Description pop-up updates with "auditBar" in the Name and "Scripts\auditBar.js" in the Command.
The first part of this is correct.  You have to opportunity to change the "Name" if the default doesn't suit you.
Also, it appears your system decided to overwrite the command field.  Sorry about that, I should have considered the possibility in my earlier description.
Quote
Lawrie's last step: <check the command line to make sure there is a space after "WScript", then click "OK".> does not seem to apply, since the Command has changed. Clicking OK at this point seems to do nothing. Changing the Command back to "WScript " and pressing OK also seems to do nothing.
The correct command field should read
"wscript Scripts/auditBar.js"
without the quotes

<EDIT>
Following Warrens updated code the command line should now read:
"wscript Scripts\auditBar.js  <PROMPT:Summarize?:=|Y|N>"
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Audit Bar Lines

Reply #12
I replaced the script on my first post in User Tools. Please revisit my post 4 above to download an updated copy. This version has a prompt.

Revised 2024/01/22 Corrected problem w/measure number when selecting part of the staff.
Since 1998