Control of NoteOn/NoteOff

When the Bol Processor pro­duces MIDI mate­r­i­al (real-time or files), each note is asso­ci­at­ed with two events: a NoteOn at its begin­ning and a NoteOff at its end. Additional para­me­ters are its veloc­i­ty (range 0 to 127) and its MIDI chan­nel (range 1 to 16).

When a key­board instru­ment is used to pro­duce the sound, each NoteOn will press a key at the appro­pri­ate loca­tion. By default, note C4 (in English nota­tion) will press key #60. A NoteOff of the same pitch will release the key.

All exam­ples on this page can be found in the "-da.checkNoteOff" project. NoteOn/NoteOff track­ing can be enabled by select­ing this option in the preferences.

NoteOn timing on fast movements

Let us look at this musi­cal phrase played with a metronome at 60 beats per second:

{3/2, {E5 A4 E5}, {{1/8, C#4 D4} {7/8, C#4} B3 C#4}}

Excerpt of François Couperin "Le Petit Rien" (1722)

Fast move­ments could be prob­lem­at­ic when using a _rndtime(x) con­trol, which sends NoteOns at ran­dom times ± x mil­lisec­onds, for example:

_rndtime(50) {3/2, {{1/8, C#4 D4} {7/8, C#4} B3 C#4}}

A large ran­dom time (50 ms) has been cho­sen to make the graphs clear­er. In gen­er­al, _rndtime(x) is used for a less mechan­i­cal ren­der­ing of simul­ta­ne­ous notes, with 10 to 20 ms being the rec­om­mend­ed val­ue for key­board instruments.

Errors would occur if the order of fast notes were reversed. However, this does not hap­pen because the tim­ing of the NoteOns in fast move­ments is not made random:

The same excerpt with 50 ms ran­dom time, except on the start­ing fast sequence C#4 D4 C#4.

Duplication of NoteOn in a MusicXML score

When sev­er­al MIDI chan­nels are used, we can imag­ine that each of them con­trols a sep­a­rate key­board, or that the chan­nels are com­bined to con­trol the same key­board. The first case is called Omni Off Poly mode and the sec­ond case is called Multi mode (see details).

Importing music from MusicXML scores often cre­ates a Bol Processor score that uses dif­fer­ent MIDI chan­nels (or Csound instru­ments). If the music is sent on a sin­gle chan­nel or played by an instru­ment in Multi mode, there may be over­laps for the same note assigned to dif­fer­ent channels.

This sit­u­a­tion is also found in music import­ed from MusicXML scores (see details of this process). For exam­ple, the first mea­sure of François Couperin's Les Ombres errantes:

Original staff (source) - Creative Commons CC0 1.0 Universal
This (slowed down) inter­pre­ta­tion is micro­ton­al­ly adjust­ed accord­ing to the Rameau en si bémol tem­pera­ment (see expla­na­tion).

Notes at the bot­tom of the staff: Eb4, D4, C4 are shown both as quar­ter notes and as eight notes. As this dual sta­tus can­not be man­aged in the MusicXML score, they are dupli­cat­ed (link to the XML score). This dupli­ca­tion is nec­es­sary for the con­ven­tion­al rep­re­sen­ta­tion of the staff.

The staff would look less con­ven­tion­al if the redun­dant eight notes Eb4, D4, C4 were sup­pressed (link to the mod­i­fied XML score):

Modified staff drawn by MuseScore 3

The out­put of the Bol Processor from the orig­i­nal XML score is as fol­lows, with dupli­cate notes clear­ly marked:

A sound-object dis­play of the Bol Processor's inter­pre­ta­tion of the MusicXML score.
Note that the dura­tions of C5 and Eb5 are extend­ed to allow slurs to be played cor­rect­ly (see expla­na­tion)

The Bol Processor score is an over­lay of three lines cre­at­ed by sequen­tial­ly inter­pret­ing the XML score:

C5 slur {1/4,C5 B4 C5} {3/4,B4} Eb5 slur
{1/2,Eb4}{5/2,G4 D4 F4 C4 Eb4}
Eb4 D4 C4

which is then con­vert­ed into a sin­gle poly­met­ric expres­sion (with lega­to in place of slurs):

-to.tryTunings
_scale(rameau_en_sib,0) {3, _legato(20) C5 _legato(0) {1/4, C5 B4 C5} {3/4, B4} _legato(20) Eb5, {1/2, Eb4}{5/2, G4 D4 F4 C4 Eb4}, Eb4 D4 C4}

Eliminating the redun­dant eight notes Eb4, D4, C4 would require a back­track­ing to mod­i­fy the sec­ond line when read­ing the notes of the third line. But this com­pli­cat­ed process is not nec­es­sary because the Bol Processor han­dles dupli­cate notes cor­rect­ly. The fol­low­ing piano roll shows this:

A piano roll dis­play of the Bol Processor's inter­pre­ta­tion of the MusicXML score. 

This ren­der­ing requires a prop­er con­trol of NoteOffs and NoteOns.

Screenshot

The image on the right shows the begin­ning of a sequence of MIDI events played by a syn­the­sis­er. (The date "6.802" is actu­al­ly time 0.) Events are dis­trib­uted on sep­a­rate MIDI chan­nels to allow for micro­ton­al adjust­ments by the pitch­ben­der. (Pitchbender mes­sages are not displayed.)

The per­for­mance starts with a NoteOn C5, then a NoteOn Eb4 at the same date. However, anoth­er NoteOn Eb4 is required at the same time. However, two NoteOns of the same note and the same chan­nel should not be sent to a MIDI instru­ment. so, a NoteOff Eb4 is sent just before the sec­ond NoteOn Eb4, all at the same time. In this way, the first NoteOn/NoteOff EB4 sequence is not audi­ble because its dura­tion is zero.

At time 1 sec­ond, a NoteOn C4 is sent as expect­ed. The sound-object graph shows that the Eb4 eight note is end­ing, but no NoteOff is sent because the Eb4 quar­ter note should con­tin­ue to sound. The NoteOff Eb4 will only occur at time 2 seconds.

Leave a Reply

Your email address will not be published. Required fields are marked *