This page deals with Bol Processor BP3 making use of an updated version of Csound orchestra file “default.orc”. Now, modifications of the diapason (‘A4’ frequency) in the Settings have an influence on the production of Csound scores.
In the revised Csound orchestra file, a few lines have been added to modify the value of icps (frequency of the oscillator) according to that of argument p4:
if (p4 < 15.0) then
icps = cpspch(p4)
else icps = p4
endif
By default, this instrument receives the pitch value (argument p4) in the octave point pitch-class format — read documentation. In this case, the frequency depends exclusively on the diapason set up in the Csound orchestra, or 440 Hz by default, meaning cpspch(8.09) = 440.
In order to “tune” the Csound instrument to the diapason chosen for the project in Bol Processor BP3, if the base frequency is not exactly 440 Hz then p4 will contain the actual frequency of the note (cps format) instead of its octave point pitch-class value. Orchestra file “default.orc” is able to decide which format has been used because (1) no note is ever sent beyond the 14th octave and (2) frequencies are never lower than 15 Hz. Thus, the value of p4 automatically makes the decision in “default.orc”.
Let us try for example:
S --> A4 B4 C5
When the diapason is 440 Hz we get the standard Csound score output:
i1 0.000 1.000 8.09 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 1.000 1.000 8.11 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 2.000 1.000 9.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C5
On the first line, ‘A4’ is set to 8.09 in the octave point pitch-class format.
Once we set the diapason to 435 Hz the Csound score will become:
i1 0.000 1.000 435.00 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 1.000 1.000 488.27 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 2.000 1.000 517.31 90.000 90.000 0.000 0.000 0.000 0.000 ; C5
This score displays actual frequencies of notes, for instance ‘A4’ = 435 Hz. This tonal sequence will sound slightly lower than the preceding one.
If the diapason is radically different from 440 Hz, the names of notes will not differ. Only frequencies will be modified accordingly. See for instance the Csound score produced with ‘A4’ = 300 Hz:
i1 0.000 1.000 300.00 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 1.000 1.000 336.74 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 2.000 1.000 356.76 90.000 90.000 0.000 0.000 0.000 0.000 ; C5
Let us now examine changes of diapason when dealing with Csound objects. Take for instance object “a” in “-gr.tryCsoundObjects”. The Csound score of its prototype (as shown in “-mi.tryCsoundObjects”) is a mix of 3 instruments:
t 0 120
i1 0 0.5 4.05 ; F0
i2 1.5 0.5 5.05 ; F1
i3 1.5 0.2 643.5 1 ; D#5
e
Instruments i1 and i2 use the octave point pitch-class format whereas instrument i3 uses the direct cps format. This score has been created with ‘A4’ = 440 Hz which explains why 643.5 Hz is labelled D#5. The labeling of notes is of minor importance as it will be revised when creating the performance Csound score.
When ‘A4’ = 440 Hz the Csound score of a performance of “a” reflects precisely the score in its prototype:
t 0.000 60.000
i1 0.000 0.250 4.05 90.000 90.000 0.000 0.000 0.000 0.000 ; F0
i2 0.750 0.250 5.05 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1
i3 0.750 0.100 643.50 1.000 ; D#5
s
e
If the diapason is set to 500 Hz the Csound score of the performance will be:
t 0.000 60.000
i1 0.000 0.250 24.80 90.000 90.000 0.000 0.000 0.000 0.000 ; F0
i2 0.750 0.250 49.61 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1
i3 0.750 0.100 643.50 1.000 ; C#5
s
e

All pitches are now specified in the cps format. The pitches of notes F0 and F1 would be modified in the sound output. However, the pitch of instrument i3 would stay at 643.50 Hz as this had been set up in the sound-object’s prototype. Consequently, given the change of reference, the name of the note produced by i3 would now be ‘C#5’. This change is reflected in the pianorolls (see picture).
Important…
This automatic selection of the pitch format does not work when attempting to send a frequency lower than 15 Hz, as it would be the case for ‘F0’ in the preceding example if the diapason was set to 300 Hz. However this should normally never happen because 15 Hz is below the range of audible sounds.
At the opposite end, octaves beyond 14 are way beyond the musical range since ‘C15’ is already more than 535 KHz…
This might have an incidence on Csound scores being used for producing anything else than music, although in this case the use of octave point pitch-class format is very unlikely.
Changing middle C key number
“Middle C”, or ‘C4’ in the English convention, designates the key at the middle of a piano keyboard. By convention, its MIDI key number is 60, but this value can be modified in the settings.
For instance, setting ‘C4’ to key #48 results in all notes one octave (12 semitones) lower on a MIDI device. However, this does not modify the Csound sound output. Playing “A4 B4 C5″ with ‘C4’ different from 60 produces the same sound output and the same Csound score, yet in the cps pitch format:
t 0.000 120.000
i1 0.000 1.000 440.00 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 1.000 1.000 493.88 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 2.000 1.000 523.25 90.000 90.000 0.000 0.000 0.000 0.000 ; C5
s
e
When applied to Csound objects, changing ‘C4’ to a key number different from 60 also does not change note names nor their actual frequencies, but the cps pitch format is used. For instance, the performance of “a” yields the following Csound score:
t 0.000 60.000
i1 0.000 0.250 21.83 90.000 90.000 0.000 0.000 0.000 0.000 ; F0
i2 0.750 0.250 43.65 0.000 0.000 90.000 90.000 0.000 0.000 0.000 ; F1
i3 0.750 0.100 643.50 1.000 ; D#5
s
e