6. Recalling output

6.1. Reopening Abjad PDFs

After you build a piece of notation and open with show() you will usually close the resulting PDF and continue working, changing your output notation in an iterative and incremental way.

abjad> staff = Staff(construct.scale(8))
abjad> show(staff)

But what if you need to go back and open the resulting PDF again? Abjad provides pdf() for precisely this purpose. Type the following at the Abjad prompt to open the most recent PDF written by Abjad.

abjad> pdf( )

If you want to open not the next-to-most recent PDF generated by Abjad, pass in a -1. And for the next-to-next-to-most recent, pass in a -2, and so on.

6.2. Looking at LilyPond output

Abjad generates a LilyPond .ly file for every Abjad expression that you build and show(). To look at these LilyPond .ly files that Abjad builds behind the scenes, use ly().

abjad> ly( )
% Abjad revision 2362
% 2009-06-25 10:30

\version "2.12.2"
\include "english.ly"
\include "/Users/trevorbaca/Documents/abjad/trunk/abjad/scm/abjad.scm"

\new Staff {
   c'8
   d'8
   e'8
   f'8
   g'8
   a'8
   b'8
   c''8
}

Abjad opens the LilyPond .ly file in your favorite text editor.

These LilyPond .ly files that Abjad generates all have the same basic structure. The current version of Abjad and the date appear first, followed by the mandatory LilyPond version string and LilyPond directives for English note names and the default Abjad .scm file. The remainder of the file is reserved for the LilyPond input code corresponding to the expression you just built in Abjad.

When you are done looking at the LilyPond .ly file quit your text editor to return to the Abjad interpreter.

6.3. Looking at the LilyPond log

If things go wrong when you call show() or one of the other Abjad functions that call LilyPond behind the scenes, if may be helpful to examine the output that LilyPond writes to the LilyPond log.

abjad> log( )
GNU LilyPond 2.12.2
Processing `1420.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `1420.ps'...
Converting to `./1420.pdf'...

This is the normal output that LilyPond generates every time you call the program behind. When you are done looking at the LilyPond log, quit your text editor to return to the Abjad interpreter.

Table Of Contents

Previous topic

5. Adding comments

Next topic

7. Working with measures

This Page