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: 27 October 2024, size 12010 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 set up per­mis­sions and own­ers for using the con­sole. The own­er is "daemon" (the same one used by XAMPP) and per­mis­sions are "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!

Restart 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 test data: 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.

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.

Bernard Bel
August 2024

Leave a Reply

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