Move data

In the stan­dard use of the Bol Processor, all data is stored in the "bolprocessor" fold­er locat­ed in the "htdocs" fold­er cre­at­ed by MAMP or XAMPP. Read the instal­la­tion instruc­tions for more details. This is accept­able in most cas­es because Bol Processor data is basi­cal­ly made of text files that do not take up much space.

However, there are a num­ber of rea­sons why a user might want to store data in loca­tions oth­er than the "bolprocessor" fold­er:

  1. Need for addi­tion­al space
  2. Avoid stor­ing data on the start­up disk
  3. Sharing data with oth­er appli­ca­tions and oth­er users
  4. Sharing data via a cloud device (e.g. DropBox).

A pro­ce­dure for mov­ing the entire "bolprocessor" fold­er is described in the instal­la­tion instruc­tions: for exam­ple, in the MacOS envi­ron­ment. Unfortunately, as of today, the relo­cat­ed instal­la­tion does not work on MacOS with XAMPP after a reboot, unless the "BolProcessorInstaller.pkg" installer is run again. The same prob­lem might exist in both Windows and Linux envi­ron­ments where MAMP or XAMPP is used.

In fact, there is not much inter­est in relo­cat­ing the entire "bolprocessor" fold­er. Moving data fold­ers out­side this fold­er will suf­fice. This tuto­r­i­al will tell you how to do this.

The first time you install the Bol Processor, the "bolprocessor" fold­er will con­tain a unique fold­er called "ctests" for stor­ing data. This fold­er con­tains exam­ples that are updat­ed when a new ver­sion is installed. However, you can use it to store new projects, new sub­fold­ers, etc., which will not be affect­ed by new versions.

You can also cre­ate your own fold­ers (and sub­fold­ers) at the same lev­el as "ctests". The inter­face is designed for the cre­ation, mov­ing and dele­tion of fold­ers and files with­in the "bolprocessor" fold­er. Always use the inter­face. Creating a fold­er (or a file) via the Finder or File Manager may not work, espe­cial­ly with XAMPP, because the own­er may be dif­fer­ent from the Apache server's iden­ti­ty. For geeks: XAMPP runs as "dae­mon" while the Finder runs as your per­son­al identity.

Creating fold­ers and files with­out using the Bol Processor inter­face may result in "per­mis­sion errors" when a file is saved. Indeed, there are workarounds, for those famil­iar with shell scripts, for exam­ple the "change_permissions.sh" script designed for Linux and MacOS. But this is not a pleas­ant way to use the Bol Processor…

In short, always cre­ate fold­ers using the CREATE FOLDERS func­tion in the inter­face. Once cre­at­ed, they can be moved (even with the Finder or File Manager) with­in the "bolprocessor" fold­er, and even renamed. The Bol Processor will always recog­nise them as its own.

Below is an exam­ple of two fold­ers called "data" and "my_data" cre­at­ed at the same lev­el as "ctests":

Now, how can we move a fold­er out­side the "bolprocessor" fold­er? Once we've moved it, the inter­face no longer shows it. For exam­ple, let us do this with "my_data". (The fold­er may be emp­ty or con­tain oth­er fold­ers and files.)

Using the Finder in MacOS, or copy/paste in Windows and Linux, we move "my_data" to the desired loca­tion, for exam­ple a "MUSIC" fold­er at the root of an exter­nal dri­ve called "EXT". Make sure that this loca­tion accepts read/write operations.

At this point, there is no more "my_data" in "bolprocessor", or we delete it using the DELETE FOLDERS but­ton. You can't delete "ctests" with this delete function.

To make "my_data" vis­i­ble again from its remote loca­tion, we need to cre­ate a sym­bol­ic link. Unfortunately, the Bol Processor's inter­face can­not do this due to secu­ri­ty restric­tions. I've spent hours with a chat­bot try­ing to find a workaround!

In MacOS and Linux, the sym­bol­ic link is cre­at­ed from a (Unix) Terminal. In Windows, you will use the Windows PowerShell (admin).

This pro­ce­dure doesn't work with alias­es cre­at­ed by the Finder in MacOS. You real­ly need to use sym­bol­ic links.

MacOS or Linux

Open the Terminal (in the Applications fold­er) and point it to the "htdocs" direc­to­ry. For those unfa­mil­iar with Unix com­mands, you will need to type "cd " (fol­lowed by a space) and drag "htdocs" to the end of this com­mand, then press "return". You can type the instruc­tion "ls -al" to see the con­tents of "htdocs", which con­tains "bolprocessor", "ctests", and more.

Suppose that your "MUSIC" fold­er is on disk "EXT" and you want to link to the relo­cat­ed "my_data" fold­er. Type this command:

ln -s /Volumes/EXT/MUSIC/my_data my_data

This will cre­ate the "my_data" sym­bol­ic link point­ing to the remote "my_data" fold­er. Check that the link has been cre­at­ed by typ­ing "ls -al".

Depending on the disk or disk area used to store relo­cat­ed data, you might encounter prob­lems due to MacOS access restric­tions, espe­cial­ly if the System Integrity Protection (SIP) is enabled.

If you are using a recent installer (as of 3 Feb 2025) and a XAMPP Apache serv­er, the 'daemon' iden­ti­ty used by XAMPP is auto­mat­i­cal­ly added to the 'admin', 'wheel' and 'staff' groups which are com­mon­ly used by the Finder.

There are prob­a­bly few­er restric­tions with MAMP because this serv­er runs under your per­son­al iden­ti­ty, and file own­ers are set to that identity.

Windows

Right-click the start icon at the bot­tom left of the screen, and select Windows PowerShell (admin). Then type the fol­low­ing com­mand to cre­ate a sym­bol­ic link — in fact a junc­tion (/J instead of /D):

cmd /c mklink /J "C:\MAMP\htdocs\bolprocessor\my_data" "D:\MUSIC\my_data"

If you are using XAMPP, replace "\MAMP\" with "\xampp\".

Depending on the disk or disk area used to store relo­cat­ed data, you may encounter issues due to Windows 10 access restrictions.

For exam­ple, mov­ing your data to the OneDrive direc­to­ry won't work by default. If you must keep the tar­get fold­er inside OneDrive, you must dis­able the syn­chro­ni­sa­tion of your files:

  • Open OneDrive Settings
  • Go to "Choose fold­ers"
  • Uncheck your data folder(s).

Return to the Bol Processor

Now, the BolProcessor inter­face will show "my_data" as if the fold­er was in "bolprocessor". If it doesn't, make sure that the paths used to cre­ate the link were correct.

Make sure that you can cre­ate and save data in the relo­cat­ed fold­er. Welcome to shared projects!

Control of NoteOn/NoteOff

   

This page is intend­ed for devel­op­ers of the Bol Processor BP3 (read instal­la­tion). It is not a for­mal descrip­tion of the algo­rithms car­ried by the console's C code, but rather an illus­tra­tion of their man­age­ment of musi­cal process­es, which may be use­ful for check­ing or extend­ing algorithms.

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 "-se.checkNoteOff" set­tings of the project.

Read also: Csound check­up

Superimposed notes

Consider this example:

{C4____, -C4__-, --C4--} D4

Two (or more) con­sec­u­tive NoteOns of the same note and the same chan­nel should not be sent to a MIDI instru­ment. Nevertheless, the attacks of C4, which occur at the 1.00 s and 2.00 s times in this exam­ple, should be audi­ble. To achieve this, they are auto­mat­i­cal­ly pre­ced­ed by a NoteOff.

The list of NoteOn/NoteOff events is as follows:

NoteOn C4 chan­nel 1 at 0 ms
NoteOff C4 channel 1 at 1000 ms
NoteOn C4 chan­nel 1 at 1000 ms
NoteOff C4 channel 1 at 2000 ms
NoteOn C4 chan­nel 1 at 2000 ms
NoteOff C4 chan­nel 1 at 5000 ms
NoteOn D4 chan­nel 1 at 5000 ms
NoteOff D4 chan­nel 1 at 6000 ms

This fea­ture is not nec­es­sary for the cre­ation of Csound scores. The score gen­er­at­ed by this exam­ple is as follows:

i1 0.000 5.000 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 1.000 3.000 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 2.000 1.000 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 5.000 1.000 8.02 90.000 90.000 0.000 0.000 0.000 0.000 ; D4

Below we will show a refine­ment of this process for fast move­ments: read Dealing with fast move­ments.

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.

Below we will deal with the elim­i­na­tion of some NoteOns except in fast move­ments: read Dealing with fast move­ments.

The fol­low­ing exam­ple is the (slowed down) first mea­sure of François Couperin's Les Ombres Errantes (1730) (read page) with a quan­ti­za­tion of 50 ms and a ran­domi­sa­tion of 50 ms:

_tempo(1/2) _rndtime(50) {{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}}

First mea­sure of François Couperin's Les Ombres Errantes (1730) with quan­ti­za­tion and ran­domised NoteOns

These rel­a­tive­ly high val­ues have been cho­sen to show that the order of notes is respect­ed in fast move­ments. Quantization (typ­i­cal­ly 20 ms) is gen­er­al­ly nec­es­sary to play a com­pli­cat­ed poly­met­ric struc­ture, such as an entire piece of music. Once the times of the NoteOns have been cal­cu­lat­ed and round­ed to the quan­ti­za­tion grid, they are giv­en small ran­dom changes. However, notes in a fast motion (C5 B4 C5) and the first note after this motion (B4) are exclud­ed from the randomisation.

Duplication of notes 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, again 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. This can be done in sev­er­al ways. (For geeks) we present the old method (before ver­sion BP3.2) and the new one.

The old method

Events list­ed by the PianoTeq synthesiser

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.

The new method

In the old method, sequences of NoteOn and Noteoff of the same note could be sent to the syn­the­sis­er at the same time. This worked because the NoteOn/Noteoff order was respect­ed, and they could be processed by the syn­the­sis­er even if the times were (almost) iden­ti­cal. The new method aims to elim­i­nate this case.

To achieve this, the machine cal­cu­lates "MaxDeltaTime", an esti­mate of the max­i­mum time between two NoteOns (of the same note and chan­nel), beyond which they should be inter­pret­ed as sep­a­rate events. If dates are ran­domised by _rndtime(x), then MaxDeltaTime is set to 2 times x. Otherwise it is set to 2 times the quan­ti­za­tion. If there is no quan­ti­za­tion and no ran­domi­sa­tion, it is set to 20 milliseconds.

A Trace NoteOn/Noteoff option can be select­ed in the new ver­sion to dis­play the sequence of notes along with indi­ca­tions of deci­sions made to send or keep a NoteOn mes­sage. Here is the sequence for the first mea­sure of Couperin's Les Ombres Errantes ran­domised to ± 50 ms and quan­ti­fied to 20 ms. Therefore, we expect MaxDeltaTime to be set to 100 milliseconds.

_tempo(1/2) _rndtime(50) {{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}}

The NoteOn/NoteOff trace is as follows:

NoteOn Eb4 chan­nel 1 at 2 ms
NoteOn C5 chan­nel 1 at 14 ms
? Eb4 channel 1 at = 27 ms, last = 2, delta = 25 > 100 ms ¿
NoteOn G4 chan­nel 1 at 1031 ms
? C5 channel 1 at = 1955 ms, last = 14, delta = 1941 > 100 ms ¿
NoteOff C5 chan­nel 1 at 1955 ms
NoteOn C5 chan­nel 1 at 1955 ms
NoteOn D4 chan­nel 1 at 1995 ms
NoteOff Eb4 chan­nel 1 at 2002 ms
? D4 chan­nel 1 at = 2030 ms, last = 1995, delta = 35 > 100 ms ¿
NoteOff G4 chan­nel 1 at 2031 ms
NoteOn B4 chan­nel 1 at 2159 ms
? C5 channel 1 at = 2316 ms, last = 1955, delta = 361 > 100 ms ¿
NoteOff C5 chan­nel 1 at 2316 ms
NoteOn C5 chan­nel 1 at 2316 ms
NoteOff B4 chan­nel 1 at 2326 ms
NoteOff C5 chan­nel 1 at 2483 ms
NoteOn B4 chan­nel 1 at 2497 ms
NoteOn F4 chan­nel 1 at 2961 ms
NoteOn C4 chan­nel 1 at 3951 ms
NoteOff F4 chan­nel 1 at 3961 ms
NoteOff D4 chan­nel 1 at 3995 ms
NoteOff B4 chan­nel 1 at 3997 ms
NoteOn Eb5 chan­nel 1 at 4031 ms
? C4 chan­nel 1 at = 4040 ms, last = 3951, delta = 89 > 100 ms ¿
NoteOn Eb4 chan­nel 1 at 4981 ms
NoteOff C4 chan­nel 1 at 5951 ms
NoteOff Eb4 chan­nel 1 at 5981 ms
NoteOff Eb5 chan­nel 1 at 6431 ms

This trace shows that the machine com­pared the time inter­val between suc­ces­sive NoteOns of the same note and chan­nel. On the green line, this inter­val was 25 ms, which is less than 100 ms, so the Eb4 NoteOn (of the dupli­cat­ed note) was dis­card­ed. On the red lines, the inter­vals were greater than 100 ms and the NoteOns were played.

Channel infor­ma­tion is irrel­e­vant, as micro­ton­al adjust­ments assign a spe­cif­ic chan­nel to each note and its pitch­bend adjust­ment. However, this selec­tion of NoteOns is made pri­or to the assign­ment of spe­cif­ic chan­nels for micro­ton­al corrections.

Dealing with fast movements

The new method (BP3.2.0 and high­er) elim­i­nates NoteOns of the same note and chan­nel if they occur in an inter­val less than MaxDeltaTime. However it takes into account fast move­ments. For example:

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

In this exam­ple, two dif­fer­ent occur­rences of C#4 should be sep­a­rat­ed by less than MaxDeltaTime (100 ms). The fol­low­ing trace shows that the sequence C#4 D4 C#4 (a trill) has been iden­ti­fied as a fast move­ment, and no time sep­a­ra­tion con­di­tion has been applied:

NoteOn C#4 chan­nel 1 at 0 ms
NoteOn E5 chan­nel 1 at 14 ms
NoteOff C#4 chan­nel 1 at 31 ms
NoteOn D4 chan­nel 1 at 31 ms
NoteOff D4 chan­nel 1 at 62 ms
NoteOn C#4 chan­nel 1 at 62 ms
NoteOn B3 chan­nel 1 at 493 ms
NoteOff C#4 chan­nel 1 at 500 ms
NoteOff E5 chan­nel 1 at 514 ms
NoteOn A4 chan­nel 1 at 531 ms
NoteOn E5 chan­nel 1 at 955 ms
NoteOn C#4 chan­nel 1 at 983 ms
NoteOff B3 chan­nel 1 at 993 ms
NoteOff A4 chan­nel 1 at 1031 ms
NoteOff E5 chan­nel 1 at 1455 ms
NoteOff C#4 chan­nel 1 at 1483 ms

A quan­ti­za­tion of 20 ms may not be desir­able for ren­der­ing fast move­ments such as:

{1/16, C4 - E4 F4} {15/16, G4 A4 B4}

The graph­ic shows that notes E4 and F4 have been assigned the same time (60 ms)

If the quan­ti­za­tion is set to 10 ms, the dif­fer­en­ti­a­tion of the tim­ings is retained:

NoteOn C4 chan­nel 1 at 0 ms
NoteOff C4 chan­nel 1 at 15 ms
NoteOn E4 chan­nel 1 at 31 ms
NoteOff E4 chan­nel 1 at 46 ms
NoteOn F4 chan­nel 1 at 46 ms
NoteOff F4 chan­nel 1 at 62 ms
NoteOn G4 chan­nel 1 at 62 ms
NoteOff G4 chan­nel 1 at 375 ms
NoteOn A4 chan­nel 1 at 375 ms
NoteOff A4 chan­nel 1 at 687 ms
NoteOn B4 chan­nel 1 at 687 ms
NoteOff B4 chan­nel 1 at 1000 ms

