Skip to main content
Topic: Problems with "Audit Accidentals" (Read 3609 times) previous topic - next topic

Problems with "Audit Accidentals"

I think the "Audit Accidentals" function needs an overhaul.

Backstory here: I'm editing an old score for submission to a call for scores. It's a cello sonata, written in a modified 12-tone idiom, and it was first transcribed into NWC in 2005. In that form, it was played several times over the next couple of years, but it hasn't been dug out since then. Until yesterday.

There have been many changes in NWC in the succeeding decade+. One of these is the way the program handles ties across barlines. In the "old" NWC, a tie from a note with an accidental required the target note to have the same accidental, which had to be added by the user; these target accidentals did not show up in the printed score. In the "new" NWC, no target accidental is required, which is an improvement. Unfortunately, though, if you bring an old score into any version since this change was made, the target accidentals all unhide themselves and show up blatantly - and messily - in the printed output.

My cello sonata, being a highly chromatic work, had a lot of those tied notes with accidentals, including whole six-voice chords in the piano part, and it looked like sh....it looked pretty bad. Rather than correct them all by hand, which would have been a long, tedious process, I decided to use Audit Accidentals. Bingo! All the target accidentals disappeared. Unfortunately, so did every courtesy accidental in the piece. And a whole crop of new, wrong accidentals cropped up, thanks to the function's blind belief that, if I used an accidental on one note early in a measure, every other note in that measure with the same pitch name - regardless of octave - had to have the same accidental. Never a safe assumption in any music; wildly inaccurate in modern "classical" music.

The piece is, as I said, highly chromatic. I am now faced with the task of going through measure by measure, comparing it with a score printed from the old version, and correcting everything by hand - a much larger job than the one I was trying to avoid by using Audit Accidentals in the first place.

So I think two changes are needed. The first is to have the Audit Accidentals function recognize courtesy accidentals. The second is to have it optionally ignore notes with the same pitch name but different octaves in the same measure. (Actually, there should be three choices here: after an accidental has been detected early in a measure, notes with the same pitch name but in different octaves that have no accidentals could optionally (1) be ignored; (2) be given an accidental which conforms to the key signature; or (3) be given the same accidental as the previous different-octave note. Because which one of these a user wants is likely to vary from score to score, these options should be set in a dialogue box that pops up each time Audit Accidentals is chosen by the user.)

Neither of these looks to me like a difficult programming job. It's mostly a matter of tinkering with the conditionals. For courtesy accidentals, I think all that needs to be done is to extend the search for notes of the same pitch but different chromatic inflections that the function is already doing back to the previous measure as well as the current one; if a different inflection is found, the accidental should be left alone. (This would require a search through all octaves, as courtesy accidentals are often assigned regardless of register.) The different-octave accidentals problem shouldn't be much harder, although the desirability of making it optional will make it a bit more work to actually accomplish.

Anyway, I hope something can be done. To emphasize the nature of the problem, here is one clear error that the current setup makes. This morning I came across a place in the piano part where the right hand plays two D's an octave apart, the upper one a D-flat, the lower one a D-natural, both marked with accidentals. The very next note in the right hand is another D, supposed to be played natural. It's in the same octave as the D-natural in the immediately previous chord, so I left it unmarked. NWC obligingly - and wrongly - "corrected" it to a D-flat, matching the note an octave away instead of the one right beside it.

<sigh> Back to work....

Re: Problems with "Audit Accidentals"

Reply #1
In the "new" NWC, no target accidental is required, which is an improvement. <snip> if you bring an old score into any version since this change was made, the target accidentals all unhide themselves and show up blatantly
Remove them with this:
Code: (Lua) [Select · Download]
-- rg_ZapTieDestAlterations.Lua ver 1.0 User Tool <http://nwsw.net/-f9323>
local playContext = nwcPlayContext.new()

for item in nwcut.items() do
for np in item:AllNotePositions() do
if playContext:FindTieIndex(np) then np.Accidental = '' end
end
playContext:put(item)
nwcut.writeline(item)
end
Registered user since 1996

Re: Problems with "Audit Accidentals"

Reply #2
Hey Rick,
may I suggest you add this little gem to the user tools forum?
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

 

Re: Problems with "Audit Accidentals"

Reply #3
Thanks, Rick - looks good for the future. Unfortunately, I'm past that point with the current piece. The damage has already been done. And "Audit Accidentals" still needs to be either fixed or removed.

Re: Problems with "Audit Accidentals"

Reply #4
Thanks, Rick - looks good for the future. Unfortunately, I'm past that point with the current piece. The damage has already been done. And "Audit Accidentals" still needs to be either fixed or removed.
You didn't keep an untouched copy? ? ? ? ?
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Problems with "Audit Accidentals"

Reply #5
Not of the edited version, no. I had made most of the other changes I wanted to before I noticed the problem with the target accidentals - and a few changes after that before I noticed the problems that Audit Accidentals had caused, which means that the automatic backup that NWC makes had been updated AFTER the error, and so contained it. I'd have to start everything over. And, anyway, the story is only relevant to illustrate the problem. Audit Accidentals has faults that need to be addressed, irrespective of my personal situation.

Re: Problems with "Audit Accidentals"

Reply #6
This morning I came across a place in the piano part where the right hand plays two D's an octave apart, the upper one a D-flat, the lower one a D-natural, both marked with accidentals. The very next note in the right hand is another D, supposed to be played natural.
But if left unaltered, NoteWorthy will play a D-flat. I agree that it should not, but that is the sofware that we have.
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.
So, to keep Audit Accidentals from displaying what you don't want and playing what you do want, use:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.75)
|StaffProperties|EndingBar:Open (hidden)
|Clef|Type:Treble
|Chord|Dur:Half|Pos:n-5,b2
|Note|Dur:4th,Grace|Pos:n-5|Opts:Muted|Visibility:Never
|Note|Dur:Half|Pos:-5
|Bar
!NoteWorthyComposer-End
Registered user since 1996