Tonality

A program for music composition and improvisation

You have just installed the Bol Processor. Welcome! This page is a guided tour for your first hour with it. You will play some music, look at how it is written, and change a few things to hear what happens. No programming skills are needed.
In a few words, the Bol Processor creates music from texts. A text can be:
The music can be heard as a MIDI file (with the built-in player), sent in real time to a MIDI instrument, or turned into a Csound score that produces a sound file. You can also import existing music from MusicXML scores.
👉 The sections are meant to be read in order, but you can skip any of them. Each one ends with links to the pages of the Tutorials and Examples menus that take you further.
If the Bol Processor is not yet installed, follow the instructions on the Install BP3 page for MacOS, Windows or Linux. Csound is optional: you can install it later.
👉 Feel free to modify the examples. The "ctests" folder is restored to its original state each time you update the Bol Processor. For the same reason, keep your own work in another folder (see below).
👉 The interface can be displayed in dark or light mode: use the icon in the top right corner.

In the "ctests" folder, click "-da.acceleration". This is a Data project: a text containing one or more musical items written in Bol Processor notation. This one contains a single item:
_transpose(12) _vel(60) E2 . D2 E2 . _vel(65) B2 D2 E2 . G2 B2 D2 E2 . _vel(70) F#2 G2 B2 D2 E2 . Bb2 F#2 G2 B2 D2 E2 . _vel(75) C2 Bb2 F#2 G2 B2 D2 E2 . _vel(77) G#2 C2 Bb2 F#2 G2 B2 D2 E2 . _vel(80) A2 G#2 C2 Bb2 F#2 G2 B2 D2 E2 . _vel(85) Eb2 A2 G#2 C2 Bb2 F#2 G2 B2 D2 E2 . _vel(87) C#2 Eb2 A2 G#2 C2 Bb2 F#2 G2 B2 D2 E2 . _vel(90) F2 C#2 Eb2 A2 G#2 C2 Bb2 F#2 G2 B2 D2 E2 .
Let us read it before listening:
This shows the spirit of the Bol Processor notation: you describe the structure of the music, and the machine works out the exact timings.
👉 Some MIDI players need an Internet connection to load their sounds. If you hear nothing, check your connection.
Try this: delete all the periods, click SAVE, then PLAY again. Now all notes have the same duration and the acceleration has disappeared. Put the periods back (or use your browser's Undo) and save again.
If your computer is connected to a MIDI instrument, or to a software synthesiser, you can send the music to it directly. Above the text, select Real-time MIDI among the output options, save this choice, and click PLAY. The sound quality now depends on your instrument, and the music starts without delay. Read the Real-time MIDI page to set up your MIDI inputs and outputs.
If you have installed Csound (version 7 or later), the interface tells you that Csound is responding. Select Csound score as the output option and click PLAY. The console writes a Csound score, then Csound turns it into a sound file that you can hear in the audio player. As no particular instrument is specified here, a simple default instrument ("0-default.orc") is used. We will come back to Csound further down.
Finally, select MIDI file again for the next steps.
👉 Did you notice the "-se.Visser2" and "-gr.acceleration" lines at the top of the data? The first one is a settings file (tempo, note convention, graphics, etc.) used to play this data. The second one is the grammar that composed this item… which brings us to grammars.
A grammar is a set of rules. Each rule says that a symbol on its left side can be replaced with what is on its right side. Starting from the symbol S, the machine applies rules again and again until only musical elements (notes, rests, sound-objects…) remain. The result is a musical item. Composers use grammars to describe the construction of a piece rather than the piece itself.
Open "-gr.Ames" in the "ctests" folder:
-se.Ames
-cs.tryTunings
// A grammar illustrating the construction of a rather
// complex time structure with an undetermined rest.
ORD
_mm(60.0000) _striated
gram#1[1] S --> _ins(1) {PA, _rest PB}
gram#1[2] PA --> {2,- PA1, 2 PA2} {4,PA3}
gram#1[3] PA1 --> {2,F#3}
gram#1[4] PA2 --> {1,F5,A5}
gram#1[5] PA3 --> PA31 PA32
gram#1[6] PA31 --> {1/2,G#3,E5,G5}
gram#1[7] PA32 --> {7/2,Bb4}
gram#1[8] PB --> {1/4,G#5&,C6,E6,B6&} {2,&G#5,&B6}
Some useful comments:
Now click PRODUCE ITEM(s). The console window shows the item that has been produced, after all variables have been replaced:
_ins(Plucked_string1) {{2, - {2, F#3}, 2 {1, F5, A5}} {4, { 1/2 ,G#3, E5, G5} { 7/2 ,Bb4}}, _rest { 1/4 ,G#5&, C6, E6, B6&} {2, &G#5, &B6}}
Listen to it on the MIDI player, then click the Image link to see how the two voices are placed in time.
👉 A common mistake: the note convention must match the way notes are written. "-se.Ames" uses the English convention (C, D, E…). If you change it to Italian/French, "F#3" is no longer recognised as a note and the production fails. The current convention is displayed on the grammar page, and you can convert all notes of a grammar to another convention with a single click at the bottom of the page.
👉 When a production fails, the console window displays the error messages and gives a link to a file with the details.
To go further: the beginner's tutorial builds grammars step by step. The examples of Harm Visser include "-gr.acceleration", the grammar that produced our first item.
You don't need to remember all the performance controls and keywords. At the bottom of the "-gr.Ames" page, click SHOW HELP ENTRIES. The grammar is displayed again, with links on all reserved words. Click "_rest": a window opens on the help entry for this word. The same button is available on Data pages.
The complete help file can also be read here.

Try the same with "-gr.Visser.Waves", another grammar by Harm Visser. Produce its item and compare its rendering in MIDI with this one, played on physical-model instruments (read explanations):
The "ctests" folder is a place to experiment, but it is restored during each update. Keep your own work in your own folders (also called workspaces).


👉 Please don't move files in or out of these folders with the Finder or the File Manager: this can lead to permission errors. If you want to keep your data outside the Bol Processor folder, read the Move data page.
You can also start from existing music. MusicXML is a standard format for sheet music. Many scores can be downloaded in this format, and score editors such as MuseScore can export it. The Bol Processor converts these scores to its own notation, so you can play them, analyse them, or reuse their fragments in your own grammars.
Below is Beethoven's Fugue in B flat major imported from MusicXML. It shows both the accuracy of the conversion and the complexity of the music that the Bol Processor can handle:
All the details are on the Importing MusicXML scores page. Two famous works are discussed on The Well-tempered Clavier and Bach well-tempered tonal analysis. Music can also be entered from a MIDI keyboard: see Capture MIDI input (work in progress).
A grammar normally starts its work from the symbol S. But you can start from any other variable, to listen to just one part of the construction.

👉 The settings of this grammar have the Non-stop improvize option checked. Set the output to Real-time MIDI and click PRODUCE ITEM(s): the dice game plays forever, with a new piece each time! Click STOP or PANIC to end it.
Open "-da.checkPoly". This Data project contains many short items that show the possibilities of polymetric expressions.

To learn more about this notation, read Polymetric structures, Tied notes and Carrying over controls.
So far we have played simple notes. The Bol Processor can also play sound-objects: small pieces of music, such as a drum stroke, a chord or a melodic ornament, that are given a name and used like notes. Their name comes from the bols, the spoken syllables of tabla drumming, which were the first application of the Bol Processor.
The content of sound-objects is stored in sound-object prototype files ("-so.…"). An alphabet file ("-al.…") lists the names that a grammar may use.

To go further: Sound-objects, Silent sound-objects, and Time-setting of sound-objects for the algorithm.

Csound is a free program that creates sounds from two texts: an orchestra, which describes the instruments, and a score, which lists the notes to play. The two programs complement each other: the Bol Processor deals with musical structures and writes the score, and Csound deals with sound.
With Csound, you are no longer limited to the 128 keys and the instruments of MIDI. You can use any tuning or temperament (see Microtonality), and design your own instruments.

Each line starting with "i" is a note. Its first fields are the instrument number, the start time and the duration (in beats), then the pitch. The following fields carry the volume and other parameters that can change during the note. The name of the note is given as a comment at the end of the line.
A just-intonation version of the dice game can be heard on the Just intonation: a general framework page. All the Csound features are described in Csound in BP3, in particular Csound checkup, Csound objects and Csound tuning in BP3.
The Bol Processor can turn MIDI-style controls ("pitchbend", "modulation", "volume", etc.) into parameters of Csound instruments, and it can also handle parameters that have no MIDI equivalent. The orchestra can then make these parameters vary smoothly during a note, using the GEN07 (linear interpolation) or GEN08 (cubic spline) Csound generators. All this is set up in a "-cs" Csound instrument file such as the one shown below, and documented in chapter 17 of the BP2.9.8 reference manual.

A simple orchestra file called "0-default.orc" is provided in the "csound_resources" folder. It is used when no other orchestra is specified, as in our first examples. See also the Simple Csound orchestra page.

The Csound instrument editor is very similar to the one of BP2.9.8. A detailed description can be found in chapter 17 of the BP2.9.8 reference manual.

These additional parameters can be created, deleted and restored in the same way as instruments. The interface makes sure that a new parameter does not have the same name as an existing or (temporarily) deleted parameter.
Let us look at the "blurb" parameter (image on the left). Each parameter has a default value, which is not necessarily zero. Values found in Csound scores can be combined additively (ADDval) or multiplicatively (MULTval). The "blurb" parameter sends its start value to argument "9" of the Csound score, and its end value (for continuous variations) to argument "10".

Here is a simple example showing the basic features of Csound in the Bol Processor. A complete demonstration on a real musical example can be found on the Sarasvati vina page. All the features of the Csound implementation are documented on the Csound checkup and Csound objects pages, with examples that you can try yourself.
The Data project "-da.tryCsound" calls "-cs.tryCsound" and uses its instrument "Harpsichord" (number 3). Type the following line in a Data project linked to "-cs.tryCsound" and play it with the Csound score output:
_ins(Harpsichord) _volumecont _volume(127) A4 G4 C5 A5 A4 G4 C5 A5 _volume(0)
The Csound score produced is:
; Csound score f1 0 256 10 1 f2 0 256 10 1 0.5 0.3 0.4 t 0.000 60 i3 0.000 1.000 440.000 8192.000 8192.000 127.000 111.125 0.000 0.000 0.000 0.000 0.000 ; A4 i3 1.000 1.000 391.995 8192.000 8192.000 111.125 95.250 0.000 0.000 0.000 0.000 0.000 ; G4 i3 2.000 1.000 523.251 8192.000 8192.000 95.250 79.375 0.000 0.000 0.000 0.000 0.000 ; C5 i3 3.000 1.000 880.000 8192.000 8192.000 79.375 63.500 0.000 0.000 0.000 0.000 0.000 ; A5 i3 4.000 1.000 440.000 8192.000 8192.000 63.500 47.625 0.000 0.000 0.000 0.000 0.000 ; A4 i3 5.000 1.000 391.995 8192.000 8192.000 47.625 31.750 0.000 0.000 0.000 0.000 0.000 ; G4 i3 6.000 1.000 523.251 8192.000 8192.000 31.750 15.875 0.000 0.000 0.000 0.000 0.000 ; C5 i3 7.000 1.000 880.000 8192.000 8192.000 15.875 0.000 0.000 0.000 0.000 0.000 0.000 ; A5 ; e 10.000

Csound scores created with "-cs.tryCsound" cannot be played with "0-default.orc", because their arguments do not match.
A real musical example using many features of Csound in the Bol Processor is a phrase of Carnatic music designed by Srikumar K. Subramanian in 1996. Read the description of this example and listen to it (in just intonation):

The Timebase is a tool for creating a rhythmic pattern (a "tick pattern") to be superimposed on a piece of music produced by the Bol Processor. Superimposition in real time has not yet been implemented in the 'BP3' console, but you can try it by importing a production of the Bol Processor saved as a MIDI file.



➡ For experts!
The Timebase page offers a convenient way of superimposing a tick pattern on a production of the Bol Processor saved as a MIDI file. Timebases can also control a MIDI drum machine taking part in the performance. It would be better to make the drum track part of the performance itself, since polymetric expressions can handle superimpositions. We will see that this is often possible, but tedious. (A more systematic approach is described on the Timebase to polymetric page.)
A polymetric equivalent of the tick pattern shown above would be:
{_chan(1) _vel(120) _staccato(99) C8 - - -, _chan(1) _vel(120) _staccato(99) - C7 C7 C7,
_chan(1) _vel(120) _staccato(98) E7 E7 E7 E7 E7 E7 E7 E7}
This expression is displayed at the bottom of the Timebase page.
Let us try to add this polymetric expression as a variable "Drum" to the grammar "-gr.acceleration":
S --> {Piano, Drum}
Piano --> _vel(60) A B _vel(65) C D _vel(70) E F _vel(75) G _vel(77) H _vel(80) I _vel(85) J _vel(87) K _vel(90) L
A --> E2 .
B --> D2 A
C --> B2 B
D --> G2 C
E --> F#2 D
F --> A#2 E
G --> C2 F
H --> G#2 G
I --> A2 H
J --> D#2 I
K --> C#2 J
L --> F2 K
Drum --> {_chan(1) _vel(120) _staccato(99) C8 - - -, _chan(1) _vel(120) _staccato(99) - C7 C7 C7,
_chan(1) _vel(120) _staccato(98) E7 E7 E7 E7 E7 E7 E7 E7}
Unfortunately, this does not work, because the "Drum" pattern should be repeated at the right tempo instead of being stretched to the duration of "Piano"… The solution is to replace it with a cyclic sound-object. Let us do it:
S --> {_chan(1) _vel(120) _staccato(99) C8 - - -, _chan(1) _vel(120) _staccato(99) - C7 C7 C7,
_chan(1) _vel(120) _staccato(98) E7 E7 E7 E7 E7 E7 E7 E7}
-al.drum
S --> {Piano, cycle2}
Piano --> _vel(60) A B _vel(65) C D _vel(70) E F _vel(75) G _vel(77) H _vel(80) I _vel(85) J _vel(87) K _vel(90) L
A --> E2 .
B --> D2 A
C --> B2 B
etc…
J --> D#2 I
K --> C#2 J
L --> F2 K

-so.drum
*
cycle2
The ‘*’ on the second line of the alphabet is an arbitrary symbol declaring a homomorphism — not used here.
Show messages OFF
Note convention = English
Show graphics ON
Play - - {2,G4,E4,C4,- C5 - C5 {C5_-,A#4_ _}}
Show messages ON
Activate window Scrap
Type Welcome to <a href="https://bolprocessor.org/">Bol Processor BP3</a>...
Type Hope you <big><i><font color="green">enjoyed</font></i></big> the music!
Type BP3 is now waiting for you to play ‘C4’ on the MIDI keyboard
Type <return>
Wait for C4 channel 1
Run script -sc.trySubscript
Type That's all folks!

Load project -gr.Ames
Csound score ON
Produce items
The autosave feature works like the automatic saving of Google Docs or WordPress pages. It is used when editing sound-object prototypes and Csound instruments.
When you edit the prototypes of "-so.abc1", all data belongs to this file. Clicking the SAVE THIS PROTOTYPE button while working on a particular prototype only updates a temporary file, whose path is shown at the top of the page. When you have finished, you are expected to return to the "-so.abc1" page and click the SAVE ‘-so.abc1’ INCLUDING ALL CHANGES TO PROTOTYPES button. Fortunately, the autosave, shown by a red line at the top of the page, does it for you in the background.
The same feature is used on the page of Csound instrument files. For instance, the file "-cs.tryCsound" is saved automatically every 30 seconds while you are editing its instruments or additional parameters.
👉 Temporary files are kept in the "temp_bolprocessor" folder, in a subfolder whose name contains the identifier of your browser session. If you restart your browser or your computer, a new session begins and a new subfolder is created. The interface deletes subfolders that are more than 24 hours old. Thanks to the autosave, no data is lost.
For developers: the autosave is a simple call of JavaScript code in the files "autosaveObjects.js" or "autosaveInstruments.js". The command is myVar = setInterval(savePost, 30000), where "30000" means 30 seconds. A savePost() function sends POST requests to "autosaveObjects.php" or "autosaveInstruments.php".
You have now seen the main features of the Bol Processor. Here are some suggestions for the next steps:
👉 Don't hesitate to ask questions or send suggestions via the contact form, or join the BP developers list on SourceForge.
This section is for software specialists interested in a in-depth analysis of the implementation of algorithms, all created by Claude Opus 5.5…
Bernard Bel
Actes du colloque "Structures Musicales et Assistance Informatique" (1988). Marseille.
👉 Cited on page The two-vina experiment
Download an English translation
Les difficultés de l'analyse acoustique de musiques extra-européennes proviennent souvent de catégorisations de phénomènes qui ne rendent pas compte des modèles explicites (ou implicites) sur lesquels s'articulent la création et la perception de structures musicales. Cet exposé définit la notion de modèle mélodique, élaborée et modifiée pendant neuf siècles en Inde pour rendre compte d'un phénomène mélodique particulier: le raga. Dans la deuxième partie sont présentés les outils et méthodes qui servent à caractériser l'intonation des ragas, ainsi qu'à réaliser leur transcription et leur classification automatiques.
Difficulties in analysing extra-European musics are often bound to categorisations of phenomena that do not take into account explicit (or implicit) models on which the creation and perception of musical structures are based. This paper defines the concept of melodic model, a concept elaborated and transformed for nine centuries in India to underlie a particular melodic phenomenon: raga. In the second part, tools and methods are presented relating to raga intonation and their automatic transcription and classification.

In "Rāga : approches conceptuelles et expérimentales," the author discusses the conceptual history, theoretical foundations, and experimental investigations of the rāga system in North Indian classical music. The first part of the paper traces the evolution of rāga-related concepts from ancient Sanskrit treatises (notably the Dattilam and the Nāṭyaśāstra) to more recent perspectives that emphasize melodic modes (mela), specific tonal centers (toniques), and the interplay between theory and practice. The author highlights how notions like grāma, mūrcchanā, and jāti have shifted over the centuries, culminating in various attempts to classify rāgas by scales (ṭhāṭa or mela), melodic phrases (aṅga), and aspects of performance practice, including the ideal hour of rendition.
The second part of the paper presents technological and analytical methods used by the author to study raga intonation and structure. The author describes experimental devices, including custom-built pitch extractors and the Melodic Movement Analyser (MMA), to capture and visualize pitch contours (melograms), produce histograms (tonagrams) of pitch distribution, and explore microtonal aspects of raga execution. Additionally, the paper delves into automated transcription methods (sargam notation) and preliminary approaches for automatic classification of ragas, leveraging pitch-based similarity measures. By systematically comparing theoretical predictions with actual performance data, the paper proposes a richer understanding of how ragas are conceptualized and realized in practice.
The author provides an extensive overview of the key developments and conceptual shifts in Indian music theory, from the gråma-based system of Bharata to modern ṭhāṭa and scale-based frameworks. This historical arc clarifies how philosophical, aesthetic, and practical considerations converge in raga performance.
The paper effectively underscores the gap between theoretical ideals (e.g., 22 srutis, ancient modal structures) and the realities of contemporary performance practices (e.g., standardization, partial tempering, the emphasis on the bourdon). This dual approach helps illustrate the dynamic nature of raga music.
By devising hardware and software tools for real-time pitch extraction and by automating transcription, the author demonstrates a methodological framework that expands the possibilities for large-scale analysis of raga performances. The clear explanations of how these technologies work support their applicability and value.
The paper bridges musicological inquiry, acoustical analysis, ethnomusicological context, and computational methods. This interdisciplinary scope situates the work as a notable contribution to scholarship on microtonal music, melodic classification, and cross-cultural cognition of musical scales.
The paper offers a clear and methodically thorough account of both the theoretical underpinnings of raga music and the experimental means by which such theories can be tested against empirical performance data. The blending of historical musicology, acoustics, and informatics demonstrates a strong interdisciplinary approach. By synthesizing ancient treatises with modern computational tools, the work deepens our understanding of how ragas continue to thrive as vibrant, living musical entities while revealing the complexity of attempts at standardization and classification.
In sum, “Raga : approches conceptuelles et expérimentales” provides valuable technical insights and broadens our perspective on one of the most sophisticated melodic systems worldwide. Its fusion of musicological research, experimental data, and computational analysis stands out as a notable contribution to raga studies and to the broader field of ethnomusicology.
Skip to PDF content