Skip to main content
Topic: question on accidentals (Read 18036 times) previous topic - next topic

question on accidentals

An accidental implicitly applies to any of the same note later in that measure, but technically speaking, is it supposed to apply to notes an octave away from that note?!  Take this example:

Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:#-3
|Chord|Dur:4th|Pos:-3,4
|Chord|Dur:4th|Pos:n-3,4
!NoteWorthyComposerClip-End

Is the high F on the 3rd beat sharped, as the low F still is?  If so, is it still sharped on the 4th beat, or does the natural below cancel it?  If you run the Note Names user tool, it has its opinion on these questions, and I'd just like to make sure it's correct!

Re: question on accidentals

Reply #1
When in doubt, Force Accidentals.
Registered user since 1996

Re: question on accidentals

Reply #2
Or Audit Accidentals.
NWC User since 2008

Re: question on accidentals

Reply #3
I just found on Wikipedia that:

Quote
Accidentals do not affect the same note of a different octave, unless indicated by a key signature.

When I first found this issue, I was thinking only that NWC2PlayContext had a bug.  But I just confirmed that NWC2 has it throughout.  Here is the actual measure of existing handbell music I found this in:

Quote
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Key|Signature:Bb
|TimeSig|Signature:4/4
|Chord|Dur:4th|Pos:b-4,-2,0,4|Opts:Stem=Up
|Chord|Dur:4th|Pos:-5,-2,0,4|Opts:Stem=Up,XNoteSpace=1
|Chord|Dur:4th|Pos:-5,-3,-2,0,2,4,5|Opts:Stem=Down,XNoteSpace=1
|Chord|Dur:4th|Pos:n-4,-2,0,1,3,5,8|Opts:Stem=Down
!NoteWorthyComposerClip-End

The high E in the 4th beat is played back by NWC2 as an Eb, despite no prior accidental for that particular note, and despite the low E in the same chord having a natural specified.

Yes, the workaround is to put a natural on the high E, but it is not there in the published copy, and I now don't know how many other similar situations need this workaround in my other files.

Re: question on accidentals

Reply #4
Force Accidentals merely explicitly adds the flat that NWC2 implicitly thought was there.  Audit Accidentals then leaves the flat there.  While the Force/Audit pair made the offending flat show itself, it still does not correct the music to how it should sound, and it is difficult to spot where any extra accidental appears via this process so that it can be manually corrected.  I will write a script to look through all my NWC files and hunt for such anomalies in any staff.

Re: question on accidentals

Reply #5
Technically, an accidental does not influence a note of the same pitch class in a different octave. However, it's advisable (and usually done) to use a courtesy natural in those cases.

Re: question on accidentals

Reply #6
Yes, but a courtesy accidental (a "text" accidental symbol in parentheses) won't help NWC play the right note here!  Perhaps the printer of this piece should have put a courtesy accidental in this case, but even if they did, I'd have to know to change it to a real accidental when entering into NWC.

Re: question on accidentals

Reply #7
Force Accidentals merely explicitly adds the flat that NWC2 implicitly thought was there.
Force Accidentals shows what NWC thinks the pitches are. The pianobar is also useful.
If you want your original clip to conform to standard practice, use layers or this:
Quote
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:#-3
|Chord|Dur:Whole,Grace|Pos:#-3z^,n4z^|Visibility:Never
|Chord|Dur:4th|Pos:-3,4
|Chord|Dur:4th|Pos:n-3,4
!NoteWorthyComposerClip-End
Registered user since 1996

 

Re: question on accidentals

Reply #8
G'day Randy,
An accidental implicitly applies to any of the same note later in that measure, but technically speaking, is it supposed to apply to notes an octave away from that note?!

No

Technically, an accidental does not influence a note of the same pitch class in a different octave. However, it's advisable (and usually done) to use a courtesy natural in those cases.

Yes, but a courtesy accidental (a "text" accidental symbol in parentheses) won't help NWC play the right note here!  Perhaps the printer of this piece should have put a courtesy accidental in this case, but even if they did, I'd have to know to change it to a real accidental when entering into NWC.

Randy, what William is saying here is that the courtesy accidental (natural) is to show that the accidental an octave away does not apply to the note with the accidental.

See the following excerpt from Alfreds Essential Dictionary of Music Notation:
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: question on accidentals

Reply #9
There have been many, often heated, exchanges about this both here and in the newsgroup.

This is, I believe, the last official word:
This is an architectural quirk of NWC. Note accidentals apply in all octaves within the bar. The way to avoid the problem at present is to always use the correct accidental in all other octaves of that same named note after you use an accidental in one octave of the named note.
Registered user since 1996

Re: question on accidentals

