This page deals with the Bol Processor BP3 using an updated version of the Csound orchestra file "default.orc". Changes to the diapason ('A4' frequency) in the settings now affect the production of Csound scores.
In the revised Csound orchestra file, a few lines have been added to change the value of icps (oscillator frequency) according to that of the p4 argument:
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 — see documentation. In this case, the frequency depends only on the diapason set up in the Csound orchestra, or 440 Hz by default, i.e. cpspch(8.09) = 440.
To "tune" the Csound instrument to the diapason selected for the project in the Bol Processor BP3, if the base frequency is not exactly 440 Hz, p4 will contain the actual frequency of the note (cps format) instead of its octave point pitch-class value. The orchestra file "default.orc" can decide which format is used because (1) no note is ever sent above the 14th octave and (2) frequencies are never lower than 15 Hz. So, the value of p4 automatically makes the decision in "default.orc".
Let us try for example:
S --> A4 B4 C5
If 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 shows the actual frequencies of the notes, for example 'A4' = 435 Hz. This sequence of notes will sound slightly lower than the previous one.
If the diapason is radically different from 440 Hz, the names of the notes will not change. Only the frequencies will be change accordingly. See for example the Csound score created 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 the changes in diapason when dealing with Csound objects. Take for example the object "a" in "-gr.tryCsoundObjects". The Csound score of its prototype (as shown in "-so.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, while 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 labelling of the notes is of minor importance as it will be revised when the performance Csound score is created.
When 'A4' = 440 Hz the Csound score of a performance of "a" exactly reflects 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 given in the cps format. The pitches of notes F0 and F1 would be changed in the sound output. However, the pitch of instrument i3 would remain at 643.50 Hz as set in the sound-object's prototype. As a result of the change in reference, the name of the note produced by i3 would now be 'C#5'. This change is reflected in the pianorolls (see image).
Important…
This automatic the pitch format selection does not work if you try to send a frequency lower than 15 Hz, as it would be the case for 'F0' in the previous example if the diapason was set to 300 Hz. This should never happen, however, as 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 the octave point pitch-class format is very unlikely.
Changing middle C key number
"Middle C", or 'C4' in the English convention, is the key in the middle of a piano keyboard. By convention, its MIDI key number is 60, but this value can be changed in the settings.
For example, setting 'C4' to key #48 will cause all notes on a MIDI device to be one octave (12 semitones) lower . This does not change the Csound sound output. Playing "A4 B4 C5" with 'C4' other than 60 will produce the same sound output and the same Csound score, but 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 other than 60 will not change the note names or their actual frequencies, but it will use the cps pitch format. For example, playing "a" will result in 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