A regular expression (regex) is a mathematical notation used to search for a particular string of text using patterns to manipulate that text in some way. Using the music engraving software LilyPond, Hall and O’Donnell describe the deployment of regular expressions to identify bowing patterns for string players. Bowing patterns are complex, especially where computer music is involved. As the authors explain, traditional notations for simple “up-bow and down-bow symbols ... do not capture the complex bowing patterns that are latent within the music.”
The authors present an explicit notation for bowing patterns that are captured. In the LilyPond editor, patterns--such as a change of bowing direction or a sequence of notes for one bow stroke--are defined algorithmically. From this, an entire bowing pattern can be captured using a regex, and then be read and written by the LilyPond editor.
For example, the regular expression “a” could denote the set of strings {a}. Concatenation is achieved by supposing that X and Y are each regular expressions. These are literal and concatenation rules. Alternation and repetition rules are also defined. In practical terms, the software system seeks, identifies, and inserts bowing patterns within a score based on the data contained in the sets of regular expressions. These processes were validated “using the system to edit ten movements from six piano and violin sonatas by Mozart.”
I found this paper intriguing, and a useful and novel contribution to computational systems that support music learning and teaching.