i1 0.000 0.015 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 0.031 0.015 8.04 90.000 90.000 0.000 0.000 0.000 0.000 ; E4
i1 0.046 0.016 8.05 90.000 90.000 0.000 0.000 0.000 0.000 ; F4
i1 0.062 0.313 8.07 90.000 90.000 0.000 0.000 0.000 0.000 ; G4
i1 0.375 0.312 8.09 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 0.687 0.313 8.11 90.000 90.000 0.000 0.000 0.000 0.000 ; B4

Created by Bernard Bel, January 2025

Install the Bol Processor (BP3)

Installing the Bol Processor BP3 does not require any pro­gram­ming skills. Just down­load and run the installers for MacOS and Windows, or the instal­la­tion scripts for Linux.

To use the Bol Processor BP3, you first need to install a local Apache HTML/PHP serv­er on your desk­top com­put­er. This serv­er runs a ded­i­cat­ed "web ser­vice" that is restrict­ed to your com­put­er. Only PHP (with its GD Graphics option) needs to be run­ning, as no data­base is used by the Bol Processor interface.

On MacOS and Windows we rec­om­mend MAMP or XAMPP, both of which are Apache servers with pre-installed fea­tures. On Linux, XAMPP is the only choice. This part of the imple­men­ta­tion is described on the pages that show the instal­la­tion of BP3 in the dif­fer­ent envi­ron­ments, see below.

Once you've installed MAMP or XAMPP, installing Bol Processor is almost a one-click process.

MacOS users can quick­ly do the instal­la­tion using a (cer­ti­fied) installer called BolProcessorInstaller.pkg.
Follow instruc­tions on this page.

Windows users can quick­ly do the instal­la­tion using a (cer­ti­fied) installer called BolProcessorInstaller.exe.
Follow instruc­tions on this page.

Linux users can quick­ly do the instal­la­tion using ded­i­cat­ed scripts.
Follow instruc­tions on this page.

👉   Once you've installed the Bol Processor BP3, vis­it this page to famil­iarise your­self with how to use it.

The file structure of your installation

👉  Only for geeks!

Let us assume that your instal­la­tion was suc­cess­ful. It cre­at­ed a "htdocs/bolprocessor" fold­er.

The file struc­ture inside this fold­er is shown on the left. There is noth­ing relat­ed to Bol Processor out­side of this folder.

This image includes "bp" which is the com­piled ver­sion of the BP3 con­sole for MacOS. The con­sole is called "bp.exe" in Windows and "bp3" in Linux. In Linux, "bp3" will not be vis­i­ble imme­di­ate­ly after the instal­la­tion because it needs to be cre­at­ed (in a sin­gle click) by the com­pil­er. In Windows, "bp.exe" is installed, so that no com­pi­la­tion is required. The same is true for "bp" in MacOS.

The "temp_bolprocessor" and "my_output" fold­ers are auto­mat­i­cal­ly cre­at­ed when the inter­face is run. The con­tents of the "temp_bolprocessor" fold­er is cleared of all files/folders old­er than 24 hours which were cre­at­ed in a dif­fer­ent session.

Another fold­er called "midi_resources" is also cre­at­ed to store the set­tings for your real-time MIDI input and out­put ports.

Two addi­tion­al fold­ers, "csound_resources" and "tonality_resources", are cre­at­ed by the instal­la­tion and filled with data shared by all projects.

Running the inter­face will also cre­ate "BP2_help.html" in the "php" fold­er using "BP2_help.txt" as its source.

The "ctests" fold­er — which we call a work­space — con­tains sam­ple mate­r­i­al used to check the oper­a­tion of Bol Processor and to illus­trate some musi­co­log­i­cal issues. It is updat­ed by the instal­la­tion scripts each time you upgrade to a new version.

If you cre­ate new mate­r­i­al in the "ctests" work­space it won't be delet­ed by upgrades. However, if you mod­i­fy files that come from the dis­tri­b­u­tion, they will revert to the cur­rent dis­tri­b­u­tion ver­sion on each upgrade. It is there­fore a good idea to keep a copy of the "ctests" fold­er, as you are like­ly to mod­i­fy some of its data files while using the pro­gram. You may want to restore the orig­i­nal ver­sions lat­er. You can also cre­ate your own work­spaces (in tree struc­tures) using your computer's file manager.

Produce all items

 
The core of the Bol Processor, in all its ver­sions, is an infer­ence engine capa­ble of gen­er­at­ing  'items'  — strings of vari­ables and ter­mi­nal sym­bols — treat­ed like the score of a musi­cal work. The infer­ence engine does this through the use of rules from a for­mal grammar.

In its ini­tial ver­sions (BP1 and BP2), the infer­ence engine was also able to analyse a score — for exam­ple, a sequence of drum beats — to check its valid­i­ty against the cur­rent gram­mar. This fea­ture is not (yet) imple­ment­ed in BP3.

A brief presentation of grammars

The gram­mars used by the Bol proces­sor are sim­i­lar to those described in for­mal lan­guage the­o­ry with a com­pre­hen­sive layout:

  • Rules can be context-sensitive, includ­ing with remote con­texts on the left and the right.
  • Rules can con­tain pat­terns of exact or pseu­do rep­e­ti­tions of frag­ments. Pseudo rep­e­ti­tions make use of trans­for­ma­tions (homo­mor­phisms) on the ter­mi­nal symbols.
  • A ter­mi­nal sym­bol rep­re­sents a time object which can be instan­ti­at­ed as a sim­ple note or a sound object, i.e. a sequence of sim­ple actions (MIDI mes­sages or Csound score lines).
  • The gram­mars are lay­ered — we call them 'trans­for­ma­tion­al'. The infer­ence engine first does every­thing it can with the first gram­mar, then jumps to the sec­ond, and so on.

The “produce all items” procedure

Grammars can pro­duce infi­nite strings of sym­bols if they con­tain recur­sive rules. This is of no prac­ti­cal use in the  Bol Processor, as it will even­tu­al­ly lead to a mem­o­ry over­flow. When recur­sive rules are used, con­trol is exer­cised by dynam­i­cal­ly decreas­ing rule weights or using  'flags'  to inval­i­date recursivity.

This means that the machine only gen­er­ates finite lan­guages with­in its tech­ni­cal lim­i­ta­tions. Theoretically, it should be able to enu­mer­ate all pro­duc­tions. This is the aim of the "pro­duce all items" pro­ce­dure. In addi­tion, iden­ti­cal items are not repeat­ed; to this effect, each new item is com­pared with the pre­ced­ing ones.

For geeks: This is done by stor­ing pro­duc­tions in a text file which is scanned for rep­e­ti­tions. The effi­cien­cy of this method depends on the tech­nol­o­gy of the work­ing disk. A SSD is high­ly recommended!

A simple example

Let us start with a very sim­ple gram­mar "-gr.tryAllItems0" which is made up of two lay­ers of subgrammars:

-se.tryAllItems0
-al.abc

RND
gram#1[1] S --> X X X
gram#1[2] S --> X X
-----
RND
gram#2[1] X --> a
gram#2[2] X --> b

The RND instruc­tion indi­cates that the rules in the gram­mar will be select­ed ran­dom­ly until no rule applies. The first sub­gram­mar pro­duces either "X X X" or "X X", then the machine jumps to the sec­ond sub­gram­mar to replace each 'X' with either 'a' or 'b'.

In the " Produce all items" mode, rules are called in sequence, and their deriva­tions are per­formed by pick­ing up the left­most occur­rence of the left argu­ment in the work string.

In the set­tings of " tryAllItems0 " (see pic­ture), "Produce all items" is checked. A para­me­ter " Max items pro­duced" can be used to lim­it the num­ber of productions.

The out­put is set to "BP data file" for this demo, although real-time MIDI, MIDI files and Csound score are pos­si­ble because 'a' and 'b' are defined as sound-objects. However, the sound out­put is com­plete­ly irrel­e­vant with this sim­ple grammar.

Any pro­duc­tion that still con­tains a vari­able is dis­card­ed. This nev­er hap­pens with the " tryAllItems0 " grammar.

The pro­duc­tion of this gram­mar is:

a a a
a a b
a b a
a b b
b a a
b a b
b b a
b b b
a a
a b
b a
b b

All the steps are shown on the self-explanatory trace:

S
X X X
a X X
a a X
a a a
a a b
a X a
a a a
a b a
a b X
a b a
a b b
a X b
a a b
a b b
X a X
a a X
a a a
a a b
X a a
a a a
b a a
b a X
b a a
b a b
X a b
a a b
b a b
X X a
a X a
a a a
a b a
X a a
a a a
b a a
b X a
b a a
b b a
X b a
a b a
b b a
b X X
b a X
b a a
b a b
b X a
b a a
b b a
b b X
b b a
b b b
b X b
b a b
b b b
X b X
a b X
a b a
a b b
X b a
a b a
b b a
b b X
b b a
b b b
X b b
a b b
b b b
X X b
a X b
a a b
a b b
X a b
a a b
b a b
b X b
b a b
b b b
X b b
a b b
b b b
X X
a X
a a
a b
X a
a a
b a
b X
b a
b b
X b
a b
b b

A pattern grammar

Let us mod­i­fy "-gr.tryAllItems0" as follows:

-se.tryAllItems0
-al.abc

RND
gram#1[1] S --> (= X) X (: X)
gram#1[2] S --> X X
-----
RND
gram#2[1] X --> a
gram#2[2] X --> b

The first rule gram#1[1] con­tains a pat­tern of exact rep­e­ti­tion: the third 'X' should remain iden­ti­cal to the first one. Keeping the pat­tern brack­ets, the pro­duc­tion would be:

(= a) a (: a)
(= a) b (: a)
(= b) a (: b)
(= b) b (: b)
a a
a b
b a
b b

This out­put shows that the third ter­mi­nal sym­bol is a copy of the first. These items can be played on MIDI or Csound, as the machine will remove struc­tur­al mark­ers. However, struc­tur­al mark­ers can also be delet­ed on the dis­play by plac­ing a " _destru" instruc­tion under the "RND" of the sec­ond sub­gram­mar. This yields

a a a
a b a
b a b
b b b
a a
a b
b a
b b

To become more famil­iar with pat­terns (includ­ing embed­ded forms), try "-gr.tryDESTRU" in the "ctests" fold­er.

A more complex example

Consider the fol­low­ing gram­mar "-gr.tryAllItems1" in the "ctests" fold­er:

RND
gram#1[1] S --> X Y /Flag = 2/ /Choice = 1/
-----
RND
gram#2[1] /Choice = 1/ /Flag - 1/ X --> C1 X
gram#2[2] /Choice = 2/ X --> C2 X _repeat(1)
gram#2[3] <100-50> /Choice = 3/ X --> C3 X
gram#2[4] X --> C4 _goto(3,1)
gram#2[5] Y --> D3
Gram#2[6] X --> T
-----
RND
gram#3[1] T --> C5 _failed(3,2)
gram#3[2] Y --> D6

This gram­mar uses a flag 'Choice' to select which of the rules 1, 2 or 3 will be used in sub­gram­mar #2. Just change its val­ue to try a dif­fer­ent option, as they pro­duce the same 'lan­guage'. Terminals are sim­ple notes in the English con­ven­tion: C1, C2, etc. 

The flag 'Flag' is set to 2 by the first rule. If 'Choice' is equal to 1, rule gram#2[1] is applied, and it can only be applied twice due to the decre­men­ta­tion. This ensures that the lan­guage will be finite.

Rule gram#2[4] con­tains a "_goto(3,1)" instruc­tion. Whenever it is fired, the infer­ence engine will leave sub­gram­mar #2 and jump to rule #1 of sub­gram­mar #3. If the rule is a can­di­date, it will be used and the engine will con­tin­ue to look for can­di­date rules in sub­gram­mar #3. If the gram#3[1] rule is not applic­a­ble, the engine will jump to rule #2 of sub­gram­mar #3, as instruct­ed by "_failed(3,2)". In fact, these _goto() and _failed() instruc­tion have no effect on the final pro­duc­tion, but they do mod­i­fy the trace.

If 'Choice' is equal to 2, the " _repeat(1)" instruc­tion will force the gram#2[2] rule to be applied two times. If 'Choice' is equal to 3, the rule gram#2[3] will be applied twice because it has an ini­tial weight of 100 which is reduced by 50 after each appli­ca­tion. When it reach­es zero, the rule is neutralised.

For all val­ues of 'Choice' the pro­duc­tion is:

C1 C1 C4 D6
C1 C1 C4 D3
C1 C1 C5 D3
C1 C1 C5 D6
C1 C4 D6
C1 C4 D3
C1 C5 D3
C1 C5 D6
C4 D6
C4 D3
C5 D3
C5 D6

Since you insist, here is the out­put played in real time on a Pianoteq instrument!

We hope for more con­vinc­ing musi­cal examples. 😀

Capture MIDI input

Work in progress

Capturing MIDI input opens the way to "learn­ing" from the per­for­mance of a musi­cian or anoth­er MIDI device. The first step is to use the cap­tured incom­ing NoteOn/Noteoff events, and option­al­ly ControlChange and PitchBend events, to build a poly­met­ric struc­ture that repro­duces the stream.

The dif­fi­cul­ty of this task lies in the design of the most sig­nif­i­cant poly­met­ric struc­ture — for which AI tools may prove help­ful in the future. Proper time quan­ti­za­tion is also need­ed to avoid over­ly com­pli­cat­ed results.

We've made it pos­si­ble to cap­ture MIDI events while oth­er events are play­ing. For exam­ple, the out­put stream of events can pro­vide a frame­work for the tim­ing of the com­pos­ite per­for­mance. Consider, for instance, the tem­po set by a bass play­er in a jazz improvisation.

The _capture() command

A sin­gle com­mand is used to enable/disable a cap­ture: _capture(x), where x (in the range 1…127) is an iden­ti­fi­er of the 'source'. This para­me­ter will be used lat­er to han­dle dif­fer­ent parts of the stream in dif­fer­ent ways.

_capture(0) is the default set­ting: input events are not recorded.

The cap­tured events and the events per­formed on them are stored in a 'cap­ture' file in the temp_bolprocessor fold­er. This file will lat­er be processed by the interface.

