The courtesy program can be used to identify and manipulate
courtesy/cautionary accidentals in a musical score.
Courtesy accidentals are optional accidentals that help clarify
the chromatic alteration of a note.
The courtesy accidental does not alter the pitch of the note since
it matches the expected chromatic inflection of the note.
The following musical example demonstrates a courtesy accidental
in the second measure where the sharp is not required, since the F is
already sharpened by the key signature, and the natural sign on the
F in the previous measure is cancelled by the barline.
In this case the courtesy accidental is used to alert the performer
that the natural sign in the previous measure is not longer in
effect.
If there were no sharp on the F in the second measure, a performer
may also wonder if the natural sign was omitted by mistake.
The courtesy program can identify and highlight notes with
courtesy accidentals, remove these accidentals, or place the courtesy
accidentals within parentheses.
There are four courtesy accidentals identified for this passage of music:
G♮ at the start of the second measure. This is used to
warn of the cancellation of G♯ in the previous measure caused
by the barline.
C♮ in the middle of the second measure is used to clarify
that the sharp on the previous C3 in the measure does not apply to
C4 since they are in different octaves.
C♯ at the end the second measure is used to clarify that
the natural on the previous C4 in the measure does not apply to this
C3 since they are in different octaves (the chromatic alteration
of this note comes from the first C♯ in the measure).
The F♯ in the third measure is given for clarity that
the natural on F4 in the top staff in third and fourth measures does
not apply to this note in the bottom staff.
1. Marking courtesy accidentals
The -m option can be used to mark courtesy accidentals in the data.
Below is the bach chorale data from the previous examples processed with the
-m option.
Using the -r option will remove cautionary accidentals.
The -k option can be added to keep the courtesy information
in the data so that the accidentals can be added back into the notation
at a later time.
The -R option can be used to replace accidentals removed
with the -r option. This can only be done if the
-k option was used at the same time as -r. The
-k option stores the cautionary accidental analysis as a
global named parameter. The -R option will force the
display of an accidental on any note which has a @courtesy named
parameter value set to true or non-zero.
4. Adding parentheses
Using the -p option will cause cautionary accidentals to
be placed in parentheses.
Notice the the parentheses added to courtesy accidentals sometimes touch the previous item in the music. The --lj option can be used along with the -p option to append an LJ command macro for each system on the page which had parentheses added to accidentals. When the data file is loaded into the SCORE editor with the RE command, the LJ commands will be run to add space around the added parentheses.
The -e option can be used to convert cautionary accidentals
into editorial accidentals which are shown as small accidentals
above the notes rather than in front of the notes.
7. Programming notes
Courtesy/cautionary accidentals are automatically identified as a by-product of pitch analysis. Here is a short program which will identify courtesy accidentals:
Pitch analyses are stored in the @auto@base40 named
parameter, as can be seen in the processed output data on the right
below. Courtesy accidentals will have the value "true" for the
named parameter @auto@courtesy.