Creating Music

External Element

Typically each hymn element in the table of contents is connected to some MIDI files containing the actual music. During the import process Gloria will load the table of contents file plus all the MIDI files for each hymn. It’s possible, however, to source MIDI files for this hymnbook from another hymnbook on Gloria. That’s done with the external element. When importing, MIDI files for external hymns don’t have to be supplied and Gloria won’t look for them on the USB memory stick.

During import Gloria doesn’t actually check to see if the other hymnbook exists, or if the hymn referenced by the external element exists, or if the MIDI files required by this hymn are present in the other hymnbook. It merely adds the hymn as a reference to an external hymnbook.

During play Gloria has to find the actual MIDI files. The hymn will play if the external hymnbook is present, the referenced hymn exists and the required MIDI files also exist. Otherwise the user will get a message informing them that the hymn they’ve selected is not present.

External references are a good way to create a hymnbook cross-reference. It’s possible to create a hymnbook that is completely made up of external references to other hymnbooks. When a user selects this hymnbook, the numbering and titles are all sourced from the new hymnbook, whereas the music is pulled from one or more other hymnbooks. This only works when Gloria already has the other hymnbooks installed.

Here’s that process applied to the example in this manual:

XML Notepad External Hymn

To do this, add an element to the hymn, name it “external” and give it the value “CSG”. Add an attribute named “num” with the value “009”.

The value of the external element, “CSG” in this example, must match the hymnbook code of the external hymnbook (here it’s the Celebremos Su Gloria hymnbook). The num attribute is the hymn number in that external hymnbook. So in this example, hymn #9 in the Celebremos Su Gloria hymnbook has been repurposed as hymn #1 in the Sample Hymnbook.

Only the MIDI files are sourced from the external hymnbook. So the hymn element still has to include a complete set of details, including a hymn number, number of stanzas, dynamic profile, title (or titles) and parts.

External elements must be child elements of a hymn element, and the hymn must have a valid num attribute.

External Attributes

num attribute

The “num” attribute is required. Its value is a number in the range 1 to 999. If you don’t include it Gloria will add the hymn as a regular hymn (where MIDI files are required) instead of as an external hymn. This is the number in the external hymnbook where the MIDI files will come from. The external hymnbook must be present on Gloria, and this number must be a valid hymn in that hymnbook.

The num attribute is allowed in the external element and the hymn element.