Skip to main content
Topic: ScoreAnalysis.og (Read 5084 times) previous topic - next topic

ScoreAnalysis.og

This tool is inspired by the NWC menu command 'Tools/Score Review...', but gives a little bit more info.
It creates an analysis report, which is divided in several groups. Each group contains several group items.
It's shown either with the staffs in colums (Orientation 'Landscape') or with the group items in colums ('Portrait').

The default settings for the orientation, groups and group items are:
Orientation:Portrait
Groups:General,Visual,Midi,Instrument,Metrics,Contents
General:Label,LabelAbbr,Group,EndingBar
Visual:Visible,BoundaryTop,BoundaryBottom,Layered
Midi:Volume,StereoPan,Muted,Channel,Device
Instrument:Instrument,DynVel,TransPose
Metrics:Measures,Duration
Contents:Dynamic,TimeSig,BarStyle,Ending,Flow,User

These settings can be modified via parameters in the command line and/or the dialog option 'Settings'.
If you do so, the modified settings are included in the report, so you can copy and paste them as parameters in the command line for future use.
A parameter mustn't contain spaces, and the parameters must be seperated by one or more spaces.
If you provide a parameter 'SkipHelp', the help window isn't shown.

Hint: since the output window is limited, you may want to copy and past it in a word processor or text editor.

I attached also 2 output reports, the first with teh default settings, the 2nd with modified settings.

If you find any bugs are have some suggestions for improvement, please let me know.
Always look on the bright side of life!

 

Re: ScoreAnalysis.og

Reply #1
You might want to add the following line to the top of your user tool:

Code: (Lua) [Select · Download]
-- $NWCUT$CONFIG: FileText $

Also, in order to support file samples, line 651/2 can be changed to:

Code: (Lua) [Select · Download]
nwcut.writeline("File name:"..(nwcut.getprop('FileName') or ''))

Re: ScoreAnalysis.og

Reply #2
OK, I'm clearly missing something here...

I created a usertool entry but when I go to use it I get the error:

Quote
C:\Program Files\NoteWorthy Composer 2\lua.exe: Scripts\ScoreAnalysis.og.lua:1: attempt to index global 'nwcut' (a nil value)
stack traceback:
    Scripts\ScoreAnalysis.og.lua:1: in main chunk
    [C]: in ?
The user tool command line is:
Quote
lua Scripts\ScoreAnalysis.og.lua
with Input Type as File Text.

What have I done wrong please?

I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.


Re: ScoreAnalysis.og

Reply #4
You should not have lua.exe in your program folder.
Thanks Rick,
renamed the exe and removed the reference from the command line.  Seems OK now.

So, I assume the lua intpreter is embedded in NWC?  Previouse examples had the lua executable in the command line
(samples from quite some time ago - I think auto installed).
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: ScoreAnalysis.og

Reply #5
You might want to add the following line to the top of your user tool:

Code: (Lua) [Select · Download]
-- $NWCUT$CONFIG: FileText $
I supposed this would automatically set the button 'File Text' ,when installing the tool by dragging it over a NWC window.
I tried it and indeed it did. But I can't find it in the documentation.  Is it documented? Are there some more 'config' settings?
Also, in order to support file samples, line 651/2 can be changed to:

Code: (Lua) [Select · Download]
nwcut.writeline("File name:"..(nwcut.getprop('FileName') or ''))
I tried it on the sample 'Carmen' and found 2 errors:
- One in my tool: miscalculating measure numbers when a staff starts with 2 bars;
- After correcting this and looking at the Analysis report, I found that the staff 'Cymbal' had only 52 measures instead of 53. This is caused by a missing bar in measure 47
I attach the new version in the original post
Always look on the bright side of life!