MaxPy: An open-source Python package for text-based generation of MaxMSP patches

Ranger Y Liu, Satchel Peterson, Richard T Lee, and Mark Santolucito

Proceedings of the International Conference on New Interfaces for Musical Expression

Abstract:

MaxMSP is a visual programming language for creating interactive audiovisual media that has found great success as a flexible and accessible option for computer music. However, the visual interface requires manual object placement and connection, which can be inefficient. Automated patch editing is possible either by visual programming with the [thispatcher] object or text-based programming with the [js] object. However, these objects cannot automatically create and save new patches, and they operate at run-time only, requiring live input to trigger patch construction. There is no solution for automated creation of multiple patches at \textitcompile-time, such that the constructed patches do not contain their own constructors. To this end, we present MaxPy, an open-source Python package for programmatic construction and manipulation of MaxMSP patches. MaxPy replaces the manual actions of placing objects, connecting patchcords, and saving patch files with text-based Python functions, thus enabling dynamic, procedural, high-volume patch generation at compile-time. MaxPy also includes the ability to import existing patches, allowing users to move freely between text-based Python programming and visual programming with the Max GUI. MaxPy enables composers, programmers, and creators to explore expanded possibilities for complex, dynamic, and algorithmic patch construction through text-based Python programming of MaxMSP.

Citation:

Ranger Y Liu, Satchel Peterson, Richard T Lee, and Mark Santolucito. 2023. MaxPy: An open-source Python package for text-based generation of MaxMSP patches. Proceedings of the International Conference on New Interfaces for Musical Expression. DOI: 10.5281/zenodo.11189339

BibTeX Entry:

  @inproceedings{nime2023_98,
 abstract = {MaxMSP is a visual programming language for creating interactive audiovisual media that has found great success as a flexible and accessible option for computer music. However, the visual interface requires manual object placement and connection, which can be inefficient. Automated patch editing is possible either by visual programming with the [thispatcher] object or text-based programming with the [js] object. However, these objects cannot automatically create and save new patches, and they operate at run-time only, requiring live input to trigger patch construction.  There is no solution for automated creation of multiple patches at \textit{compile-time}, such that the constructed patches do not contain their own constructors. To this end, we present MaxPy, an open-source Python package for programmatic construction and manipulation of MaxMSP patches. MaxPy replaces the manual actions of placing objects, connecting patchcords, and saving patch files with text-based Python functions, thus enabling dynamic, procedural, high-volume patch generation at compile-time. MaxPy also includes the ability to import existing patches, allowing users to move freely between text-based Python programming and visual programming with the Max GUI. MaxPy enables composers, programmers, and creators to explore expanded possibilities for complex, dynamic, and algorithmic patch construction through text-based Python programming of MaxMSP.},
 address = {Mexico City, Mexico},
 articleno = {98},
 author = {Ranger Y Liu and Satchel Peterson and Richard T Lee and Mark Santolucito},
 booktitle = {Proceedings of the International Conference on New Interfaces for Musical Expression},
 doi = {10.5281/zenodo.11189339},
 editor = {Miguel Ortiz and Adnan Marquez-Borbon},
 issn = {2220-4806},
 month = {May},
 numpages = {4},
 pages = {646--649},
 title = {MaxPy: An open-source Python package for text-based generation of MaxMSP patches},
 track = {Demos},
 url = {http://nime.org/proceedings/2023/nime2023_98.pdf},
 year = {2023}
}