The proposed poster describes the implementation of the abjadcompile Atom package, as well as the nCoda project of which it is a part, with helpful background summary of the LilyPond music typesetting application and the Abjad API for Formalized Score Control.
A package extension to the Atom text editor, abjadcompile injects kernel middleware into the Hydrogen package’s communications with a running Jupyter kernel to enable pre- and post-execution interaction with Atom and its packages. abjadcompile consumes and chains services from the Hydrogen and lilycompile packages to enable realtime music notation preview: after activating a Jupyter kernel via Atom’s Hydrogen package, the user aggregates music notation elements in Python with the Abjad API for Formalized Score Control and then executes the code with Hydrogen’s block and line execution capabilities; upon execution, abjadcompile’s kernel middleware intercepts calls to abjad’s `show()` function — which normally writes a lilypond music shorthand file, converts the result to a .pdf file, and displays the resulting .pdf in the OS’s default .pdf display application — and replaces them with calls to `abjad.persist()`, which writes a lilypond file without display and returns path to the resulting file; next, abjadcompile passes the lilypond file’s path, returned via the stdout stream, to the package’s consumed lilycompile service to render the lilypond file as a .pdf file and display the result in a new Atom editor pane. The resulting user experience is one of instantaneous, algorithmic generation and preview of music notation, entirely within the Atom editor.
abjadcompile is part of the nCoda project, an open-source initiative to explore the potentials of the Atom text editor as a Jupyter front-end for code-literate music composition and analysis.
©2018, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org