Music For Mystics: Conjuring riffs hidden in old alchemist texts

A page from an old book with a glass pendant overlaid over it, highlighting specific letters of the text
A screenshot Music For Mystics interface using a page from the Theatrum chemicum britannicum (1652)

I've been thinking about how to make music using old public domain books that have been digitized (of which there are many.) I've also been trying to steer my work more into the categories of "strange" and "weird."

This led me to combine the concepts of a Ouija Board and cryptology: allowing users to "decode" hidden musical patterns embedded in old texts by moving an object over them. This is very much in the spirit of works like John Cage's Atlas Eclipticalis, where he superimposed musical staves over the star charts of the Atlas Eclipticalis 1950.0, an atlas of the stars published in 1958 by Antonín Bečvář, a Czech astronomer. (I created an interactive version of this in 2016 which I also wrote about as the Data-Driven DJ.)

Music Eclipticalis is a data-driven song using the position of the stars as seen from Earth.

For this experiment, I searched for old occultist or alchemist texts, which I thought would be most appropriate for the theme. To start with, I chose the Theatrum chemicum britannicum, a compilation of English alchemical literature published in 1652.

A title page of Theatrum Chemicum Britannicum with text in old 17th centruy font with a graphic of a serpent, bird, and frog
Elias Ashmole, Theatrum Chemicum Britannicum : Containing Severall Poeticall Pieces of Our Famous English Philosophers, Who Have Written the Hermetique Mysteries in Their Owne Ancient Language (London: J. Grismond, 1652)

The concept is pretty straightforward: users can move a circular looking glass (I lifted this from the Met's open access collections) over pages of the text. If the letters in the circle match notes of a particular musical scale, they are highlighted and played in a loop. The horizontal position corresponds to time (when the note is played) and the vertical position corresponds to the note's octave (how high or low the musical pitch is). Here's a demo:

A screen recording of a Music For Mystics demo

I created a Jupyter notebook to outline the basic process for how I produced this:

First, use Tesseract to do Optical Character Recognition (OCR) on the source material. This gave me character-level positions and confidences. I only needed letters A through G for music making:

A page from the Theatrum Chemicum Britannicum with letters A through G with red boxes around them
A page from the Theatrum Chemicum Britannicum with letters A through G highlighted

To provide a nice visual effect of highlighting each letter as they are played, I extracted each letter and converted them to SVG data. (This process would actually be very useful for creating a custom font using the source material!)

Nine rows of black text in old type.
SVG text that was automatically extracted from a page in the Theatrum Chemicum Britannicum

The audio is generated using Tone.js, a popular musicmaking framework for the Web. To provide some additional variability, the user can select a musical key (e.g. C, C#, D, etc.) and mode (e.g. Ionian, Aeolian, Locrian, etc.) If you find a particular pattern you want to keep, you can download a tiny MIDI file of the current pattern.

As always the code to create this is open source. The code is flexible enough to use the interface on arbitrary images of text, so the possible musical patterns are endless!