Workshop on Advanced programming with the bach library

Organizer: Andrea Agostini (Scola di Musica Elettronica del Conservatorio di Torino, Italy)

The bach package for Max ( is a freely-distributed library ( of more than 200 modules, aimed at easing work in the fields of musical representation, algorithmic and computer-aided composition, as well as generic data manipulation. bach features musical notation editors able to display both traditional and augmented scores, including directives for sound synthesis and DSP processes, completely controllable via a rich GUI or scriptable through Max messages; graphical interfaces for alternative musical representations, (such as clock diagrams and tonnetz); advanced tools for list manipulation; combinatorial and matrix-calculus tools; and, in the latest version, a full-fledged, textual programming language for easing the implementation of algorithms that would be too complex to comfortably program in plain Max.

bach has been under continuous development since 2010; it has won the `Piccialli' prize of the AIMI and the `Prix du Jeune Chercheur' of the AFIM (respectively, the Italian and francophone association for musical informatics); it is taught in various computer music schools around the world, including the IRCAM Cursus of composition and musical informatics; and it is considered as having at least 2000 users.

This hands-on workshop will provide an overview of some advanced programming techniques that can be used effectively with bach. Namely, these include inclusion of explicit functional and imperative traits in bach-based Max patches; textual coding, both as scripts for the bach.roll and bach.score musical notation editors and as actual Turing-complete, functional programs for the new bach.eval object; and, if time allows it, some hints at constraint programming.

Provisional workshop structure

  • bullet blue  Brief introduction to some essential concepts of the bach library, and demonstration of a few examples of problematic processes to be implemented in the typical non-functional data flow style of Max. (30 min.)
  • bullet blue  Adoption of programming traits inspired by functional and imperative languages. (30 min)
  • bullet blue  Scripting bach's notation editors through textual methods. (30 min)
  • bullet blue  Introduction to bell, a new textual programming language included in the bach distribution and exposed through the bach.eval object. (1 hour)
  • bullet blue  Introduction to constraint programming with bach. (optional: 1 hour; possibly reduced to 30 minutes)
  • bullet blue  Q&A (30 min.)

Technical requirements

Participants to the workshop should:

  • bullet blue  Bring a laptop computer with recent versions of Max, bach and cage installed (bach and cage can be freely downloaded from Max's Package Manager). Headphones may be useful, but are not strictly necessary.
  • bullet blue  Have some experience of Max programming.
  • bullet blue  Possibly, but not mandatorily, have some knowledge of Western musical notation and theory.


Organizer: Andrea Agostini (Scola di Musica Elettronica del Conservatorio di Torino, Italy)

E-mail: andreaagostini (at)

is a composer of both instrumental and electronic music, as well as a computer music researcher. He has studied mostly in Italy and France, and attended the two-year course in composition and musical informatics at IRCAM, Paris. His curiosity for the totality of musical languages brought him to work in the domains of rock and improvisation, and to study non-Western musical practices. His music integrates these influences into a coherent mesh, without renouncing the potential of organization and complexity and the technical achievements that are specific of contemporary music as a genre.

He is one of the developers of the software libraries for computer-aided composition bach: automated composer's helper and cage; he has worked with various artists and musicians as their assistant programmer; he has collaborated with IRCAM as a Composer in Research in 2011 and 2013, and as an artistic research fellow in 2017; he is professor of computer music at the Conservatory of Turin and the Scuola Civica ‘Claudio Abbado' in Milan, and he regularly delivers workshops, presentations and masterclasses about his research and artistic work in the most important European and American institutions.


Date: Friday 18 October (afternoon session)

Capacity: 15 participants

Location: CNRS Campus Joseph Aiguier, 31 chemin Joseph Aiguier, 13009 Marseille