ScoreAnalysis.og 2015-07-17 07:05 pm 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:PortraitGroups:General,Visual,Midi,Instrument,Metrics,ContentsGeneral:Label,LabelAbbr,Group,EndingBarVisual:Visible,BoundaryTop,BoundaryBottom,LayeredMidi:Volume,StereoPan,Muted,Channel,DeviceInstrument:Instrument,DynVel,TransPoseMetrics:Measures,DurationContents:Dynamic,TimeSig,BarStyle,Ending,Flow,UserThese 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. Quote Selected Last Edit: 2015-07-18 10:07 am by Opagust 2 Likes
Re: ScoreAnalysis.og Reply #1 – 2015-07-17 10:04 pm 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 '')) Quote Selected
Re: ScoreAnalysis.og Reply #2 – 2015-07-18 01:05 am OK, I'm clearly missing something here...I created a usertool entry but when I go to use it I get the error:QuoteC:\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:Quotelua Scripts\ScoreAnalysis.og.luawith Input Type as File Text.What have I done wrong please? Quote Selected
Re: ScoreAnalysis.og Reply #3 – 2015-07-18 01:19 am Quote from: Lawrie Pardy – 2015-07-18 01:05 amWhat have I done wrong please?You should not have lua.exe in your program folder. Quote Selected
Re: ScoreAnalysis.og Reply #4 – 2015-07-18 04:32 am Quote from: Rick G. – 2015-07-18 01:19 amYou 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). Quote Selected
Re: ScoreAnalysis.og Reply #5 – 2015-07-18 10:05 am Quote from: NoteWorthy Online – 2015-07-17 10:04 pmYou 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?Quote from: NoteWorthy Online – 2015-07-17 10:04 pmAlso, 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 47I attach the new version in the original post Quote Selected 1 Likes