Skip to content

Project Structure

hbitteur edited this page Sep 12, 2016 · 18 revisions

##Project file

An Audiveris project file (a file with a ".omr" extension, dedicated to one Book) is nothing more than a Zip archive whose content can be easily browsed (and even modified at your own risk...) with any Zip editor.

Its structure is merely a sequence of XML files as follows:

book.xml                // Skeleton of book hierarchy

sheet#1                 // Specific folder for sheet #1
sheet#1/BINARY.xml          // Run table of binarized image of sheet #1
sheet#1/sheet#1.xml         // OMR details of sheet #1
    ...
sheet#N/                // Specific folder for sheet #N
sheet#N/BINARY.xml          // Run table of binarized image of sheet #N
sheet#N/sheet#N.xml         // OMR details of sheet #N

##Memory constraint

To be able to handle books with more than a few sheets, we keep book-related top data in memory, while sheet "details" are loaded into memory only when they are really needed. In terms of Audiveris project file, this means that just the book.xml part is kept in memory, while the various sheet#N.xml are loaded on demand.

So, the physical and logical containments presented above are implemented as follows:

  • A Book does not directly contain Sheet's but only a sequence of SheetStub instances (or Stub for short) with a one-to-one relationship between SheetStub and Sheet.
  • In a similar manner, a Score actually contains PageRef's which refer to Page's.

In the following class diagram, physical entities are displayed in blue, and logical entities in yellow.

/images/Book.png

On the left side, the "book.xml" artifact represents the content of the book.xml part within an Audiveris project file, and is kept in memory. Note that the Score and PageRef instances can exist only when GRID step has been reached on (some sheets of) the book.

On the right side, the "sheet#N.xml" artifact represents one sheet (perhaps among others), pointed to from book.xml, and is not necessarily in memory.

[Just to avoid endless clashes with Java predefined System class, we have chosen SystemInfo as the class name to represent a music system]