New in version 2.0.
Abjad model of LilyPond input file MIDI block:
abjad> staff = Staff("c'4 d'4 e'4 f'4")
abjad> score = Score([staff])
abjad> lilypond_file = lilypondfiletools.make_basic_lilypond_file(score)
abjad> lilypond_file.score_block.append(lilypondfiletools.MIDIBlock())
abjad> layout_block = lilypondfiletools.LayoutBlock()
abjad> layout_block.is_formatted_when_empty = True
abjad> lilypond_file.score_block.append(layout_block)
abjad> f(lilypond_file.score_block)
\score {
\new Score <<
\new Staff {
c'4
d'4
e'4
f'4
}
>>
\midi {}
\layout {}
}
MIDI blocks are formatted even when they are empty.
The example here appends MIDI and layout blocks to a score block. Doing this allows LilyPond to create both MIDI and PDF output from a single input file.
Read the LilyPond docs on LilyPond file structure for the details as to why this is the case.
Note
Inherited from lilypondfiletools._AttributedBlock
x.__delattr__(‘name’) <==> del x.name
Note
Inherited from __builtin__.object
Note
Inherited from __builtin__.object
Note
Inherited from lilypondfiletools._AttributedBlock
x.__setattr__(‘name’, value) <==> x.name = value
Note
Inherited from __builtin__.object
Note
Inherited from __builtin__.object