Skip to main content

Module layout

Module layout 

Source
Expand description

How a score is laid out on the page: music21’s layout objects. How a score is laid out on the page: music21’s layout objects.

A ScoreLayout gives the scaling and the page, system and staff layouts a score starts with, and stands in the score itself; a PageLayout, SystemLayout or StaffLayout stands in a measure and says how the page, system or staff changes there, or that a new page or system starts. They are read from and written to MusicXML’s <defaults>, <print> and <staff-details>. Margins and distances are in tenths of a staff space, as MusicXML gives them, kept as the integer or the decimal the file wrote.

Structs§

PageLayout
How a page is laid out, and whether one starts here: music21’s PageLayout, MusicXML’s <print new-page> and <page-layout>.
ScoreLayout
The scaling and the layouts a score starts with: music21’s ScoreLayout, read from MusicXML’s <defaults>.
StaffLayout
How a staff stands from the one above it and what it is: music21’s StaffLayout, which MusicXML splits into <staff-layout> and <staff-details>.
SystemLayout
How a system is laid out, and whether one starts here: music21’s SystemLayout, MusicXML’s <print new-system> and <system-layout>.

Enums§

Layout
One of music21’s layout objects, as it stands in a stream.
StaffType
What a staff is for: music21’s StaffType.
Tenths
A length as MusicXML writes it: a whole number, or one with a fraction. music21 keeps 120 an int and 120.5 a float, and writes each back as it was.