Reply #10
G'day Rick,
I don't remember when but it's been fixed.  Listen to this example:
Code: [Select · Download]
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Key|Signature:C
|TimeSig|Signature:4/4
|Chord|Dur:Half|Pos:-3,4
|Chord|Dur:Half|Pos:#-3,4|Opts:Stem=Up
|Bar
|Chord|Dur:Half|Pos:#-3,n4
|Chord|Dur:Half|Pos:#-3,#4
|Bar
|Chord|Dur:Half|Pos:-3,#4
|Chord|Dur:Half|Pos:n-3,#4
!NoteWorthyComposerClip-End
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: question on accidentals

Reply #11
[note: haven't read the replies posted while I typed this]

Thanks for the help guys, but I just don't think you're getting my point!

Yes, there are all kinds of workarounds to take away the ambiguity and make the intent more clear.  But am I supposed to be constantly on the alert for plain notes an octave (or more) away from an accidental when I'm entering music?!  It's not the workarounds that are so bad - it's the detecting when they're needed!

Take a look at the "moonlite" sample, which I entered a long time ago exactly as my sheet music had it printed.  Andrew Purdam subsequently cloned the staffs, leaving my original alone as the visible "display" staffs1 and creating his copy as the hidden "audio" staffs.  He enhanced the audio staffs for better playback, including apparently detecting when NWC was playing back the music incorrectly!  In measure 187 for example, compare the 2 "treble" staffs.  Aside from the NWC audit removing the (technically) unnecessary sharp on the 4th note, Andrew had to add several other accidentals to compensate for NWC's improper algorithm:
  • The 12th and 17th notes needed naturals, to cancel supposed sharps earlier.
  • The 14th and 19th notes needed sharps, to cancel supposed double-sharps earlier.

Would any reasonable person have detected the need to deviate from the printed copy when entering this music into NWC?!  Is any musician good enough to remember the set of accidentals of record on a per note name basis, and apply this set across all octaves, in real time?!  I think it's hard enough carrying it forward on just the same horizontal position!

Note also measure 147 in moonlite.  I erred upon entry and forgot to transcribe a sharp to the high B.  It unfortunately sounded correct on NWC, due to the B# spanning octaves, so I never caught my error until now.

1Unfortunately, Andrew "cleaned up" my visual staffs, with what he thought were improvements, and/or corrections of faults in my data entry.  However, now the visual staffs deviate from my printed copy due to the changes.  I definitely appreciate the intent Andrew, while I'm privately disappointed at the result!  :-)

Re: question on accidentals

Reply #12
G'day Randy,
<snip>
But am I supposed to be constantly on the alert for plain notes an octave (or more) away from an accidental when I'm entering music?!
Umm, yes and no...

"Yes" in that the notes an octave away will not be affected in *NWC2.  "No" in that you should already know that accidentals should only apply to the one octave.  This is musically correct, the algorithm is no longer incorrect.  (It was incorrect in version 1.75 and prior in that accidentals applied to all octaves in those versions)

* I don't recall exactly when this was corrected.

Whups, I apologise, this hasn't been corrected - see Rick's post below.

<Edits in italics>
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: question on accidentals

Reply #13
G'day Rick,
I don't remember when but it's been fixed.  Listen to this example:
I did. Nothing has been fixed. The bug applies to the notes following, not the pitches within the chord which AFAIK have always been handled according to standard modern practice.

Randy,
NWC expects you to be constantly on the alert for such things. :(
Registered user since 1996

Re: question on accidentals

Reply #14
Quote
See the following excerpt from Alfreds Essential Dictionary of Music Notation:

Lawrie, thanks for the more definitive proof of the issue here, as Wikipedia is not necessarily a great reference.  :-)  Alfreds is agreeing that the second F in its example should not be natural from the accidental an octave away.  The sharp is only a courtesy, and not a requirement.

I have written a user tool to detect when NWC is playing music that is different from what is written.  I have also written a PHP script (to be run outside of NWC at a command prompt) which can apply a user tool to *all* the staffs in *all* the songs specified on the command line (wildcarding supported).  Both are preliminary, and the wrapper script in particular should be used with great care.  Both worked great for me to prove that my on previous handbell example measure was the only (current) occurance in all my handbell music, and to find *many* potential problems with the sample files (more on these later).

Here's another aspect to this.  Not only should a measure bar cancel all running accidentals, but I believe a clef change should do so as well!  Take this clip:

Quote
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Note|Dur:4th|Pos:#-3
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:4
|Clef|Type:Bass
|Note|Dur:4th|Pos:2
!NoteWorthyComposerClip-End

NWC thinks that all of these F's are sharped!

Re: question on accidentals

Reply #15
A good example of where this can bite you is in the 1812 sample file.  Look at the Oboes staff (although the Clarinets in B has the exact same problem) in measure 137.  Whoever entered this file innocently combined the 2 Oboe parts into a single staff in NWC - they are split out in the real music.  Looking at the original first Oboe part, it was clear that its F was natural.  Merge in the second Oboe part, and suddenly NWC plays that F as a sharp!  The accidentals from one voice can easily influence another voice, when it was not intended.

Other examples of extra accidentals needed to correct the playback by NWC:
  • 1812 - Clarinets in B.  In measure 125 (4th beat), a low G needs a natural.
  • Moonlite - Treble Clef.  In measure 187 (3rd and 4th beats), a high B and E needs a natural and a high C and F needs a sharp.
  • Meistersinger - Horns III IV in F.  In measure 161 (3rd beat), a low D needs a natural.
  • Griegpiano - Right Hand.  In measure 40 (3rd and 4th beats), 2 low A's need sharps and a high A needs a natural.  In measure 138 (3rd and 4th beats), a low F needs a double-sharp and the second high F needs a sharp.

A user tool is attached to find any ambiguities in the active staff.

Re: question on accidentals

Reply #16
I understand that runUserTool.php is more or less work in progress, but be careful: you made wide use of absolute paths.
This is a little problem for a programming-aware user, but it's anyway inconvenient.

I suggest retrieving the temp directory path from the %TEMP% environment variable.

From windows you can get the unversal access to the "\Program Files" directory that, for example, in my case is called "\Programmi".
Much better: retrieve the NWC path from the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NoteWorthy Composer 2\InstallLocation
or
HKEY_CLASSES_ROOT\applications\nwc2.exe\shell\open\command
or
HKEY_CLASSES_ROOT\nwcomposer\shell\NWC2\command
or
HKEY_CLASSES_ROOT\nwcomposer\shell\open\command

I see you don't use the PHP interpreter installed by NWC.
I can see many reason for that, but in the version you publishes I suggest making use of the one in (NWC path)\PHP

Please consider also adding a few comments on how to call runUserTool.php, that is, which parameters are expected and needed.

Thank you for publishing it anyway.

Re: question on accidentals

Reply #17
Hi Flurmy - It's good to have one person at least interested in my wrapper script.  :-)

Quote
I understand that runUserTool.php is more or less work in progress, ...
Not "more or less", but completely!  It is a concept I threw together to automate running my "find ambiguous" user tool on all staffs, in all my (and NWC's) song files.  I generalized it to any user tool, in case I (or anyone else) found it helpful elsewhere.  I believe that NWC is probably working to productize such a concept, and render my script obsolete at some point.

Quote
you made wide use of absolute paths. This is a little problem for a programming-aware user, but it's anyway inconvenient.
Actually, the script only contains 3 absolute paths total, and they are specifically placed as the first 3 lines of the script so they can be easily found, and they are all in simple variables so they can be easily edited.

Quote
I suggest retrieving the temp directory path from the %TEMP% environment variable.
Actually, I believe (but haven't tested yet) that my temp directory path variable can be set to an empty string, and the PHP tempnam function (which I took care to make use of) will make proper use of any applicable environment variable(s).  Note that you should not assume the script is running under Windows, as it may be running under UNIX/Linux.

Quote
Much better: retrieve the NWC path from the registry...
I was definitely planning on looking into how to retrieve the path for set_include_path.

Quote
I see you don't use the PHP interpreter installed by NWC.
Actually, I do make use of NWC's PHP.  I'd just copied it from it's install directory to c:\PHP, to make it less typing to run manually from the command line.  I agree that I should go back to the original directory, now that I don't have to type it every time.

Quote
Please consider also adding a few comments on how to call runUserTool.php, that is, which parameters are expect
ed and needed.
I purposely did not want anyone running it, unless they were capable of looking at the script and understanding it.  It's just a concept, and is not productized.  The script simply wants the first parameter to be the user tool path to run, and the remaining parameter(s) are file(s) to act on.

Re: question on accidentals

Reply #18
Quote
the script only contains 3 absolute paths total, and they are specifically placed as the first 3 lines of the script so they can be easily found, and they are all in simple variables so they can be easily edited.

I saw them indeed, and it was not a problem to fix them for my configuration, just a small inconvenience.

Quote
Note that you should not assume the script is running under Windows, as it may be running under UNIX/Linux.

Well, as far as I know NWC works only under windows.
To run under Linux NWC needs wine that must behave as if a true "windows" OS is running...

Quote
my temp directory path variable can be set to an empty string,

Not a good idea in many cases.
By the way: the "tmp" environment variable is a good alternative.

Quote
the PHP tempnam function (which I took care to make use of) will make proper use of any applicable environment variable(s).

Indeed it does if the specified directory doesn't exist.
Sorry but I'm deeply ignorant of PHP.

N.B. often, when I build a quick and dirty solution for a repetitive task, my script is far less flexible and sophisticated than your runUserTool.php: hats off!

Re: question on accidentals

Reply #19
Quote
Well, as far as I know NWC works only under windows. To run under Linux NWC needs wine that must behave as if a true "windows" OS is running...
You are forgetting that my "runUserTool" script is run totally outside of NWC.  There is no reason that the script (and hence the user tool it is running) cannot run under UNIX/Linux, operating on the NWC files.  Granted, currently, the "NWC2TXT/TXT2NWC" programs I am using right now (I need to convert to "nwc-conv", once I figure out "7z") are probably only supported under Windows (and perhaps they will only ever be such, as they invoke the NWC executable in some manner I believe).  But the script (like all user tools) is designed to run on (text) NWCTXT files, not on (binary) NWC files - there is no reason this can't be done using PHP on UNIX/Linux.

Quote
Not a good idea in many cases. By the way: the "tmp" environment variable is a good alternative.
I was apparently not clear here - by "my temp directory path variable" I was referring only to the PHP variable "$tempdir" in my script.  If you set my PHP variable to an empty string, I believe this will trigger the tempnam function to look for an alternative, using whatever environment details are relevant to the operating system.

I would be happy to make all sorts of enhancements, but right now, I am my only customer.  :-)

Re: question on accidentals

Reply #20
Quote
You are forgetting that my "runUserTool" script is run totally outside of NWC.

Yes indeed. Sorry.

Quote
(I need to convert to "nwc-conv", once I figure out "7z")

I can't see the problem.
From http://www.7-zip.org/download.html:

Quote
Some unofficial p7zip packages for Linux and other systems:

  • p7zip for Debian
  • p7zip for Fedora Core
  • p7zip for Gentoo
  • p7zip for AltLinux.org
  • p7zip for FreeBSD

Re: question on accidentals

Reply #21
It looks like this topic has not yet mentioned the existence of the Edit->Find, By Category, Unassigned Octave Accidental. It can be used per staff to find any "ambiguous" note octave accidentals. See Find Command Help for details.

Rick's quote below is spot-on:

There have been many, often heated, exchanges about this both here and in the newsgroup.

This is, I believe, the last official word:
This is an architectural quirk of NWC. Note accidentals apply in all octaves within the bar. The way to avoid the problem at present is to always use the correct accidental in all other octaves of that same named note after you use an accidental in one octave of the named note.

Re: question on accidentals

Reply #22
I had no idea that particular "find" category existed!  It does appear to obsolete my user tool, except that I could trivially run my user tool on every staff in any set of files, when doing so with the find would be extremely tedious.  :-)

Re: question on accidentals

Reply #23
Back on the forum after moving fifteen miles away and spending more than a week shuffling boxes around instead of doing any music :( ....but the new living room has room for a grand piano, and it just arrived today! :-)

Randy, my  own sense is that NWC has it (nearly) right. The standard practice of applying accidentals only to following notes of the same pitch class in the same octave is more confusing than it needs to be. "Courtesy" naturals are really more than just a courtesy - they make the music easier to read. My concern isn't that NWC requires naturals on notes in different octaves; it is that NWC doesn't have true courtesy accidentals, properly enclosed in parentheses. One has to create them. Easy enough with text entry, but still a pain.

Bill

Re: question on accidentals

Reply #24
Learn somethin' every day!

Quote
•1812 - Clarinets in B.

Never heard of a B clarinet before.  Similarly, that score shows an E (flat?) trumpet.  

I thought the more common modern versions of both instruments were pitched in B flat, although clarinets are also found in Eb and A.    


Quote
This is an architectural quirk of NWC. Note accidentals apply in all octaves within the bar. The way to avoid the problem at present is to always use the correct accidental in all other octaves of that same named note after you use an accidental in one octave of the named note.
Some users will want the courtesy accidental bracketed, others won't want it to show on their score but they want to hear the note play at the altered pitch.  No doubt I'm misremembering, but it would be nice if pressing the 7, 8 and 9 keys twice would give us an altered pitch without the accidental sign displaying or printing.  Then, for good measure, at a third "click" to the 8 and 9 to get a double sharp and the double flat.

Re: question on accidentals

Reply #25
David,

A Clarinet in B means B-flat in German editions;B natural is H.

Carl
Carl Bangs
Fenwick Parva Press
Registered user since 1995

Re: question on accidentals

Reply #26
Thanks, Carl!

Re: question on accidentals

Reply #27
Some users ... won't want it to show on their score but they want to hear the note play at the altered pitch.
Like this?
Quote
!NoteWorthyComposerClip(2.0,Single)
|Note|Dur:Whole,Grace|Pos:#-3z|Opts:Muted|Visibility:Never
|Note|Dur:4th|Pos:-3
!NoteWorthyComposerClip-End
Registered user since 1996

Re: question on accidentals

Reply #28
That works, Rick.