(Examples are found in the project "-da.tryCapture".

The first step to use _capture() is to set up the MIDI input and more specif­i­cal­ly its fil­ter. It should at least treat NoteOn and NoteOff events. ControlChange and PitchBend mes­sages can also be captured.

If the pass option is set (see pic­ture), incom­ing events will also be heard on the out­put MIDI device. This is use­ful if the input device is a silent device.

It is pos­si­ble to cre­ate sev­er­al inputs con­nect­ed to sev­er­al sources of MIDI events, each one with its own fil­ter set­tings. Read the Real-time MIDI page for more explanations.

Another impor­tant detail is the quan­ti­za­tion set­ting. If we want to con­struct poly­met­ric struc­tures, it may be impor­tant to set the data to the near­est mul­ti­ple of a fixed dura­tion, typ­i­cal­ly 100 mil­lisec­onds. This can be set in the set­tings file "-se.tryCapture".

Simple example

Let us take a look at a very sim­ple exam­ple of a cap­ture on top of a performance.

C4 _D4 _capture(104) E4 F4 G4 _capture(0) A4 B4

The machine will play the sequence of notes C4 D4 E4 F4 G4 A4 B4. It will lis­ten to the input while play­ing E4 F4 G4. It will record both the sequence E4 F4 G4 and the notes received from a source tagged "104".

Suppose that the sequence G3 F3 D3 was played on top of E4 F4 G4. The cap­ture file might look like this:

It should be not­ed that all the dates are approx­i­mat­ed to mul­ti­ples of 100 mil­lisec­onds, i.e. the quan­ti­za­tion. For exam­ple, the NoteOff of input note G3 falls exact­ly on the date 3000 ms, which is the NoteOff of the played note E4.

The record­ing of input and played notes starts at note E4 and ends at note G4, as spec­i­fied by _capture(104) and _capture(0).

An accept­able approx­i­ma­tion of this sequence would be the poly­met­ric expression:

C4 D4 {E4 F4 G4, - - G3 - F3 - D3 - -} A4 B4

Approximations will be auto­mat­i­cal­ly cre­at­ed from the cap­ture files at a lat­er stage.

Pause and capture

MIDI input will con­tin­ue to be cap­tured and timed cor­rect­ly after the Pause but­ton is clicked. This makes it pos­si­ble to play the begin­ning of a piece of music and stop exact­ly where an input is expected.

Combining 'wait' instructions

Try:

_script(wait for C3 channel 1) C4 D4 _capture(104) E4 F4 G4 _script(wait for D3 channel 1) _capture(0) A4 B4

The record­ing takes place dur­ing the exe­cu­tion of E4 F4 G4 and dur­ing the unlim­it­ed wait­ing time for note D3. This allows events to be record­ed even when no events are being played.

The C3 and D3 notes have been used for ease of access on a sim­ple key­board. The dates in the cap­ture file are not incre­ment­ed by the wait times.

The fol­low­ing is a set­up for record­ing an unlim­it­ed sequence of events while no event is being played. Note C0 will not be heard as it has a veloc­i­ty of zero. Recording ends when the STOP or PANIC but­ton is clicked.

_capture(65) _vel(0) C0 _script(wait forever) C0

Interpreting the record­ed input as a poly­met­ric struc­ture will be made more com­plex by the fact that no rhyth­mic ref­er­ence has been provided.

Microtonal corrections

In the fol­low­ing exam­ple, both input and out­put receive micro­ton­al cor­rec­tions of the just into­na­tion scale.

_scale(just intonation,0) C4 D4 _capture(104) E4 F4 G4 A4 _capture(0) B4

Below is a cap­ture file obtained by enter­ing G3 F3 D3 over the sequence E4 F4 G4 A4. Note the pitch­bend cor­rec­tions in the last col­umn, which indi­cate micro­ton­al adjust­ments. The rel­e­vant val­ues are those that pre­cede NoteOns on the same channel.

The out­put events (source 0) are played on MIDI chan­nel 2, and the input events (source 104) on MIDI chan­nel 1. More chan­nels will be used if out­put notes have an over­lap — see the page MIDI micro­tonal­i­ty. In this way, pitch­bend com­mands and the notes they address are dis­trib­uted across dif­fer­ent channels.

Added pitchbend

In the fol­low­ing exam­ple, a pitch­bend cor­rec­tion of +100 cents is applied to the entire piece. It does mod­i­fy out­put events, but it has no effect on input events.

_pitchrange(200) _pitchbend(+100) _scale(just intonation,0) C4 D4 _capture(104) E4 F4 G4 A4 _capture(0) B4

Again, after play­ing G3 F3 D3 over the sequence E4 F4 G4 A4:

Pitchbend cor­rec­tions applied to the input (source 104) are only those induced by the micro­ton­al scale. Pitchbend cor­rec­tions applied to the out­put (source 0) are the com­bi­na­tion of micro­ton­al adjust­ments (see pre­vi­ous exam­ple) and the +100 cents of the pitch­bend command.

Capturing and recording more events

The _capture() com­mand allows you to cap­ture most types of MIDI events: all 3-byte types, and the 2-byte type Channel pres­sure (also called Aftertouch).

Below is a (com­plete­ly unmu­si­cal) exam­ple of cap­tur­ing dif­fer­ent messages.

The cap­ture will take place in a project called "-da.tryReceive":

_script(wait for C0 chan­nel 1) _capture(111) D4 _pitchrange(200) _pitchbend(+50) _press(35) _mod(42) D4 _script(wait forever)

The record­ing will have a "111" mark­er to indi­cate which events have been received. Only two notes D4 are played dur­ing the record­ing, the sec­ond one is raised by 50 cents and has a chan­nel pres­sure of 35 and a mod­u­la­tion of 42.

After play­ing back the two D4s, the machine will wait until the STOP but­ton is clicked. This gives the oth­er machine time to send its own data and have it recorded.

The sec­ond machine is anoth­er instance of BP3 — actu­al­ly anoth­er tag on the interface's brows­er with the "-da.trySend" project:

{_vel(0) <<C0>>} G3 _press(69) _mod(5430) D3 _pitchrange(200) _pitchbend(+100) E3

This project will start by send­ing "{_vel(0) <<C0>>} " which is the note C0 with veloc­i­ty 0 and dura­tion null (an out-time object). This will trig­ger "-da.tryReceive" which wait­ed for C0. The curly brack­ets {} restrict veloc­i­ty 0 to the note C0. Outside of this expres­sion, the veloc­i­ties are set to their default val­ue (64). In this data, chan­nel pres­sure, mod­u­la­tion and a pitch­bend cor­rec­tion of +100 cents are applied to the final note E3.

The result­ing sound is ter­ri­ble, you've been warned:

Performed and cap­tured events. Forget the way it sounds and look at the file below!

However, the 'cap­ture' file shows that all events have been cor­rect­ly recorded:

Captured events (from "-da.trySend") are coloured red. They have been auto­mat­i­cal­ly assigned to MIDI chan­nel 2, so that cor­rec­tions will not be mixed between per­for­mance and reception.

The pitch­bend cor­rec­tions are shown in the "cents cor­rec­tion" col­umn, each applied to its own channel.

The chan­nel pres­sure cor­rec­tions (coloured blue) dis­play the expect­ed val­ues. The mod­u­la­tion cor­rec­tions (in the range 0 to 16383) are divid­ed into two 3-byte mes­sages, the first car­ry­ing the MSB and the sec­ond the LSB.

There is a time mis­match of approx­i­mate­ly 150 mil­lisec­onds between the expect­ed and actu­al dates, but the dura­tions of the notes are accu­rate. The mis­match is caused by the delay in the trans­mis­sion of events over the vir­tu­al port. The data looks bet­ter if the quan­ti­za­tion in the "-da.tryReceive" project is set to 100 ms instead of 10 ms. However, this is of minor impor­tance, as a "nor­mal­i­sa­tion" will take place dur­ing the (forth­com­ing) analy­sis of the "cap­ture" file.

For geeks: The last col­umn indi­cates where events have been record­ed in the pro­ce­dure sendMIDIEvent(), file MIDIdriver.c.

Capture events without the need to perform

The set­up of the "-da.tryReceive" project should be for example:

_capture(99) _vel(0) C4 _script(wait forever)

Note C4 is not heard due to its veloc­i­ty 0. It is fol­lowed with all MIDI events received by the input until the STOP but­ton is clicked. This makes it pos­si­ble to record an entire per­for­mance. The pro­ce­dure can be checked with items pro­duced and per­formed by the Bol Processor.

Note that the inclu­sion of pitch­bend mes­sages makes it pos­si­ble to record music played on micro­ton­al scales and (hope­ful­ly) iden­ti­fy the clos­est tun­ings suit­able for repro­duc­tion of the piece of music.

For exam­ple, try to cap­ture the fol­low­ing phrase from Oscar Peterson's Watch What Happens:

_tempo(2) {4, {{2, F5 Bb4 C5 C4} {3/2, D4} {1/2, Eb4 Db4 D4}, {F4, C5} {1/2, F4, G4} {1/2, F3, G3} {2, Gb3}}}, {4, {C4 {1, Bb3 Bb2} {2, A2}, {D3, A3} {1, Eb3 Eb2} {2, D2}}}

This phrase was import­ed from a MusicXML score (read page)

The result is com­plex, but it's going to lend itself to being analysed automatically:

0 F5 NoteOn 77 64
0 F4 NoteOn 65 64
0 C5 NoteOn 72 64
0 C4 NoteOn 60 64
0 D3 NoteOn 50 64
0 A3 NoteOn 57 64
230 F5 NoteOff 77 0
230 Bb4 NoteOn 70 64
470 Bb4 NoteOff 70 0
470 C5 NoteOff 72 0
470 C5 NoteOn 72 64
470 F4 NoteOff 65 0
470 C5 NoteOff 72 0
470 F4 NoteOn 65 64
470 G4 NoteOn 67 64
470 C4 NoteOff 60 0
470 Bb3 NoteOn 58 64
470 D3 NoteOff 50 0
470 A3 NoteOff 57 0
470 Eb3 NoteOn 51 64
710 C5 NoteOff 72 0
710 C4 NoteOn 60 64
710 F4 NoteOff 65 0
710 G4 NoteOff 67 0
710 F3 NoteOn 53 64
710 G3 NoteOn 55 64
710 Bb3 NoteOff 58 0
710 Bb2 NoteOn 46 64
710 Eb3 NoteOff 51 0
710 Eb2 NoteOn 39 64
960 C4 NoteOff 60 0
960 D4 NoteOn 62 64
960 F3 NoteOff 53 0
960 G3 NoteOff 55 0
960 F#3 NoteOn 54 64
960 Bb2 NoteOff 46 0
960 A2 NoteOn 45 64
960 Eb2 NoteOff 39 0
960 D2 NoteOn 38 64
1730 D4 NoteOff 62 0
1730 Eb4 NoteOn 63 64
1830 Eb4 NoteOff 63 0
1830 C#4 NoteOn 61 64
1880 C#4 NoteOff 61 0
1880 D4 NoteOn 62 64
1960 D4 NoteOff 62 0
1960 F#3 NoteOff 54 0
1960 A2 NoteOff 45 0
1960 D2 NoteOff 38 0

Only sig­nif­i­cant columns are dis­played. The ori­gin of dates is set to the first NoteOn or NoteOff received.

The next task on our agen­da will be to analyse the 'cap­ture' file and recon­struct the orig­i­nal poly­met­ric expres­sion (shown above) or an equiv­a­lent ver­sion. Then we can con­sid­er mov­ing on to gram­mars, sim­i­lar to what we've done with import­ed MusicXML scores (read page).

Donations

    

From the out­set, I have viewed the "Bol Processor" project as a research endeav­or rather than a straight­for­ward soft­ware design project. Its focus is on "com­pu­ta­tion­al musi­col­o­gy," which involves using com­pu­ta­tion­al mod­els to explore musi­col­o­gy across and beyond cul­tur­al boundaries.

This project rep­re­sents a long-term com­mit­ment to devel­op­ing music cre­ation tools that address musi­co­log­i­cal chal­lenges, rather than sim­ply recom­bin­ing pre-composed music or sound frag­ments. Our cur­rent goal is to inte­grate this approach with high-quality music and sound edi­tors used by com­posers and sound designers.

The research nature of this project neces­si­tates an open-access eth­ic. As such, the "Bol Processor" — includ­ing its instal­la­tion and source files — will remain freely acces­si­ble. Software devel­op­ers are encour­aged to reuse the source code to cre­ate vari­ants or updat­ed ver­sions of BP3.

However, there is a prac­ti­cal rea­son why I have cho­sen not to decline per­son­al dona­tions: I am increas­ing­ly incur­ring costs for var­i­ous tools required for soft­ware devel­op­ment. These include host­ing fees, the remu­ner­a­tion of "vir­tu­al" assis­tants (AI tools), and, when nec­es­sary, human experts.

For this rea­son, if you are so inclined, you can make a dona­tion using the PayPal link below. Any funds not used for project relat­ed activ­i­ties will be trans­ferred to charities.

Bernard Bel

https://www.paypal.com/donate/?hosted_button_id=WQSG23AMN7BLG

MIDI microtonality

 

This page is a demo of the han­dling of micro­tonal­i­ty in the real-time MIDI and MIDI file envi­ron­ments of the Bol Processor BP3  (ver­sion 3.0.7 and high­er). Install BP3 by fol­low­ing the instruc­tions for  MacOSLinux and Windows on the page Bol Processor 'BP3' and its PHP inter­face.

All exam­ples here are from the "-da.tryMPE" project, which is part of the ctests fold­er (down­load here). The syn­tac­tic mod­el for micro­tonal­i­ty is explained here. For details on work­ing with real-time MIDI, read the Real-time MIDI page. Some Csound scores are shown for the sake of clar­i­ty, as the han­dling of micro­tonal­i­ty in the Csound envi­ron­ment of BP3 pro­duces the same results as MIDI.

👉 The fol­low­ing is a com­pre­hen­sive but detailed pre­sen­ta­tion of all aspects of the use of micro­tonal­i­ty in BP3. It is not nec­es­sary to under­stand the details when start­ing with micro­tonal­i­ty! The expla­na­tion is only intend­ed to assist musi­cians who wish to cre­ate new mate­r­i­al by com­bin­ing sev­er­al tun­ing schemes in the same musi­cal work. To try the micro­ton­al process on real musi­cal works, lis­ten for instance to the com­par­i­son of tem­pera­ments, or play François Couperin's Les Ombres Errantes (in the ctests/Imported_MusicXML folder) on a MIDI instru­ment using its opti­mal tun­ing scheme rameau_en_sib:

Couperin's Les Ombres Errantes, Csound ren­der­ing with scale rameau_en_sibImage

For geeks: Microtonality in real-time MIDI and MIDI files mim­ics the MIDI Polyphonic Expression (MPE) method of mod­i­fy­ing pitch­bend val­ues on notes dis­trib­uted on sep­a­rate chan­nels (up to 15 simul­ta­ne­ous notes). However, it works on devices that are not MPE-compliant.

Check pitchbender sensitivity

Make sure that your out­put MIDI device is sen­si­tive to pitch­bend mes­sages. Try the following:

_chan(2) C4 _pitchrange(200) _pitchbend(+100) E4 _pitchbend(+200) C4 _pitchbend(-200) C4 _pitchbend(0) C4

You should hear C4 F4 D4 Bb3 C4 instead of C4 C4 C4 C4 C4. This shows that the MIDI device accepts pitch­bend mes­sages and that its range is ± 200 cents, or ± 2 semi­tones. This is the range we use for microtonality.

For geeks: The actu­al val­ues are in the range 0 - 16383, but thanks to the "_pitchrange(200)" instruc­tion, the actu­al cent val­ues can be used.

When using micro­ton­al scales, this pitch range of ± 200 cents is set auto­mat­i­cal­ly by send­ing an appro­pri­ate mes­sage to the 16 MIDI channels.

The "_pitchbend()" com­mands will be tak­en care of, and their val­ues will be added to the pitch­bend com­mands that adjust the pitch­es to the micro­ton­al scale. If this com­bi­na­tion exceeds the range of ± 200 cents, an error mes­sage will be displayed.

MIDI channels

In the pre­vi­ous exam­ple, MIDI events (notes and pitch­ben­der com­mands) were sent on chan­nel 2. This is to ensure that your MIDI out­put device is receiv­ing and mix­ing all chan­nels, tech­ni­cal­ly MIDI mode 4 (omni off, mono).

It was pos­si­ble to send mes­sages on chan­nel 2 because the Microtonality mode was not set. This mode is set on as a "_scale()" com­mand is found. In this case, the "_chan()" com­mands are ignored, as all chan­nel assign­ments are made by the micro­tonal­i­ty process.

Diapason tuning

Since note fre­quen­cies are dis­played when the Trace micro­tonal­i­ty mode is acti­vat­ed in "-se.tryMPE", the tun­ing of the dia­pa­son (note A4/la 3 on a con­ven­tion­al key­board) is important.

By default (in Bol Processor set­tings and on MIDI devices) this set­ting is 440 Hz. If you change the val­ue in the set­tings, the note fre­quen­cies will change accord­ing­ly. The BP3 will send a mes­sage to the MIDI device to tune the dia­pa­son, but many devices do not under­stand this com­mand. (This is the case with PianoTeq Stage.) In this case, tune the device independently.

Microtonal scales

On top of project "-da.tryMPE" you can see the line:

-to.tryMPE

This refers to a tonal­i­ty resource stored in the "tonality_resources" fold­er. This resource has been down­loaded to your com­put­er when run­ning an installer (or a Linux script) as explained on pages Quick install MacOS, Quick install Windows, or Quick install Linux.

At the bot­tom of the project page there is a but­ton called EDIT '-to.tryMPE'. This will take you to this resource:

Here are the scales stored in "-to.tryMPE":

Most of these are "exot­ic" in the sense that they won't pro­duce inter­est­ing music. They have been designed to high­light tech­ni­cal features:

  • The gra­ma scale is an inter­pre­ta­tion of the Indian sys­tem that divides the octave into "twenty-two shrutis", see The two-vina exper­i­ment for details. We use one par­tic­u­lar (prob­a­bly incor­rect) solu­tion, which sets the pra­mana shru­ti at 21 cents. Technically speak­ing — the rea­son for this choice — this scale has 23 grades which count as 22 notes. Click the EDIT but­ton to see its structure.
  • The just into­na­tion scale is a stan­dard scale with 12 grades and 12 notes, prob­a­bly suit­able for use in some har­mon­ic con­texts. Click the EDIT but­ton and dis­play the image to see that it has a wolf's fifth between D and A.
  • The meantone_try scale is pure­ly tech­ni­cal. It has 12 grades and 7 notes. The grades are approx­i­mate­ly semi­tones and the notes sug­gest the white keys of a piano key­board. Another fea­ture is that it has an extend­ed octave of 1219 cents instead of 1200. Notes are labelled by key numbers.
  • The meantone_try2 scale is iden­ti­cal to meantone_try except that its base key is #64 instead of #60. This may be nec­es­sary to use spe­cif­ic key num­bers of the key­board of the MIDI out­put device.
  • The piano scale has 12 grades and 12 notes. It is an equal-tempered scale with an extend­ed octave of 1204 cents. An inter­est­ing point is that all its fifths are per­fect (see pic­ture).
  • The zest24-supergoya17plus3_Db scale was cre­at­ed by import­ing its SCALA def­i­n­i­tion (from this archive). It cov­ers a con­ven­tion­al octave (ratio 2/1) with 20 grades, but the SCALA file did not con­tain any note names. So, 12 notes were cho­sen at ran­dom, with key num­bers as their names.
  • The Bohlen-Pierce scale which has a "tri­tave" inter­val of ratio 3/1 instead of 2/1 in the octave. The tri­tave is divid­ed into 13 grades and 13 notes (see Wikipedia and pic­ture).

These scales cov­er all the cas­es nec­es­sary to check the tech­ni­cal oper­a­tion of micro­tonal­i­ty han­dling in real-time MIDI, MIDI files, and Csound envi­ron­ments. Don't expect to hear inter­est­ing music in the fol­low­ing exam­ples! Only make sure that Trace micro­tonal­i­ty is checked in "-se_tryMPE", so that you can read cent cor­rec­tions in the trace.

Listening to scales

The fol­low­ing are exam­ples of 12-note scales:

_scale(piano,0) C4 C#4 D4 D#4 E4 F4 F#4 G4 G#4 A4 A#4 B4 C5
_velcont _scale(just intonation,0) _vel(120) C4 C#4 D4 D#4 E4 F4 F#4 G4 G#4 A4 A#4 B4 C5 _vel(60)

The sec­ond argu­ment to the "_scale()" com­mand is called the block key. It is the key whose fre­quen­cy should remain equal to that of a con­ven­tion­al 12-grade equal-tempered scale (a stan­dard tun­ing of elec­tron­ic instru­ments). If it is set to 0 or 60, this means that the block key is the 60th key on a piano key­board, usu­al­ly called "mid­dle C" or C4/do3. If the A4/la3 is 440 Hz, key #60 should be 261.63 Hz, which we call the base fre­quen­cy, fol­low­ing the prac­tice in Csound..

See for exam­ple the top of set­tings of the piano scale in the tonal­i­ty resource "-to.tryMPE":

For geeks: The Csound GEN51 line at the top is pure­ly infor­ma­tive. It could be placed on top of Csound scores, but the Bol Processor uses note fre­quen­cies instead when uncon­ven­tion­al posi­tions are required — see Csound tun­ing in BP3.

Looking at the trace of the process when play­ing the "_scale(piano,0)" sequence yields the following:

§ key 60: "C4" chan 2 scale #5, block key 60, corr 0 cents, freq 261.630 Hz
§ key 61: "C#4" chan 2 scale #5, block key 60, corr 0 cents, freq 277.187 Hz
§ key 62: "D4" chan 2 scale #5, block key 60, corr 0 cents, freq 293.670 Hz
§ key 63: "D#4" chan 2 scale #5, block key 60, corr 1 cents, freq 311.312 Hz
§ key 64: "E4" chan 2 scale #5, block key 60, corr 1 cents, freq 329.824 Hz
§ key 65: "F4" chan 2 scale #5, block key 60, corr 1 cents, freq 349.436 Hz
§ key 66: "F#4" chan 2 scale #5, block key 60, corr 2 cents, freq 370.428 Hz
§ key 67: "G4" chan 2 scale #5, block key 60, corr 1 cents, freq 392.229 Hz
§ key 68: "G#4" chan 2 scale #5, block key 60, corr 2 cents, freq 415.792 Hz
§ key 69: "A4" chan 2 scale #5, block key 60, corr 2 cents, freq 440.516 Hz
§ key 70: "A#4" chan 2 scale #5, block key 60, corr 3 cents, freq 466.980 Hz
§ key 71: "B4" chan 2 scale #5, block key 60, corr 2 cents, freq 494.463 Hz
§ key 72: "C5" chan 2 scale #5, block key 60, corr 3 cents, freq 524.168 Hz

The first thing we notice is that the fre­quen­cy of C4 (key #60) is 261.630 Hz, the base fre­quen­cy of the block key. One octave high­er, the fre­quen­cy of C5 is 525.260 Hz. This gives an octave ratio of 2.0034, which equates to a stretch­ing of 3 cents, close to 4 cents due to the rounding.

This is con­firmed by the Csound score:

t 0.000 60
i1 0.000 0.333 261.630 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 0.333 0.333 277.187 90.000 90.000 0.000 0.000 0.000 0.000 ; C#4
i1 0.666 0.334 293.670 90.000 90.000 0.000 0.000 0.000 0.000 ; D4
i1 1.000 0.333 311.312 90.000 90.000 0.000 0.000 0.000 0.000 ; D#4
i1 1.333 0.333 329.824 90.000 90.000 0.000 0.000 0.000 0.000 ; E4
i1 1.666 0.334 349.436 90.000 90.000 0.000 0.000 0.000 0.000 ; F4
i1 2.000 0.333 370.428 90.000 90.000 0.000 0.000 0.000 0.000 ; F#4
i1 2.333 0.333 392.229 90.000 90.000 0.000 0.000 0.000 0.000 ; G4
i1 2.666 0.334 415.792 90.000 90.000 0.000 0.000 0.000 0.000 ; G#4
i1 3.000 0.333 440.516 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 3.333 0.333 466.980 90.000 90.000 0.000 0.000 0.000 0.000 ; A#4
i1 3.666 0.334 494.463 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 4.000 0.333 524.168 90.000 90.000 0.000 0.000 0.000 0.000 ; C5

When the fre­quen­cies are dis­played using the just into­na­tion scale, the octave ratio is exact­ly 2/1. Listen to the scale with decreas­ing velocities:

On the same scale, lis­ten to a series of fifths C4/G4, D4/A4, E4/B4, F5/C5 show­ing that they are per­fect except the wolf's fifth D4/A4 (see pic­ture):

scale(just intonation,0) {C4 D4_ E4_ F4_, G4 A4 B4 C5}

Checking large intervals

Due to round­ing (3 cents instead of 4) in the piano scale, check that round­ing errors do not accu­mu­late over octaves. The fol­low­ing is also an exer­cise for those whose ear is trained in piano tun­ing. We'll play iden­ti­cal notes in two scales: the piano scale with its extend­ed octave, then the stan­dard equal tem­pera­ment scale with an octave of 2/1:

_tempo(1/2) {_scale(piano,0) C2 C3 C4 C5 C6 C7 _scale(0,0) C2 C3 C4 C5 C6 C7 1/16, 1/16 C2 C3 C4 C5 C6 C7 C2 C3 C4 C5 C6 C7}

The instruc­tion "_scale(0,0)" sets the scale to the stan­dard stan­dard equal tem­pera­ment scale. The lay­out of the notes in this poly­met­ric struc­ture is as follows:

There is a short delay (1/16 beat) on the notes of the sec­ond line to empha­sise the beats, if there are any. You can hear beats in the first part, as scales are dif­fer­ent, but per­fect uni­son in the sec­ond part. This is how it sounds on a PianoTeq Stage phys­i­cal mod­el­ling synthesiser:

This result should not be tak­en as a rad­i­cal state­ment about how to tune a piano! Pianoteq syn­the­siz­ers already repro­duce the octave stretch­ing that piano tuners tend to do to com­pen­sate for the inhar­monic­i­ty of the strings. An addi­tion­al octave stretch­ing of four cents is there­fore not worth mentioning.

The trace only shows notes whose fre­quen­cies have been corrected:

§ key 36: "C2" chan 2 scale #6, block key 60, corr -7 cents, freq 65.144 Hz
§ key 48: "C3" chan 2 scale #6, block key 60, corr -3 cents, freq 130.589 Hz
§ key 60: "C4" chan 2 scale #6, block key 60, corr 0 cents, freq 261.630 Hz
§ key 72: "C5" chan 2 scale #6, block key 60, corr 3 cents, freq 524.168 Hz
§ key 84: "C6" chan 2 scale #6, block key 60, corr 7 cents, freq 1050.760 Hz
§ key 96: "C7" chan 2 scale #6, block key 60, corr 11 cents, freq 2106.381 Hz

We note that 5 octaves gives a total stretch of 18 cents, or 3.6 cents per octave. The fre­quen­cy ratio between C4 and C7, three octaves high­er, is 2106.381/261.630 = 8.0509, whose cube root is 2.0042, again very close to the ratio of 2.0046 in the piano scale def­i­n­i­tion. Unsurprisingly, the C-sound score reveals exact­ly the same numbers.

Effect of the block key

Let us super­im­pose two phras­es of the same notes in the same scale but with­out the same block key:

G3 A3 B3 {_scale(just intonation,A4) C4 D4 E4 A4, _scale(just intonation,C4) C5 D5 E5 A5}

It sounds strange, giv­en that the note inter­vals are not exact­ly one octave:

The analy­sis of the trace gives an inter­est­ing result:

§ key 60: "C4" chan 2 scale #3, block key 69, corr 15 cents, freq 263.907 Hz
§ key 72: "C5" chan 3 scale #3, block key 60, corr 0 cents, freq 523.260 Hz
§ key 62: "D4" chan 2 scale #3, block key 69, corr 18 cents, freq 296.739 Hz
§ key 74: "D5" chan 3 scale #3, block key 60, corr 3 cents, freq 588.358 Hz
§ key 64: "E4" chan 2 scale #3, block key 69, corr 2 cents, freq 330.014 Hz
§ key 76: "E5" chan 3 scale #3, block key 60, corr -13 cents, freq 654.334 Hz
§ key 69: "A4" chan 2 scale #3, block key 69, corr 0 cents, freq 440.007 Hz
§ key 81: "A5" chan 3 scale #3, block key 60, corr -15 cents, freq 872.423 Hz

First, key #72 (C5) of scale #4 has 0 cents cor­rec­tion because the block key of this scale is C4 and it has no octave stretch­ing. The same for key #69 (A4) of scale #3 whose block key is A4.

Pitch val­ues can be deduced from the image of the just into­na­tion scale., For instance, A4 (key #69) has 0 cent cor­rec­tion on the score because it is the block key. The cor­rect­ed C4 fre­quen­cy of this scale is 263.907 Hz (i.e. 15 cents above its base fre­quen­cy 261.63 Hz) and the fre­quen­cy ratio for A is 5/3, which yields 440.007 Hz as shown above.

Secondly, since notes C4 and C5 are super­im­posed with dif­fer­ent cent cor­rec­tions, i.e. dif­fer­ent pitch­ben­der set­tings, they must be sent on dif­fer­ent MIDI chan­nels: 2 and 3. This is the approach bor­rowed from MPE. Same for D4/D5, E4/E5, A4/A5. Note that each MIDI chan­nel is reused as soon as it is free of notes.

For geeks: In this exam­ple, the notes G3 A3 B3 played at the begin­ning are not mod­i­fied by a micro­ton­al scale. They are there­fore played on the stan­dard equal tem­pered scale of the MIDI device. As a result, they appear on the Csound score in octave point pitch-class format:

i1 0.000 1.000 7.07 90.000 90.000 0.000 0.000 0.000 0.000 ; G3
i1 1.000 1.000 7.09 90.000 90.000 0.000 0.000 0.000 0.000 ; A3
i1 2.000 1.000 7.11 90.000 90.000 0.000 0.000 0.000 0.000 ; B3
i1 3.000 1.000 263.907 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 3.000 1.000 523.260 90.000 90.000 0.000 0.000 0.000 0.000 ; C5
i1 4.000 1.000 296.739 90.000 90.000 0.000 0.000 0.000 0.000 ; D4
i1 4.000 1.000 588.358 90.000 90.000 0.000 0.000 0.000 0.000 ; D5
i1 5.000 1.000 330.014 90.000 90.000 0.000 0.000 0.000 0.000 ; E4
i1 5.000 1.000 654.334 90.000 90.000 0.000 0.000 0.000 0.000 ; E5
i1 6.000 1.000 440.007 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 6.000 1.000 872.423 90.000 90.000 0.000 0.000 0.000 0.000 ; A5

Effect of the base key

The meantone_try scale

Let us use meantone_try and meantone_try2 scale to play the same phrase. We call these scales "exot­ic" because the names of their notes are not in the English, Italian/Spanish/French, or Indian stan­dard. Here we use the key num­bers of the MIDI out­put device.

The only dif­fer­ence is the key num­bers. In meantone_try2, the base key is #64 instead of #60.

Try:

_scale(meantone_try,69) key#60 key#62 key#65 key#69 key#72

The result:

§ key 60: "key#60" chan 2 scale #4, block key 69, corr -5 cents, freq 260.875 Hz
§ key 62: "key#62" chan 2 scale #4, block key 69, corr -2 cents, freq 293.331 Hz
§ key 65: "key#65" chan 2 scale #4, block key 69, corr 13 cents, freq 351.866 Hz
§ key 69: "key#69" chan 2 scale #4, block key 69, corr 0 cents, freq 440.007 Hz
§ key 72: "key#60" chan 2 scale #4, block key 69, corr 13 cents, freq 527.204 Hz

The fre­quen­cy of key#69 is 440 Hz since it is the block key. The actu­al sequence heard on the MIDI out­put device is C4 D4 F4 A4 C5. Note that the octave ratio C5/C4 is 527.204/260.875 which is greater than 2 because this scale has an octave stretched by 19 cents.

Now try:

_scale(meantone_try2,73) key#64 key#66 key#69 key#73 key#76

The result:

§ key 64: "key#64" chan 2 scale #5, block key 73, corr -5 cents, freq 260.875 Hz
§ key 66: "key#66" chan 2 scale #5, block key 73, corr -2 cents, freq 293.331 Hz
§ key 69: "key#69" chan 2 scale #5, block key 73, corr 13 cents, freq 351.866 Hz
§ key 73: "key#73" chan 2 scale #5, block key 73, corr 0 cents, freq 440.007 Hz
§ key 76: "key#64" chan 2 scale #5, block key 73, corr 13 cents, freq 527.204 Hz

Note again that the fre­quen­cy of the base key #73 is 440 Hz. The fre­quen­cies are iden­ti­cal, the only change is the key num­bers asso­ci­at­ed with the notes. The actu­al sequence played on the MIDI out­put device should again be C4 D4 F4 A4 C5, assum­ing that key #64 is the mid­dle key of its keyboard.

A very exotic scale

The scale called zest24-supergoya17plus3_Db is more "exot­ic" than the pre­vi­ous one because it has 20 grades and 12 notes. The orig­i­nal scale down­loaded from an archive did not have note names, so we decid­ed to label twelve posi­tions with the key num­bers #60 to #71. As you can see in the pic­ture, the inter­vals are very irreg­u­lar. The choice of 12 tones is moti­vat­ed by the desire to be able to map them onto the 12 keys of a stan­dard piano key­board. We'll see a dif­fer­ent case later.

Try the following:

_scale(zest24-supergoya17plus3_Db,0) key#60 key#62 key#65 key#69 key#72

The result in real-time MIDI:

§ key 60: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 261.630 Hz
§ key 62: "key#62" chan 2 scale #7, block key 60, corr 67 cents, freq 305.258 Hz
§ key 65: "key#65" chan 2 scale #7, block key 60, corr 176 cents, freq 386.605 Hz
§ key 69: "key#69" chan 2 scale #7, block key 60, corr 75 cents, freq 459.488 Hz
§ key 72: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 523.260 Hz

and the Csound score:

i1 0.000 1.000 261.630 90.000 90.000 0.000 0.000 0.000 0.000 ; key#60
i1 1.000 1.000 305.258 90.000 90.000 0.000 0.000 0.000 0.000 ; key#62
i1 2.000 1.000 386.605 90.000 90.000 0.000 0.000 0.000 0.000 ; key#65
i1 3.000 1.000 459.488 90.000 90.000 0.000 0.000 0.000 0.000 ; key#69
i1 4.000 1.000 523.260 90.000 90.000 0.000 0.000 0.000 0.000 ; key#60

Key #60 is the base key and its fre­quen­cy is 261.630 Hz as declared in the tonal­i­ty resource. Note that the key #72, an octave high­er, also has "key#60" as its note name. Its fre­quen­cy of 523.260 Hz is twice 261.630 since octaves are not stretched.

Looking at the pic­ture, we can cal­cu­late the fre­quen­cy of key#65 which has a fre­quen­cy ratio of 1.478. This gives 1.478 x 261.63 = 386.69 Hz, which is very close to that in the score. Minor errors are due to the round­ing of cents to whole numbers.

If you play this score on a con­ven­tion­al MIDI device, you won't hear the cor­rect fre­quen­cies unless the device is tuned to a 20-grade equal tem­pera­ment scale. Conversely, the ren­der­ing in C-Sound is accurate.

When a scale has more than 12 grades, the ref­er­ence tem­pered scale must have the same num­ber of grades, regard­less of the num­ber of notes (which is indeed small­er). Apart from the musi­cal aspect — which we won't dis­cuss here — this has a tech­ni­cal advan­tage: the cent cor­rec­tions, which are devi­a­tions from the equal tem­pera­ment scale, will always be less than 100 cents. This is impor­tant because the sen­si­tiv­i­ty of pitch­ben­ders is set to ± 200 cents.

The Bohlen-Pierce scale

The Bohlen-Pierce scale has a "tri­tave" inter­val of ratio 3/1 instead of 2/1 in the octave. The tri­tave is divid­ed into 13 grades and 13 notes (see Wikipedia).

The "just-intonation" ver­sion has been imple­ment­ed in the tonal resource -to.tryMPE — see pic­ture.

Play the full sequence of notes over a tritave:

_scale(Bohlen-Pierce,0) C4 Db4 D4 E4 F4 Gb4 G4 H4 Jb4 J4 A4 Bb4 B4 C5

Be aware that notes with names like C, Db, D, etc. have dif­fer­ent posi­tions than notes with the same names in a 12 tone scale.

This yields:

§ key 60: "C4" … corr 0 cents, freq 261.630 Hz
§ key 61: "Db4" … corr 33 cents, freq 282.522 Hz
§ key 62: "D4" … -> key 63 corr 1 cents, freq 311.312 Hz
§ key 63: "E4" … -> key 64 corr 35 cents, freq 336.365 Hz
§ key 64: "F4" … -> key 65 corr 82 cents, freq 366.174 Hz
§ key 65: "Gb4" … -> key 67 corr 36 cents, freq 400.239 Hz
§ key 66: "G4" … -> key 68 corr 84 cents, freq 435.960 Hz
§ key 67: "H4" … -> key 70 corr 17 cents, freq 470.772 Hz
§ key 68: "Jb4" … -> key 71 corr 65 cents, freq 512.788 Hz
§ key 69: "J4" … -> key 73 corr 19 cents, freq 560.492 Hz
§ key 70: "A4" … -> key 74 corr 66 cents, freq 610.163 Hz
§ key 71: "Bb4" … -> key 76 corr 0 cents, freq 659.266 Hz
§ key 72: "B4" … -> key 77 corr 68 cents, freq 726.449 Hz
§ key 73: "C5" … -> key 79 corr 1 cents, freq 784.457 Hz

The fre­quen­cy ratio C5 / C4 is, as expect­ed, 784.457 / 261.630 = 3.

The Bohlen-Pierce scale played on Pianoteq

Since the scale cov­ers a tri­tave that would extend from A4 (key #60) to G5 (key #79) on a con­ven­tion­al 12-note MIDI device, each note is mapped to the key that requires the least amount of pitch­bend. As a result, pitch­bend cor­rec­tions are nev­er greater than ± 100 cents.

The Csound score:

i1 0.000 1.000 261.630 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 1.000 1.000 282.522 90.000 90.000 0.000 0.000 0.000 0.000 ; Db4
i1 2.000 1.000 311.312 90.000 90.000 0.000 0.000 0.000 0.000 ; D4
i1 3.000 1.000 336.365 90.000 90.000 0.000 0.000 0.000 0.000 ; E4
i1 4.000 1.000 366.174 90.000 90.000 0.000 0.000 0.000 0.000 ; F4
i1 5.000 1.000 400.239 90.000 90.000 0.000 0.000 0.000 0.000 ; Gb4
i1 6.000 1.000 435.960 90.000 90.000 0.000 0.000 0.000 0.000 ; G4
i1 7.000 1.000 470.772 90.000 90.000 0.000 0.000 0.000 0.000 ; H4
i1 8.000 1.000 512.788 90.000 90.000 0.000 0.000 0.000 0.000 ; Jb4
i1 9.000 1.000 560.492 90.000 90.000 0.000 0.000 0.000 0.000 ; J4
i1 10.000 1.000 610.163 90.000 90.000 0.000 0.000 0.000 0.000 ; A4
i1 11.000 1.000 659.266 90.000 90.000 0.000 0.000 0.000 0.000 ; Bb4
i1 12.000 1.000 726.449 90.000 90.000 0.000 0.000 0.000 0.000 ; B4
i1 13.000 1.000 784.457 90.000 90.000 0.000 0.000 0.000 0.000 ; C5

Examples of music using the Bohlen-Pierce scale :
https://en.xen.wiki/w/Bohlen-Pierce_scale/Music

To con­vert to Bohlen-Pierce notes played on an exter­nal MIDI device, con­nect it to the input of BP3, then run the fol­low­ing "tun­ing dae­mon" (see below):

_vel(0) C0 _script(wait for­ev­er) _scale(Bohlen-Pierce,0)

Combination of several scales

In the fol­low­ing exam­ple, two phras­es are played on top of each oth­er, using dif­fer­ent micro­ton­al scales.

On the pianoroll (see pic­ture), key#60 is shown as C4. The note key#62, shown as D4, seems to be unique, although two key#62 notes are super­im­posed with slight­ly dif­fer­ent cent cor­rec­tions. The same is true with key#72 shown as C5.

{ _scale(zest24-supergoya17plus3_Db,0) key#60 key#62 key#69 key#72 , _scale(meantone_try,69) key#69 key#62 key#60 key#72 }

The result:

§ key 60: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 261.630 Hz
§ key 69: "key#69" chan 3 scale #4, block key 69, corr 0 cents, freq 440.007 Hz
§ key 62: "key#62" chan 2 scale #7, block key 60, corr 67 cents, freq 305.258 Hz
§ key 62: "key#62" chan 3 scale #4, block key 69, corr -2 cents, freq 293.331 Hz
§ key 69: "key#69" chan 2 scale #7, block key 60, corr 75 cents, freq 459.488 Hz
§ key 60: "key#60" chan 3 scale #4, block key 69, corr -5 cents, freq 260.875 Hz
§ key 72: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 523.260 Hz
§ key 72: "key#60" chan 3 scale #4, block key 69, corr 13 cents, freq 527.204 Hz

The sec­ond (key 62) and last (key 72) notes are iden­ti­cal, but because they belong to dif­fer­ent scales, their fre­quen­cies are not iden­ti­cal. For this pur­pose, they are played on dif­fer­ent MIDI chan­nels. The super­im­po­si­tion cre­ates (nasty) mis­match­es that reflect the dif­fer­ences in tuning:

Use of _scale(0,0)

So far we have used "_scale(0,0)" to spec­i­fy the return to a 12-grade equal tem­pered scale after using a micro­ton­al scale. It can also be used to force micro­ton­al mode in a musi­cal item that does not require spe­cif­ic micro­ton­al scales.

Pitchbend adjust­ments are not shown on this graph

For exam­ple, try to play the phrase:

_pitchrange(200) C4 _pitchbend(100) C4 {_pitchbend(-100) C4, _pitchbend(200) C4} C4 _pitchbend(0) C4

This is a (rather sil­ly) way of cre­at­ing a sequence of notes using the same note with pitch­bend cor­rec­tions. In fact, we are look­ing for­ward to hearing:

C4 C#4 {B3, D4} C#4 C4

The first solu­tion does not work because the chord {B3, D4} con­sists of two of the same note A4 with dif­fer­ent pitch­bend val­ues. It works in Csound, but in MIDI we hear:

An incor­rect ren­der­ing of C4 C#4 {B3, D4} C#4 C4

Proper nota­tion, with­out the aid of micro­tonal­i­ty, would be, for example:

_pitchrange(200) C4 _pitchbend(100) C4 {_pitchbend(-100) C4, _chan(2) _pitchrange(200) _pitchbend(200) C4} C4 _pitchbend(0) C4

So we have to send the two C4s of the poly­met­ric expres­sion on sep­a­rate MIDI chan­nels. But the micro­ton­al cal­cu­la­tion does this auto­mat­i­cal­ly. So, putting "_scale(0,0)" at the begin­ning won't change the tun­ing but it will force the micro­ton­al mode:

_scale(0,0) _pitchrange(200) C4 _pitchbend(100) C4 {_pitchbend(-100) C4, _pitchbend(200) C4} C4 _pitchbend(0) C4

Now we hear:

A cor­rect ren­der­ing of C4 C#4 {B3, D4} C#4 C4 using the micro­ton­al mode

and the trace shows:

§ key 60: "C4" chan 2
§ key 60: "C4" chan 2
--> with addi­tion­al pitch­bend val­ue of 4095
§ key 60: "C4" chan 2
--> with addi­tion­al pitch­bend val­ue of -4096
§ key 60: "C4" chan 3
--> with addi­tion­al pitch­bend val­ue of 8191
§ key 60: "C4" chan 2
--> with addi­tion­al pitch­bend val­ue of 4095
§ key 60: "C4" chan 2

Csound scores are the same in all cas­es (pitch­bend para­me­ters in bold):

i1 0.000 1.000 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4
i1 1.000 1.000 8.00 90.000 90.000 0.000 99.988 99.988 0.000 ; C4
i1 2.000 1.000 8.00 90.000 90.000 0.000 -100.000 -100.000 0.000 ; C4
i1 2.000 1.000 8.00 90.000 90.000 0.000 199.976 199.976 0.000 ; C4
i1 3.000 1.000 8.00 90.000 90.000 0.000 99.988 99.988 0.000 ; C4
i1 4.000 1.000 8.00 90.000 90.000 0.000 0.000 0.000 0.000 ; C4

For geeks: It wouldn't be a good idea to set micro­tonal­i­ty mode by default for all musi­cal works, because (1) chan­nel assign­ment takes up pro­cess­ing time, and (2) this would ren­der all "_chan()" com­mands inef­fec­tive. In some MIDI envi­ron­ments, MIDI chan­nels are used to send mes­sages to dif­fer­ent instruments.

Combination with pitchbend commands

The fol­low­ing is an exam­ple of com­bin­ing a micro­ton­al phrase with a glob­al pitch­bend com­mand of + 100 cents:

_chan(4) _pitchrange(200) _scale(zest24-supergoya17plus3_Db,0) _pitchbend(+100) key#60 key#62 key#65 key#69 key#72 _pitchbend(0) key#72

The result is:

§ key 60: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 261.630 Hz
--> with addi­tion­al pitchbend value 4095
§ key 62: "key#62" chan 2 scale #7, block key 60, corr 67 cents, freq 305.258 Hz
--> with addi­tion­al pitch­bend val­ue 4095
§ key 65: "key#65" chan 2 scale #7, block key 60, corr 176 cents, freq 386.605 Hz
--> with addi­tion­al pitch­bend val­ue 4095
§ key 69: "key#69" chan 2 scale #7, block key 60, corr 75 cents, freq 459.488 Hz
--> with addi­tion­al pitch­bend val­ue 4095
§ key 72: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 523.260 Hz
--> with addi­tion­al pitch­bend val­ue 4095
§ key 72: "key#60" chan 2 scale #7, block key 60, corr 0 cents, freq 523.260 Hz

The "_chan(4)" com­mand is used here to prove that it is ignored in micro­tonal­i­ty mode. The MIDI trace shows that an addi­tion­al cor­rec­tion has been applied. Therefore, the fre­quen­cy val­ues are not those played on the out­put MIDI device. However, the Csound score is explicit:

i1 0.000 1.000 261.630 90.000 90.000 0.000 99.988 99.988 0.000 ; key#60
i1 1.000 1.000 305.258 90.000 90.000 0.000 99.988 99.988 0.000 ; key#62
i1 2.000 1.000 386.605 90.000 90.000 0.000 99.988 99.988 0.000 ; key#65
i1 3.000 1.000 459.488 90.000 90.000 0.000 99.988 99.988 0.000 ; key#69
i1 4.000 1.000 523.260 90.000 90.000 0.000 99.988 99.988 0.000 ; key#60
i1 5.000 1.000 523.260 90.000 90.000 0.000 0.000 0.000 0.000 ; key#60

The num­bers 99.988 and 99.988 are the pitch­bend cor­rec­tions (in cents) at the begin­ning and end of the note declared on each line.

The "grama" Indian scale

The gra­ma scale

We have already dis­cussed the ancient Indian tonal sys­tem which divides the octave into "twenty-two shrutis", see The two-vina exper­i­ment for details. We'll try this gra­ma scale by set­ting the pramāņa ṣru­ti to 21 cents.

In short, this tun­ing scheme is a twelve degree chro­mat­ic scale: Sa, Re komal, Re, Ga komal, Ga, Ma, Ma tivra, Pa, Dha komal, Dha, Ni komal, Ni. These names stand for C, Db, D, Eb, E, F, F#, G, Ab, A, Bb, B in English notation.

Each note of the Indian scale, except Sa (C) and Ma tivra (F#), can occu­py two enhar­mon­ic posi­tions. This explains why the gra­ma tun­ing scheme has 23 posi­tions and 22 notes.

In accor­dance with the syn­tax of the Bol proces­sor, notes are referred to as sound objects in low­er case. For exam­ple, the two enhar­mon­ic posi­tions of Re komal are called r1_ and r2_, and the two posi­tions of Re are called r3_ and r4_. A trail­ing '_' is nec­es­sary to indi­cate octave num­bers unam­bigu­ous­ly: the note d3_4 is the low posi­tion of Dha in the 4th octave, which is admit­ted­ly close to A4 in the Western scale.

The pramāņa ṣru­ti is the tonal dis­tance between all pairs of enhar­mon­ic posi­tions, for instance between r1_ and r2_. For the sake of sim­plic­i­ty, we've set it to 21 cents (a syn­ton­ic com­ma), which is a com­mon mis­take made by Western and Indian musi­col­o­gists. In real­i­ty it is a vari­able val­ue — see Raga into­na­tion.

Play the scale:

_scale(grama, d3_4) sa_4 r1_4 r2_4 r3_4 r4_4 g1_4 g2_4 g3_4 g4_4 m1_4 m2_4 m3_4 p3_4 p4_4 d1_4 d2_4 d3_4 d4_4 n1_4 n2_4 n3_4 n4_4 sa_5

The result (Csound is identical):

§ key 60: "sa_4" …corr 15 cents, freq 263.907 Hz
§ key 61: "r1_4" …corr 6 cents, freq 278.150 Hz
§ key 62: "r2_4" …corr -73 cents, freq 281.544 Hz
§ key 63: "r3_4" …-> key 61 corr 98 cents, freq 293.331 Hz
§ key 64: "r4_4" …-> key 62 corr 19 cents, freq 296.910 Hz
§ key 65: "g1_4" …-> key 63 corr 10 cents, freq 312.935 Hz
§ key 66: "g2_4" …-> key 63 corr 31 cents, freq 316.754 Hz
§ key 67: "g3_4" …-> key 64 corr 2 cents, freq 330.014 Hz
§ key 68: "g4_4" …-> key 64 corr 23 cents, freq 334.042 Hz
§ key 69: "m1_4" …-> key 65 corr 14 cents, freq 352.070 Hz
§ key 70: "m2_4" …-> key 65 corr 35 cents, freq 356.366 Hz
§ key 71: "m3_4" …-> key 66 corr 6 cents, freq 371.285 Hz
§ key 72: "p3_4" …-> key 66 corr 96 cents, freq 391.097 Hz
§ key 73: "p4_4" …-> key 67 corr 17 cents, freq 395.870 Hz
§ key 74: "d1_4" …-> key 68 corr 8 cents, freq 417.235 Hz
§ key 75: "d2_4" …-> key 68 corr 29 cents, freq 422.327 Hz
§ key 76: "d3_4" …-> key 69 corr 0 cents, freq 440.007 Hz
§ key 77: "d4_4" …-> key 69 corr 21 cents, freq 445.377 Hz
§ key 78: "n1_4" …-> key 70 corr 12 cents, freq 469.414 Hz
§ key 79: "n2_4" …-> key 70 corr 33 cents, freq 475.143 Hz
§ key 80: "n3_4" …-> key 71 corr 4 cents, freq 495.034 Hz
§ key 81: "n4_4" …-> key 71 corr 25 cents, freq 501.075 Hz
§ key 82: "sa_5" …-> key 72 corr 16 cents, freq 528.118 Hz

The gra­ma scale (22 notes) played on Pianoteq

Listen to the same scale played against a drone (read the Microtonality page):

The Csound ren­der­ing of the gra­ma scale (23 grades) played against a drone. This ver­sion has an addi­tion­al note m4_ that does not belong to the pre­ced­ing scale. 

We said ear­li­er that, in the gra­ma tun­ing scheme, d3_4 occu­pies the posi­tion of A4 in the Western scale. Since the block key is #76 (d3_4), the fre­quen­cy of d3_4 is close to 440 Hz. Consequently, the posi­tion of sa_4 (263.907 Hz) is 15 cents high­er than the base fre­quen­cy (261.63 Hz).

This scale can be played on any MIDI device that accepts pitch­bend com­mands. The 22 notes of the scale, cov­er­ing an octave, are mapped to the 12 keys of a MIDI key­board. Each note is mapped to the key that requires the least amount of pitch­bend. As a result, pitch­bend cor­rec­tions are nev­er greater than ± 100 cents. For exam­ple, d3_4 is mapped to key #69, which hap­pens to be that of A4 on a con­ven­tion­al keyboard.

Read the Raga Intonation page to see how this the­o­ret­i­cal frame­work can be adapt­ed for mod­el­ling real music.

Microtonality in sound-objects

A sound-object is a sequence of MIDI events and/or Csound score lines — read Sound-object pro­to­types for details. Therefore the pitch­es of notes it con­tains can be mod­i­fied by micro­ton­al scales. In the "-da.tryMPE" project, try for instance:

_scale(just intonation,0) a f b b

and check fre­quen­cy cor­rec­tions in the trace (both MIDI and Csound):

§ key 69: "A4" octave 4 scale #3, block key 60, corr -15 cents, freq 436.212 Hz
§ key 41: "F2" octave 2 scale #3, block key 60, corr -1 cents, freq 87.258 Hz
§ key 71: "B4" octave 4 scale #3, block key 60, corr -11 cents, freq 490.764 Hz
§ key 71: "B4" octave 4 scale #3, block key 60, corr -11 cents, freq 490.764 Hz
§ key 71: "B4" octave 4 scale #3, block key 60, corr -11 cents, freq 490.764 Hz
§ key 71: "B4" octave 4 scale #3, block key 60, corr -11 cents, freq 490.764 Hz

The posi­tion of A on the just into­na­tion scale (see pic­ture) is 884 cents above C, which is 15 cents below its posi­tion on the equal tem­pera­ment scale (900 cents). The same goes for B which is 1088 cents above C, and thus 11 cents below its posi­tion on the equal tem­pera­ment scale (1100 cents). 

Applying microtonal corrections to MIDI input notes

This demon­strates the BP3's abil­i­ty to act as an inter­face between MIDI devices, retun­ing the input in real time to a micro­ton­al scale.

The fil­ter of the input MIDI device should be set to "treat & pass" for all cat­e­gories of events that will be trans­mit­ted (see picture).

We show a tem­po­rary solu­tion that works very well, but will be sim­pli­fied in the future.

If, for exam­ple, you want to retune the input to the just into­na­tion scale, run the fol­low­ing "tun­ing daemon":

_script(wait for C0 channel 16) _scale(just intonation,A4) _vel(0) C0

The "wait for C0 channel 16" com­mand that caus­es the machine to hang up while it lis­tens for some kind of input. In fact, the note "C0 channel 16" should not be part of the stream of notes you need to retune, oth­er­wise it will stop the process!

The note C0 with veloc­i­ty 0 is inaudi­ble and will not be played unless the note "C0 channel 16" releas­es the wait­ing state. This note is need­ed for attach­ing the script instruction.

An alter­na­tive to this set­up is:

_vel(0) C0 _script(wait forever) _scale(just intonation,A4)

The "wait forever" com­mand caus­es the machine to hang until the STOP or PANIC but­ton is pressed. Again, we need a dum­my (inaudi­ble) note C0, at the end of which the script instruc­tion is appended.

Because mul­ti­ple instances of BP3 can be run simul­ta­ne­ous­ly (read Real-time MIDI), you can set up a bank of "tun­ing dae­mons" that inter­act with peo­ple and MIDI devices to cre­ate inter­est­ing vari­a­tions of tonal structures.

Quick install Linux

   

This is a sup­ple­ment to the page Bol Processor ‘BP3’ and its PHP inter­face.

This instal­la­tion is checked with Ubuntu + Linux Lite 7.0 run­ning on an HP Intel Core i5-6200U (64-bit, 8 Gb RAM).

Install XAMPP

The instal­la­tion of BP3 should take place after the instal­la­tion of the local Apache serv­er XAMPP. Follow instruc­tions here: https://www.apachefriends.org/

XAMPP cre­ates a /opt/lampp/htdocs/ direc­to­ry that will con­tain "bolprocessor". The "bolprocessor" fold­er will con­tain (lan­guage C) source files for the "bp3" con­sole, the "MakeFile" to com­pile them, and all the data files. It will also con­tain a "php" fold­er filled with PHP pages and some relat­ed files for run­ning the interface.

If you wish to open XAMPP auto­mat­i­cal­ly at start­up, read this page.
(This can be done later.)

Download Bol Processor files

You need these files:

bolprocessor-graphics-for-BP3.zip con­tains source files for cre­at­ing the BP3 con­sole;
php-frontend-master.zip con­tains the PHP inter­face;
bp3-ctests-main.zip con­tains a set of exam­ples called "ctests".

These zip files are updat­ed reg­u­lar­ly. Major updates are announced on the BP devel­op­ers list and uploaded to their GIT repos­i­to­ries. Make sure that they can be found in your Downloads fold­er: /home/linuxlite/Downloads

Install the Bol Processor

Safely do the instal­la­tion using the shell scripts "linux-scripts" down­loaded here.
Current ver­sion: 4 February 2025, size 14124 bytes.
Unpack and copy these scripts to the /home folder:

cd /home/linuxlite/Downloads/
unzip linux-scripts.zip -x "__MACOSX/*"
sudo chmod -R 775 linux-scripts
cd linux-scripts
sudo cp -a . /home/
cd /home/
sudo chmod +x *.sh

Scripts "modify_xampp.sh", "prepare.sh", "unpack_bp3.sh", "install_bp3.sh" and "get_ready_bp3.sh" have been copied to the /home fold­er.

Four more scripts: "update_console.sh", "update_interface.sh", "update_data.sh" and "restart_xampp.sh", have been copied to the /home fold­er. They will be used later.

The instal­la­tion pro­ce­dure is sim­i­lar to that for MacOS and Windows, but includes a few actions spe­cif­ic to Linux.

Run the scripts in the fol­low­ing order.
👉   You will be asked for your pass­word the first time, as they need to be run in "admin" mode (the "sudo" com­mand).

  1. sudo /home/modify_xampp.sh will adjust XAMPP settings.
  2. sudo /home/prepare.sh will install required resources on your machine, and cre­ate two vir­tu­al MIDI ports if they are not yet existing.
  3. sudo /home/unpack_bp3.sh will unpack the zip files.
  4. sudo /home/install_bp3.sh will cre­ate the /opt/lampp/htdocs/bolprocessor/ direc­to­ry and fill it with the con­tents of BP3 pack­ages. Files/folders already exist­ing will sim­ply be updated.
  5. sudo /home/get_ready_bp3.sh will con­fig­ure the vir­tu­al MIDI ports and update the sudo­ers entry.

In the "bolprocessor" fold­er, the own­er is "daemon" (the same one used by XAMPP), which is assigned to the groups "audio" and "linuxlite", and the per­mis­sions are set to "775".
👉 The con­tent of "bolprocessor" is strict­ly pri­vate. No risk set­ting up permissions!

Avoid run­ning the same script more than once, although this should not cre­ate dupli­cates or unwant­ed effects.

Once the Bol Processor BP3 is installed and run­ning, you should delete the "zip" files in the Downloads fold­er. This will allow down­load­ing new versions.

Compile the 'bp3' console

Start the XAMPP Apache serv­er. You can send the ter­mi­nal command:

sudo /home/restart_xampp.sh

Point your brows­er at localhost/bolprocessor/php/. This will dis­play the home page of the Bol Processor.

If you see this frame in the image at the top right of the page, your life will be easy! All you have to do is click on the link to com­pile the con­sole, which will take less than a minute.

f you don't see the link to com­pile, and instead a men­tion that 'gcc' is not respon­sive, you are in great trou­ble! This sug­gests a bug in the inter­face (con­tact us) or in your installation.

Install Csound

Csound is not required to run the Bol Processor, as you can work with MIDI files and real-time MIDI. However, it will give you access to a dif­fer­ent approach to sound syn­the­sis, and it will han­dle micro­tonal­i­ty in its own way.

If you wish to install Csound, sim­ply type the fol­low­ing commands:

sudo apt update
sudo apt install csound

Then ver­i­fy the instal­la­tion and check the path to the console:

csound --ver­sion
which csound

By default, the Bol Processor sets the path to "usr/bin", which seems to be stan­dard on Linux. It is giv­en by the "which csound" com­mand.

A frame ask­ing for a cor­rec­tion
of the path to Csound.
The path "/usr/local/bin" is incor­rect in Linux.

The BP3 inter­face will be able to fig­ure out the loca­tion of "csound" and fix its path accord­ing­ly. If it does not respond, you will be asked to change the path and per­haps the name of the Csound con­sole (see image).

Contact us if this happens!

👉 Currently, the Csound orches­tra file "0-default.orc" does not work on Linux. We're try­ing to fix this… In the set­tings of your projects, enter "BP2test.orc" as replace­ment, or select oth­er files such as "new-vina.orc".

😀  Enjoy Bol Processor BP3 on Linux!

Restarting XAMPP after a crash

If you blow up the mem­o­ry, for exam­ple with a quan­ti­za­tion that is too low for the size of a piece played in real­time MIDI, the XAMPP serv­er may freeze: the brows­er will refuse to dis­play pages.

To restart XAMPP, go to the ter­mi­nal and run the fol­low­ing script:

sudo /home/restart_xampp.sh

Updating to new versions

👉  If you update the "bp3" con­sole, you should also update the PHP inter­face, as the two are linked.

  • (1) Update the "bp3" con­sole:
    Delete the graphics-for-BP3.zip file if it exists in your Downloads fold­er.
    Download https://github.com/bolprocessor/bolprocessor/archive/graphics-for-BP3.zip
    Run the (super­fast!) script: sudo /home/update_console.sh
    This script deletes the 'bp3' con­sole to force a com­pi­la­tion of the new version.
  • (2) Update the PHP inter­face:
    Delete the php-frontend-master.zip file if it exists in your Downloads fold­er.
    Download https://github.com/bolprocessor/php-frontend/archive/master.zip
    Run the (super­fast!) script: sudo /home/update_interface.sh
    Note that this script will pre­serve the "_settings.php" file (if it exists), which con­tains your project settings.
  • (3) Update the set of exam­ples: this will only update the con­tents of the "ctests" fold­er. If you have cre­at­ed fold­ers and files for your per­son­al data, these will not be affect­ed. However, if you have mod­i­fied a sam­ple file with­out chang­ing its name, it will be revert­ed to its dis­tri­b­u­tion ver­sion.
    Delete the bp3-ctests-main.zip file if it exists in your Downloads fold­er.
    Download https://github.com/bolprocessor/bp3-ctests/archive/main.zip
    Run the (super­fast!) script: sudo /home/update_data.sh

👉 Please send your sug­ges­tions or mod­i­fied files to our con­tact.

Relocating "bolprocessor"

The Bol Processor can be installed out­side the "htdocs" fold­er cre­at­ed by XAMPP (on your boot dri­ve). You might want it near relat­ed projects, or use extra space from an exter­nal hard dri­ve. There may also be sit­u­a­tions where cre­at­ing files on the boot dri­ve is restricted.

Fortunately, the process of relo­cat­ing is very straight­for­ward. Not all cas­es have been test­ed, but instal­la­tion and update scripts are designed to han­dle redirections.

You should have already cre­at­ed a "bolprocessor" fold­er by run­ning the installer. Now, drag it to the desired loca­tion and delete it from the "htdocs" fold­er.

Then, open a ter­mi­nal and point it to the "htdocs" direc­to­ry. You can type the instruc­tion "ls -al" to see the con­tents of "htdocs", which is nor­mal­ly empty.

Let's say you've cre­at­ed an emp­ty fold­er "bolprocessor" inside a fold­er called "MUSIC" on an exter­nal dri­ve called "EXT". You first need to find the path to the exter­nal dri­ve. Plug in the dri­ve, then type "lsblk". Look for the device name (e.g., "/dev/sdb1") and its mount point, e.g. "/media/username/EXT", where "username" is your own user name.

The com­mand to cre­ate the sym­bol­ic link would then be:

ln -s /media/username/EXT/MUSIC/bolprocessor bolprocessor

Make sure that the sym­bol­ic link you cre­at­ed points to the cor­rect loca­tion: you will now see a "bolprocessor" icon in the "htdocs" fold­er. Double-click it, it should open the des­ti­na­tion folder.

You can now safe­ly run the update scripts and pro­ceed to com­pile the 'bp' con­sole. Don't try to run the instal­la­tion scripts!

Make sure you use the lat­est ver­sion of the scripts, as they are designed to work with sym­bol­ic links.

👉 Never change the names of the "bolprocessor" fold­er and sym­bol­ic link, oth­er­wise the instal­la­tion will fail.

The first time you run the Bol Processor, XAMPP may ask your per­mis­sion to dis­play files out­side its "htdocs" fold­er. Please con­tact us if you're expe­ri­enc­ing issues with this relocation!

You can also use sym­bol­ic links to relo­cate fold­ers out­side the "bolprocessor" fold­er, as explained here.

Uninstall the Bol Processor

Uninstalling the Bol Processor and all the data down­loaded or cre­at­ed for its use, is very sim­ple: delete the "htdocs/bolprocessor" fold­er, or the relo­cat­ed "bolprocessor" fold­er and the sym­bol­ic link point­ing to it.

Bernard Bel
Created: August 2024

Quick install MacOS

   

This is a sup­ple­ment to the page Bol Processor ‘BP3’ and its PHP inter­face.

A one-click nota­rized installer of Bol Processor BP3 is avail­able. It is called "BolProcessorInstaller.pkg" and it can be down­loaded from here (unique location).

Geeks may pre­fer an equiv­a­lent method using a script includ­ed in this pack­age, see below.

This installer (or the script) is used for both ini­tial instal­la­tion and updates. Each time you run it, it will down­load the lat­est ver­sions of the BP3 con­sole source files, the inter­face PHP files and the sam­ple set con­tained in the 'ctests' fold­er. Data, gram­mars and scripts that you've cre­at­ed will not be delet­ed. However, if you have mod­i­fied files in the 'ctests' fold­er, they will be revert­ed to the cur­rent dis­tri­b­u­tion version.

Install MAMP or XAMPP

If you try to run the installer of Bol Processor, it will first check that a local Apache serv­er (either MAMP or XAMPP) has been installed. Both are suit­able since the Bol Processor inter­face con­tains exclu­sive­ly HTML, PHP and JavaScript code. No data­base is required.

As of January 2025, it appears that the free ver­sion of MAMP has a script exe­cu­tion time of 30 sec­onds that can­not be over­rid­den by the PHP scripts. If this lim­i­ta­tion is con­firmed, we will rec­om­mend the use of XAMPP (free) or MAMP PRO (for a charge).

Your Mac may refuse to run the XAMPP installer because it is from an "unknown devel­op­er". You can over­ride this by allow­ing the appli­ca­tion in the Privacy & Security sec­tion of the Mac's System Settings. Unpacking the files takes sev­er­al min­utes, so be patient and wait for it to finish!

👉 Don't try the vir­tu­al machine ver­sion of XAMPP! It won't work on Macs with M1 chips (and above). Use the native installer.

Free MAMP on MacOS. Note that the top right icon indi­cates that the Apache serv­er is running.

if you choose the (free) MAMP ver­sion, both MAMP and (com­mer­cial) MAMP PRO will be installed. The inter­face will occa­sion­al­ly prompt you to "upgrade" to MAMP PRO (see pic­ture), although you don't need it for the Bol Processor!

Note that after down­load­ing MAMP, you will find MAMP PRO in the Applications fold­er, where­as MAMP (free) is locat­ed in Applications/MAMP. Also note that this ver­sion of MAMP runs on port "8888" by default, as we will see below.

For MAMP, the "htdocs" fold­er is in Applications/MAMP. For XAMPP, it is in Applications/XAMPP/xamppfiles. The installer will find it in both cases.

👉  You will not be able to run both MAMP/MAMP PRO and XAMPP Apache servers at the same time if they use the same ports. This wouldn't be a good idea anyway…

Start Apache at boot time

If you want Apache to start auto­mat­i­cal­ly when you start your com­put­er, this process is easy with MAMP: check Login items in the sys­tem settings.

For XAMPP, things are a bit more complicated.

For geeks: You have the offer to cre­ate a start­up script but is not entire­ly sat­is­fac­to­ry with the cur­rent ver­sion (8.2.4). It allows XAMPP to restart Apache at boot time and PHP pages are dis­played cor­rect­ly. However, when real-time MIDI is used, MIDIClientCreate() returns an error.

Until this prob­lem is fixed, the eas­i­est way is to find the Application Manager manager-osx.app (in XAMPP/xamppfiles) and add it to the Login Items of the General set­tings of your MacOS system:

You can also place an alias of "manager-osx.app" on the desk­top and click on it at start­up if you intend to run the Bol Processor.

MAMP PRO

Below are instruc­tions for (rich) peo­ple run­ning MAMP PRO.

The MAMP PRO main page on MacOS (ver­sion 5.7)
  1. Launch MAMP PRO from the Applications folder.
  2. In the MAMP main win­dow, click the Apache Enable but­ton (see image). No need for MySQL.
  3. The image shows the default set­tings for PHP, which is start­ed with Apache.
  4. In case of trou­ble, check the set­tings for ports (see image) and of hosts (gen­er­al  and  Apache).

XAMPP

Open the XAMPP fold­er in the  Applications  fold­er and launch  manager-osx.app  as shown below.

The XAMPP main page will appear. If you click on the  Manage Servers  tab and select  Apache Web Server, then Configure, you can make sure that the serv­er is run­ning on port "80". This can be changed (e.g. to "81") if it cre­ates a conflict.

Then click the Start but­ton. If there is no con­flict with the ports, Apache will show up as "run­ning":

This image has an empty alt attribute; its file name is XAMPP.jpg
The XAMPP fold­er (in the Applications fold­er on a Mac) and the XAMPP main page

Once Apache is run­ning, you can click on the  Welcome  tag and the  Go to Application  but­ton. This should dis­play a (local) page about XAMPP in the path  http://localhost/dashboard. Both the  dashboard  and (lat­er)  bolprocessor  fold­ers will be locat­ed in the  Applications/XAMPP/xamppfiles/htdocs  folder.

Install the Bol Processor

After installing XAMPP or MAMP, you can run the installer "BolProcessorInstaller.pkg" or the "install_bolprocessor.sh" script. Both are equivalent.

By default, all Bol Processor pro­gram, doc­u­men­ta­tion and data files will be cre­at­ed in a fold­er called "bolprocessor" and will be con­tained in the "htdocs" fold­er cre­at­ed by XAMPP or MAMP — in oth­er words, on your start­up disk. This is not a prob­lem as the whole set does not take up much space, typ­i­cal­ly less than 60 Mb when installed, and the Bol Processor data is basi­cal­ly pure text.

However, you may wish to install the "bolprocessor" fold­er to a dif­fer­ent loca­tion, includ­ing an exter­nal device. In this case, fol­low the instruc­tions for Relocating "bol­proces­sor" before run­ning the installer or the script.

Using the installer

Download "BolProcessorInstaller.pkg" from here and double-click it.

👉  If you have pre­vi­ous­ly down­loaded an old­er ver­sion of the installer, your brows­er may be deliv­er­ing the old ver­sion instead of the lat­est. The safest thing to do is to check the size of "BolProcessorInstaller.pkg" (reed below the Security sec­tion). If nec­es­sary, use a dif­fer­ent brows­er for the download.

This installer has been nota­rized, which means it con­tains infor­ma­tion that allows Apple to cer­ti­fy its valid­i­ty. The only changes you will have to con­firm are usu­al soft­ware instal­la­tion pro­ce­dures on your Mac.

For geeks: The installer sets up user/group para­me­ters in the "bolprocessor" fold­er: "daemon:admin" if XAMPP is the Apache serv­er. If MAMP is used, the "<user_id>:admin" set­ting is retained.

Once that's done, go down to the sec­tion Compile the 'bp' con­sole.

Using the script (geeks only!)

An equiv­a­lent method is to run the "install_bolprocessor.sh" script found in the "macos-scripts" fold­er down­loaded here. This makes it pos­si­ble to under­stand each step of the instal­la­tion and pos­si­bly sug­gest improvements.

After down­load­ing "macos-scripts.zip", open the Terminal and type:

cd Downloads
unzip -qo macos-scripts.zip
cd macos-scripts
sudo ./install_bolprocessor.sh

Installation issues

If the installer (or the script) does not find a "htdocs" fold­er cre­at­ed by XAMPP or MAMP, it will stop the instal­la­tion, warn­ing you that one of them should be installed.

👉 The installer will cre­ate or feed a "bolprocessor" fold­er in the "htdocs" fold­er used by XAMPP (first choice) or MAMP (sec­ond choice). If you have used XAMPP in the past and want to switch to MAMP, you will need to rename the "XAMPP" or "xamppfiles" fold­er before run­ning the installer.

There is a Go to Application but­ton on XAMPP man­ag­er and a WebStart but­ton on MAMP (free) which will dis­play a page con­firm­ing that the Apache serv­er is running.

MAMP set­ting of the port

Now, assum­ing that the instal­la­tion was suc­cess­ful, and the Apache serv­er is run­ning, start XAMPP or MAMP and point your brows­er to  localhost/bolprocessor/php/ or (if it doesn't work) to localhost:8888/bolprocessor/php/.

One of these will dis­play the home page of the Bol Processor. The default port used by the free MAMP is "8888", but you can change it to "80" in MAMP set­tings (see pic­ture), so that the ":8888" option is no longer required.

Compile the 'bp' console

👉 From 23 February 2025, the com­piled 'bp' con­sole will be installed (or updat­ed) by the install script. So nor­mal­ly this step is no longer need­ed, except for geeks who wish to mod­i­fy the source files in the "bolprocessor/source/BP3" folder.

If you see this frame in the image at the top right of the page, your life will be easy! All you have to do is click on the link to com­pile the con­sole, which will take a minute or two.

👉  It is very unlike­ly that the com­pi­la­tion will fail. If it ever hap­pens, please con­tact us!

Installing Xcode via the Mac App store. No charge!

If you don't see the link to com­pile, and instead a men­tion that 'gcc' is not respond­ing, you may need to install the Xcode toolk­it on your machine (link to App Store).

Install and launch Xcode (free) to enable the com­pi­la­tion. Click "Cancel" when Xcode asks you to "cre­ate a project", go back to the Bol Processor page and reload it.

Now, you should see the com­pi­la­tion link.

👉  There are oth­er meth­ods of installing 'gcc'. Fans of Terminal com­mands can sim­ply try the command:

brew install gcc

Install Csound

Csound is not required to run the Bol Processor, as you can work with MIDI files and real-time MIDI. However, it will give you access to a dif­fer­ent approach to sound synthesis.

Just down­load a pre-built instal­la­tion of Csound (MacOS 6.18) from its down­load page.

A frame ask­ing for a cor­rec­tion of the path to Csound

The BP3 inter­face should be able to fig­ure out the loca­tion of "csound" and fix its path accord­ing­ly. If it does not respond, you will be asked to change the path and per­haps the name of the Csound con­sole (see image).

😀  Now, the Bol Processor is ful­ly oper­a­tional! You can try exam­ples con­tained in the 'ctests' fold­er, or fol­low the guid­ed tour on page Bol Processor ‘BP3’ and its PHP inter­face.

Updating to new versions

To update the Bol Processor con­sole, its PHP inter­face and exam­ples (the con­tents of the "ctests" fold­er), sim­ply rerun "BolProcessorInstaller.pkg". Using the lat­est ver­sion is safe!

The installer will down­load and install cur­rent ver­sions of the soft­ware and data.

Updating will not mod­i­fy or delete any data you have cre­at­ed in the "ctests" fold­er or out­side it. However, if you have mod­i­fied a sam­ple file with­out chang­ing its name, it will be revert­ed to its dis­tri­b­u­tion version.

The installer will also pre­serve the "_settings.php" file (if it exists), which con­tains your project settings.

Security

You are right to be con­cerned about secu­ri­ty. Can you be sure that you have down­loaded the cor­rect (and lat­est) ver­sion of "BolProcessorInstaller.pkg"? Normally yes, this installer is safe because it has been nota­rized.

The size of the "BolProcessorInstaller.pkg" file is exact­ly 21075 bytes and its MD5 is
df773f259b2f59ba0636446f1559d3e6. You can calculate the MD5 checksum on this page. These numbers will indeed be subject to change with the release of new versions of the installer. Current version: 23 February 2025.

Please DO NOT SHARE THE INSTALLER, only its link: https://bolprocessor.org/misc/BolProcessorInstaller.pkg

Geeks may want to cus­tomise it for their own use. Just down­load this fold­er which con­tains the script files (install_bolprocessor.sh and postinstall) along with instruc­tions on how the installer has been built.

For read­ers not con­ver­sant with Unix shell scripts, the fol­low­ing is a descrip­tion of the process in human language:

Check that an Apache serv­er MAMP or XAMPP is installed by find­ing either MAMP/htdocs or xampp/htdocs on the com­put­er (not case-sensitive). If it is not found, exit with the warn­ing that either MAMP or XAMPP should be installed.

Download the lat­est dis­tri­b­u­tion files from GitHub:
https://github.com/bolprocessor/bolprocessor/archive/graphics-for-BP3.zip
https://github.com/bolprocessor/php-frontend/archive/master.zip
https://github.com/bolprocessor/bp3-ctests/archive/main.zip

Unzip these three files. They cre­ate fold­ers with names:
bolprocessor-graphics-for-BP3
php-frontend-master
bp3-ctests-main

Create a fold­er named "bol­proces­sor" (if it does not yet exist) inside the "htdocs" fold­er of the Apache server

Copy bolprocessor-graphics-for-BP3/source to bolprocessor/
If there is already a "source" fold­er, delete it

Copy bolprocessor-graphics-for-BP3/Makefile to bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP3_help.txt to bolprocessor/
Copy bolprocessor-graphics-for-BP3/Credits.txt to bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP3-To-Do.txt to bolprocessor/
Copy bolprocessor-graphics-for-BP3/License.txt to bolprocessor/
Copy bolprocessor-graphics-for-BP3/ReadMe.txt to bolprocessor/

Copy bolprocessor/php/_settings.php to bolprocessor/ (if it exists)

Copy php-frontend-master/php to bolprocessor/
If there is already a "php" fold­er, delete it

Copy bolprocessor/_settings.php to bolprocessor/php/ (if it exists)

Create a fold­er bolprocessor/csound_resources if it does not yet exist

Copy the con­tent of php-frontend-master/csound_resources to bolprocessor/csound_resources
Files that already exist should be replaced with their updat­ed versions

Create a fold­er htdocs/bolprocessor/ctests if it does not yet exist

Copy the con­tent of bp3-ctests-main to bolprocessor/ctests
Files that already exist should be replaced with their updat­ed versions

Delete the tem­po­rary down­load directory

Set per­mis­sions of the bol­proces­sor fold­er recur­sive­ly to "775", and owner/group to <your_id>:admin if MAMP is used, or daemon:admin if XAMPP is used.

There is no secu­ri­ty risk in set­ting "775" per­mis­sions, as the MAMP or XAMPP Apache serv­er will be run­ning on your pri­vate com­put­er. The Bol Processor nev­er creates/modifies files out­side of its  "bolprocessor"  folder.

Delete bolprocessor/bp if it exists and replace it with the cur­rent 'bp' con­sole.

Relocating "bolprocessor"

👉  Apparently, relo­cat­ed instal­la­tions do not work with XAMPP after a reboot, unless the "BolProcessorInstaller.pkg" installer is run again. We're try­ing to fix this prob­lem. In the mean­time, you can at least relo­cate your data using sym­bol­ic links.

The Bol Processor can be installed out­side the "htdocs" fold­er cre­at­ed by MAMP or XAMPP (on your boot dri­ve). You might want it near relat­ed projects, or use extra space from an exter­nal hard dri­ve. There may also be sit­u­a­tions where cre­at­ing files on the boot dri­ve is restrict­ed to the super admin.

Fortunately, the process of relo­cat­ing is very simple.

If you have already cre­at­ed a "bolprocessor" fold­er by run­ning the installer, drag it to the desired loca­tion and delete it from the "htdocs" fold­er. If not, cre­ate an emp­ty "bolprocessor" fold­er in the desired location.

Then, open the Terminal (in the Applications fold­er) and point it to the "htdocs" direc­to­ry. For those unfa­mil­iar with Unix com­mands, you will need to type "cd " (fol­lowed by a space) and drag "htdocs" to the end of this com­mand, then press "return". You can type the instruc­tion "ls -al" to see the con­tents of "htdocs", which is nor­mal­ly empty.

Let's say you've cre­at­ed an emp­ty fold­er "bolprocessor" inside a fold­er called "MUSIC" on an exter­nal dri­ve called "EXT". The instruc­tion cre­at­ing the sym­bol­ic link is:

ln -s /Volumes/EXT/MUSIC/bolprocessor bolprocessor

Make sure that the sym­bol­ic link you cre­at­ed points to the cor­rect loca­tion: you will now see a "bolprocessor" icon with a small arrow in the bot­tom left cor­ner. Double-click it, it should open the des­ti­na­tion folder.

👉 You may won­der why sym­bol­ic links are used instead of MacOS alias­es, which do not require the use of the Terminal. The rea­son is that the Apache servers don't accept alias redirections.

You can now safe­ly run the installer (or install script) and pro­ceed to com­pile the 'bp' con­sole. Make sure you use the lat­est ver­sion of the installer (from 3 January 2025), as it is designed to work with sym­bol­ic links.

👉 Never change the names of the "bolprocessor" fold­er and sym­bol­ic link, oth­er­wise the instal­la­tion will fail.

The first time you run the Bol Processor, MAMP or XAMPP may ask your per­mis­sion to dis­play files out­side its "htdocs" fold­er. Please con­tact us if you're expe­ri­enc­ing issues with this relocation!

If you're not afraid of sym­bol­ic links, you can use the same tech­nique to relo­cate some data files out­side the "bolprocessor" fold­er, for exam­ple to a loca­tion in your Dropbox (includ­ing shared fold­ers), as explained here.

Uninstall the Bol Processor

Uninstalling the Bol Processor, and all the data down­loaded or cre­at­ed for its use, is very sim­ple: delete the "bolprocessor" fold­er, and the "bolprocessor" sym­bol­ic link if you have cre­at­ed it.

Bernard Bel
Creation: August 2024

Quick install Windows

   

This is a sup­ple­ment to the page Bol Processor ‘BP3’ and its PHP inter­face.

A one-click installer of Bol Processor BP3 is avail­able. It is called "BolProcessorInstaller.exe" and it can be down­loaded here (unique location).

This installer is used for both ini­tial instal­la­tion and updates. Each time you run it, it will down­load the lat­est ver­sions of the BP3 con­sole, includ­ing its source files, the inter­face PHP files, and the sam­ple set con­tained in the 'ctests' fold­er. Data, gram­mars and scripts that you've cre­at­ed will not be delet­ed. However, if you have mod­i­fied files in the 'ctests' fold­er, they will be revert­ed to the dis­tri­b­u­tion version.

This instal­la­tion is checked with Windows 10 run­ning on an HP Intel Core i5-6200U (64-bit, 8 Gb RAM) and MAMP (free) run­ning PHP 8.3.1. It should work fine with Windows 11, please check it and report!

👉   26 January 2025: The installer "BolProcessorInstaller.exe" is now cer­ti­fied. It should not dis­play a "mali­cious soft­ware" warn­ing. Once opened, before start­ing the instal­la­tion, it should men­tion the name of its cre­ator: "Bernard Bel".
Contact us if it doesn't work on your computer!

First install MAMP or XAMPP

The (free) MAMP device run­ning on Windows 10 (July 2024). Note that Apache Server is active. You can click "Open WebStart Page" to check that it is effective.

If you try to run the installer (see below), it will first check that a local Apache serv­er (MAMP or XAMPP) has been installed. Both are suit­able since the Bol Processor inter­face con­tains exclu­sive­ly HTML, PHP and JavaScript code. No data­base is required.

if you choose the (free) MAMP ver­sion, both MAMP and MAMP PRO will be installed, and the inter­face will occa­sion­al­ly invite you to "upgrade" to MAMP PRO. But you don't need it for the Bol Processor!

For MAMP on Windows, the "htdocs" fold­er is in "C:\MAMP".
For XAMPP on Windows, the "htdocs" fold­er is in "C:\xampp". (To be verified)

If you want Apache to start auto­mat­i­cal­ly when you start your com­put­er, this process is easy with MAMP, but a bit more com­plex with XAMPP: try this method.

Create the 'bp.exe' console

After installing MAMP or XAMPP, run the installer "BolProcessorInstaller.exe" down­loaded here.

👉 The installer cre­ates a "bolprocessor" fold­er in the "htdocs" fold­er used by MAMP or XAMPP. Make sure that there is only one such fold­er on your machine, notably if you tried both MAMP and XAMPP in the past. It is safe to rename any unused "htdocs" fold­er before run­ning the installer.

If you plan to install the "bolprocessor" fold­er out­side the "htdocs" fold­er, fol­low the instruc­tions in Relocating "bol­proces­sor" before run­ning the installer.

As "BolProcessorInstaller.exe" is not yet cer­ti­fied, you may receive a warn­ing that it is from an "unknown source". Click on the option to ignore the warn­ing. If you don't feel con­fi­dent about doing this, please read the sec­tion on Security below.

All steps of the instal­la­tion are dis­played to ensure that they are suc­cess­ful. At the end you'll be asked to press a key.

Now start MAMP or XAMPP. There is an Open WebStart Page but­ton on MAMP (free) which will dis­play a page con­firm­ing that the Apache serv­er is run­ning. Probably you will find a Go to Application but­ton on XAMPP man­ag­er.

Point your brows­er at localhost/bolprocessor/php/. This will dis­play the home page of Bol Processor BP3. Otherwise, check that MAMP or XAMPP is set to use port #80.

If you see this image at the top right of the page, the con­sole is ready. Click on the lamp if you pre­fer to use the light mode for the interface.

You can ignore the next sec­tion. 😀

Compile the 'bp.exe' console (if necessary)

The Windows instal­la­tion of Bol Processor includes the pre-compiled con­sole (named 'bp.exe' ). If, some some rea­son, the con­sole is not respond­ing, or if you mod­i­fied its source code (in the source/BP3 directory), you may need to recom­pile it.

If you see this image at the top right of the page, your life will be easy!

All you have to do is click on the link to com­pile the con­sole, which will take a minute or two.

If the frame says that 'gcc' is not respond­ing (see pic­ture) you need to install MinGW. This is the main draw­back of Windows: its default instal­la­tion does not han­dle 'gcc' (the stan­dard C com­pil­er). You need 'gcc' to com­pile the Bol Processor con­sole, and per­haps oth­er appli­ca­tions to come. So, install MinGW, care­ful­ly fol­low­ing instruc­tions on this page. It is sim­ple, but you shouldn't miss a step!

Once 'gcc' is respond­ing, reload the Bol Processor home page and click on the link to com­pile the console.

Install Csound

Csound is not required to run the Bol Processor, as you can work with MIDI files and real-time MIDI. However, it will give you access to a dif­fer­ent approach to sound synthesis.

Just down­load a pre-built instal­la­tion of Csound from its down­load page. Select "64bit Full Installer 6.18.1".

A frame ask­ing you to cor­rect the path to Csound. This is the default path for Windows 10, by the way. We tricked the inter­face into say­ing it was wrong!

The BP3 inter­face will be able to fig­ure out the loca­tion of "csound.exe" and fix its path accord­ing­ly. If it does not respond, you will be asked to change the path and per­haps the name of the Csound con­sole (see image). Once it works after a mod­i­fi­ca­tion, please con­tact us so that we can update the default paths and names of Csound in your instal­la­tion of Windows.

😀  Now, the Bol Processor is ful­ly operational!

You can try exam­ples con­tained in the "ctests" fold­er, or fol­low the guid­ed tour on the page Bol Processor ‘BP3’ and its PHP inter­face.

Updating to new versions

To update the Bol Processor con­sole, its PHP inter­face and exam­ples (the con­tents of the "ctests" fold­er), sim­ply rerun the installer. It will down­load and install the lat­est ver­sions of the soft­ware and data. It will also delete and replace the pre­com­piled "bp.exe" con­sole.

The installer will not mod­i­fy or delete any data you have cre­at­ed in the "ctests" fold­er or out­side it. However, if you have mod­i­fied a sam­ple file with­out chang­ing its name, it will be revert­ed to its dis­tri­b­u­tion version.

The installer will also pre­serve the "_settings.php" file (if it exists), which con­tains your project settings.

Security

You are right to be con­cerned about secu­ri­ty. Can you be sure that you have down­loaded the cor­rect ver­sion of "BolProcessorInstaller.exe"? As this exe­cutable is cer­ti­fied, there is no known risk of mali­cious modification.

The size of this file is exact­ly 1820992 bytes and its MD5 is
9524a9c20c3e300bab509238ad406db2. You can calculate the MD5 on this page. These numbers will indeed be subject to change with the release of new versions of the installer. The current version is dated 27 January 2025.

👉  Please DO NOT SHARE THE INSTALLER, only its link: https://bolprocessor.org/misc/BolProcessorInstaller.exe

You may also want to know all the details of how it works. Geeks may want to cus­tomise it for their own use. Just down­load this fold­er which con­tains the source files (installer.ps1 and setup.iss) along with a sum­ma­ry of how to build the installer.

For read­ers not con­ver­sant with Windows PowerShell, the fol­low­ing is a descrip­tion of the process in human language:

Check that an Apache serv­er MAMP or XAMPP is installed by find­ing either MAMP\htdocs or xampp\htdocs on the com­put­er (not case-sensitive). If it is not found, exit with the warn­ing that either MAMP or XAMPP should be installed.

Download the lat­est dis­tri­b­u­tion files from GitHub:
https://github.com/bolprocessor/bolprocessor/archive/graphics-for-BP3.zip
https://github.com/bolprocessor/php-frontend/archive/master.zip
https://github.com/bolprocessor/bp3-ctests/archive/main.zip

Unzip these three files. They cre­ate fold­ers with names:
bolprocessor-graphics-for-BP3
php-frontend-master
bp3-ctests-main

Create a fold­er named "bol­proces­sor" (if it does not yet exist) inside the "htdocs" fold­er of the Apache server

Copy bolprocessor-graphics-for-BP3/source to htdocs/bolprocessor/
If there is already a "source" fold­er, delete it

Copy bolprocessor-graphics-for-BP3/Makefile to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP2_help.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/Credits.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP3-To-Do.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/License.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/ReadMe.txt to htdocs/bolprocessor/

Copy bolprocessor/php/_settings.php to bolprocessor/ (if it exists)

Copy php-frontend-master/php to htdocs/bolprocessor/
If there is already a "php" fold­er, delete it

Copy bolprocessor/_settings.php to bolprocessor/php/ (if it exists)

Create a fold­er htdocs/bolprocessor/csound_resources if it does not yet exist

Copy the con­tent of php-frontend-master/csound_resources to htdocs/bolprocessor/csound_resources
Files that already exist should be replaced with their updat­ed versions

Create a fold­er htdocs/bolprocessor/ctests if it does not yet exist

Copy the con­tent of bp3-ctests-main to htdocs/bolprocessor/ctests
Files that already exist should be replaced with their updat­ed versions

Delete the tem­po­rary down­load directory

Replace htdocs/bolprocessor/bp.exe with the updat­ed version.

Relocating "bolprocessor"

The Bol Processor can be installed out­side the "htdocs" fold­er cre­at­ed by MAMP or XAMPP (on your boot dri­ve). You might want it near relat­ed projects, or use extra space from an exter­nal hard dri­ve. There may also be sit­u­a­tions where cre­at­ing files on the boot dri­ve is restricted.

Fortunately, the process of relo­cat­ing is very simple.

If you have already cre­at­ed a "bolprocessor" fold­er by run­ning the installer, copy it to the desired loca­tion and delete it from the "htdocs" fold­er. If not, cre­ate an emp­ty "bolprocessor" fold­er in the desired location.

Let's say you've cre­at­ed an emp­ty fold­er called "bolprocessor" inside a fold­er called "MUSIC" on an exter­nal dri­ve labelled "D", and MAMP is installed on dri­ve "C". Right-click the start icon at the bot­tom left of the screen, and select Windows PowerShell (admin). Then type the fol­low­ing com­mand to cre­ate a sym­bol­ic link — in fact a junc­tion (/J instead of /D):

cmd /c mklink /J "C:\MAMP\htdocs\bolprocessor" "D:\MUSIC\bolprocessor"

If you are using XAMPP, replace "\MAMP\" with "\xampp\".

Make sure that the sym­bol­ic link you cre­at­ed points to the cor­rect loca­tion: you will now see a "bolprocessor" icon in the "htdocs" fold­er. Double-click it, it should open the des­ti­na­tion folder.

You can now safe­ly run the installer. Updates to new ver­sions will be the same way.

Make sure you use the lat­est ver­sion of the installer, as it is designed to work with sym­bol­ic links.

👉 Never change the names of the "bolprocessor" fold­er and sym­bol­ic link, oth­er­wise the instal­la­tion will fail.

The first time you run the Bol Processor, MAMP or XAMPP may ask your per­mis­sion to dis­play files out­side its "htdocs" fold­er. Please con­tact us if you're expe­ri­enc­ing issues with this relocation!

You can use the same tech­nique to relo­cate some data files out­side the "bolprocessor" fold­er, for exam­ple to a loca­tion shared by Dropbox.

You can also use sym­bol­ic links to relo­cate fold­ers out­side the "bolprocessor" fold­er, as explained here.

Uninstall the Bol Processor

Uninstalling the Bol Processor and all the data down­loaded or cre­at­ed for its use, is very sim­ple: delete the "bolprocessor" fold­er and the "htdocs\bolprocessor" sym­bol­ic link, if you have cre­at­ed one.

Bernard Bel
Created: August 2024