NoteWorthy Composer Forum

Forums => Tips & Tricks => User Tools => Topic started by: Bart on 2019-09-22 07:44 pm

Title: USERTOOL: show_all_note_names.lua
Post by: Bart on 2019-09-22 07:44 pm
You probably all know the usertool "show note names" which can be found in the .Automatic group and was delivered by Noteworthy self.

I have made an extension of this tool. It does not only show the note names in the current staff, but it shows all the sounding note names in all staves. An additional staff with rests and note names in the Lyrics is added at the end of the score where up to 8 sounding note names can be displayed.

I also added information about the fact that an instrument can sound lower or higher then the displayed notes (> when it sounds higher, < when it sounds lower). A trumpet in B flat will produce a Bb when a C is played.  "< C" will be shown.

For composing reasons, I finally added for each chord if the notes in a chord are part of an octave or a fifth (upper case for the bottom octave/fifth, lower case for the upper octave/fifth). This information could be helpful when checking for unwanted parallel fifths and octaves, since these sometimes unwanted parallels can only appear when these intervals are present.

To undo: just delete the (last) staff with the chord information.

A few remarks:
* triplets are converted into non-triplet duration notations and may therefore be slightly out-of-sync - but that is automatically corrected in the following chords.
* if staves have different time signatures, bar lines don't always appear at the same time. A bar line is added in the new chord names staff whenever a bar is present in one or more "normal" staves.
* this tool doesn't take care of scores where measures are added in between (but skipped) to cope with different verse texts, because it ignores master and local repeats. For this kind of scores the tool  will produce a useless chord name staff!
* this version of the tool treats drum staves as normal staves, which may also show useless and confusing information!

Title: Re: USERTOOL: show_all_note_names.lua
Post by: Lawrie Pardy on 2021-09-13 06:55 am
Hey @Bart Just had a play with this.  I Have a suggestion for it.

It would be nice to have a switch to ignore hidden or perhaps selected staves.  I certainly understand why you mightn't want to, knowing a sound from a hidden stave changes things, BUT in my testing I found I was getting spurious results because percussion staves were being included.
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Bart on 2021-09-14 07:32 pm
Dear Lawrie,

Thank you for your feedback.   :)

I fully understand that percussion staves shouldn't be in the scope of this "note names" tool.

So I modified the script a little bit to skip percussion staves as well as hidden staves.

If you want some staves out of scope, just make them invisible before running the new tool, and make them visible again afterwards. Percussion staves are automatically excluded, so there is no need to make them temporarily hidden.

I didn't provide a selection window yet because my lack of LUA knowledge prevents me to implement this right now.  :(

I have tested the new tool on some midi files that I have imported in NWC and making for instance the Conductor staff hidden is indeed a very handy addition. Unless there are very strange rhythms in the score, it should work well.
By the way: the original tool can go wrong too if there are very small or too many different durations.

Please find the adapted script attached.  Until I have a tool where a selection box can check which staves are in scope I leave the original file also available.

Bart
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Mike Shawaluk on 2021-09-14 09:22 pm
Here is a suggestion that might make some sense: rather than exclude hidden staves, would it be possible to exclude muted staves instead? I say this because I sometimes have accompaniment staves in my choral scores that I intentionally hide, but that I would want to include in an audio analysis. Likewise, I could see a visible but muted staff that I might want to exclude.

Maybe the other people in the thread can comment: does it make more sense or less sense to exclude muted staves rather than hidden ones? Perhaps both?
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Opagust on 2021-09-14 09:53 pm
I didn't provide a selection window yet because my lack of LUA knowledge prevents me to implement this right now.  :(

Maybe this can help? (https://lua.noteworthycomposer.com/usertool/nwcut.html##(nwcut).prompt)
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Lawrie Pardy on 2021-09-14 10:34 pm
Hey Bart.  Excellent, thanks mate.  Works like a charm  :)

I must say though, Mike's suggestion is a very good one and I wish I'd thought of it. :-[
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Bart on 2021-09-15 07:24 pm
Thank you for your suggestions.

A new version with check boxes to skip percussion, muted and hidden staves is now ready.
show_all_note_names_except_for_selected_staff_types.lua is the new name for this file.

Bart
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Lawrie Pardy on 2021-09-15 11:27 pm
Thanks Bart.  Worked well in my (non-exhaustive) testing.
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Flurmy on 2021-09-18 12:40 pm
Gosh! How am I expected to ascertain the harmony when the notes are transposed in a mixed way?
For example, when I have some instruments in C, some in Bb and some in Eb I can see the '>' or the '<', but I'm alone on quickly estimate the harmony, which, I think, defeats the purpose of this tool.
What I got wrong?
Title: Re: USERTOOL: show_all_note_names.lua
Post by: Flurmy on 2021-09-25 03:18 pm
Quote
local progname = 'extract chords'
local HelpMsg = [[
This tool mutes notes that are not in the normal range
]]
Really?  ;)