This package consumes the following services:
abjadcompile
abjadcompile is an Atom package and Hydrogen plugin, created and maintained by the nCoda team, that enables Abjad to render .pdf files to an Atom text editor tab. In tandem with Hydrogen's line and block execution, abjadcompile enables you to iteratively compose and render scores in a newly flexible and integrated development environment.
Installation and Setup
(1) pip install abjad
to install Abjad into your Python environnment.
(2) Follow the Atom Flight Manual's instructions to download and install abjadcompile
from inside Atom (Atom>Preferences>Install>Search for abjadcompile
, press install
). Atom should automatically install the package's Node and Atom package dependencies, with your permission.
(3) Make sure you can execute Python code via Hydrogen (command+return
). If you can't, Hydrogen should pop up a failure notifcation with instructions for installing a jupyter kernel, with a couple lines of clipboardable code to run in your Python environment.
Features
1. Render an Abjad component as a .pdf score in a new Atom tab.
(1) Start Hydrogen in a saved .py file.
(2) Invoke the abjadcompile: attachMiddleware
command – from [Atom's Command Palette](https://flight-manual.atom.io/getting-started/sections/atom-basics/, keyboard shortcut (ctrl-alt-m
), contextual (right-click) menu, or "Packages" menu – to insert the Abjad middleware into Hydrogen's kernel communication loop.
(3) Use Hydrogen's execution commands to run any code containing abjad.show(component)
, where component
is an illustratable Abjad component, and the object will open as a .pdf in a new Atom tab.
N.B. - All .pdf files render to a temporary directory but can be saved to disk by clicking the pdf file's path in the lower-left-hand corner of Atom when the pdf's tab is selected.
Examples
A Minimal Example
# must be saved as something.py
import abjad
note = abjad.Note()
abjad.show(note)
A Less Minimal Example
Maximal Examples
Dependencies
Node Package Dependencies (Automatically Installed by Atom)
Atom Package Dependencies (Automatically Installed by Atom-Package-Deps)
hydrogen ~ lilycompile ~ pdf-view
Python Dependencies
External Dependencies
Known Issues
Kernel shutdown/restart currently requires window reload, as the abjadcompile plugin thinks middleware is already attached.
Props
The team owes a special thank you to Ben Russert and Nikita Kitaev for their help on this project, and to Trevor Bača and Josiah Wolf Oberholtzer for Abjad.