>> IT IS HIGHLY RECOMMANDED TO MAKE CHANGES IN A COPY OF THE ORIGINAL ODF.

>> General information
This tool is intended to help in editing and checking a GrandOrgue organ definition file (ODF, extension .organ) in plain text mode, with the help of objects sections browsers (sorted list or tree).
To completely check the goodness of an ODF, loading it in GrandOrgue will detect deeply all the remaining errors if any.
Double clicking a section name in the sections list will expand the sections tree so that all the occurrences of the selected section are visible in the tree.
Double clicking on a parent or child section name in the parents/children list will make this section the selected one in the sections list and tree.
Double clicking on a search result in the HW sample set will make show the related section in the "HW sections" tab.
Pressing on the Delete button of the computer keyboard will do the same clicking on the Delete button of OdfEdit.
The help below is largely inspired and copy/pasted from the GrandOrgue help.

Menu items
------------------
Save ODF in ISO-8859-1 format (else UTF-8) => if checked, the ODF saving is made with ISO-8859-1 encoding, else it is with UTF-8-COM. It is proposed as GrandOrgue supports this format, but it gives less range of supported accentuated characters as UTF-8.
Sort references in selected section... => it sorts by ascending numerical order the references to other sections in the selected section. It works for sections of following types : Coupler, Divisional, General, Manual, Stop, Switch, Tremulant, WindchestGroup.
Extend the compass of the selected Manual/Stop/Rank... => it permits to extend the MIDI notes compass of the selected Manual or Stop or Rank section, up to the given MIDI note number.
HW to GO - do not convert keys noises => if checked, the manuals keys noises are not converted in the GO ODF. This can be wanted to not hear the keyboards noise of the sample set in addition to the keyboards noise of the organ used to play this sample set.
HW to GO - convert alternate panels layouts => if checked, the alternate panels layouts of the HW sample set (portrait mode panels for example) are converted in GO panels.
HW to GO - convert tremmed samples => if checked, the tremmed samples (sampled with a tremulant engaged) of the HW sample set are converted in the GO ODF. The usage of tremmed samples can increase a lot the RAM consumed by GrandOrgue to load the sample set. So it can be desired to not convert them to have a sample set needing less RAM size. Such sample sets generally propose as well synthetized tremulants which are always converted to GO ODF.
HW to GO - place tremmed samples in separate ranks => if checked, tremmed samples are placed in separate ranks instead of being placed inside ranks of their corresponding untremmed samples. This option is significant only if tremmed samples conversion above is enabled. It can be wanted to have the possibility to not load these ranks later in the organ settings of GrandOrgue.
HW to GO - convert unused ranks => if checked, the ranks of the HW sample set which are not used by the stops of the built GO ODF are converted all the same in the GO ODF. They can be then linked manually to stops if it is desired.

Pipes pitch correction :
If some notes of the converted ODF are not played at the expected pitch in GrandOrgue, try to fix it by enabling one of the two options below then convert again the HW ODF and test the converted ODF in GrandOrgue.
HW to GO - correct pipes pitch from samples file name => if checked, the MIDI note number defined in samples file name is used to apply if necessary a pitch tuning correction to some pipes.
HW to GO - correct pipes pitch from samples metadata => if checked, the MIDI note number defined in samples metadata is used to apply if necessary a pitch tuning correction to some pipes. This method can increase the conversion time as the metadata of each sample file are decoded, so this option should be used after the first one (from file name) if it does not fix the observed pipes pitch issues.

Drag & drop
------------------
A section name can be dragged from the sections list or tree and dropped onto another section name of the sections list or tree. The mouse cursor indicates dynamically if the drop is possible or not.
If a section name is dropped onto a same type section name it is moved before it (if it has a higher section number) or after it (if it has a lower section number).
If a section name is dropped onto a section which can be its parent section, it is moved as child of this parent section. If the Control key is pressed at the same time, the dragged section is copied under the parent section instead of moved. This is possible only with the following section types : Coupler, Enclosure, PanelElement, PanelImage, Rank, Stop, Switch, Tremulant.

An ODF is a text file in ISO-8859-1 encoding. The standard extension is .organ. As an alternative, the file can be encoded in UTF-8 if it starts with the appropriate byte order marker.
It is composed of several sections, each one being organized like this :
[Section name]  ; comment
; comment line anywhere in the section
attribute1=value1  ; comment
attribute2=value2

Empty lines are ignored.
The text is case sensitive for sections name and attributes.
Each section name must be defined only once in the whole ODF.
Each attribute must be defined only once in his section.

>> Hauptwerk sample sets
This tool permits as well to open the ODF of a Hauptwerk sample set (not encrypted, not dongle protected, located in the folder OrganDefinitions of the sample set package, extension .Organ_Hauptwerk_xml or .xml) and to generate from it a GrandOrgue ODF permitting to play this sample set with GrandOrgue (GO ODF located in the same folder as the HW ODF). None file of the Hauptwerk sample set is modified.
A Hauptwerk ODF having more numerous and complex settings than a GrandOrgue ODF, the organ played with GrandOrgue will not have necessarily the same sound quality and control possibilities as it can have with Hauptwerk.
The generated GO ODF does not permit to apply a different temperament than the native one of the organ.

Please do this operation only with a free Hauptwerk sample set or a not-free sample set that you have duly paid for, and if the editor of this sample set does not preclude its use outside Hauptwerk.

In case of bugs observed with this tool, or errors generated by this tool when converting a Hauptwerk ODF to a GrandOrgue ODF, please open an issue in the github project GrandOrgue/OdfEdit.

>> Sections names summary
Available sections names (999 stands for a 3-digits placeholder, it must be higher than 0, it can be equal to 0 for Manual and Panel only) :
[ Organ ] : the general description of the instrument (and the main panel for old panel format)
[ Coupler999 ] : the means to apply key press of a manual to key of another manual
[ Divisional999 ] : a combinaisons memory applied at manual level
[ DivisionalCoupler999 ] : the means to apply divisional selection of a manual to divisional of another manual
[ Enclosure999 ] : a swell pedal which has effect on a wind-chest
[ General999 ] : a combinaisons memory applied at organ level
[ Manual999 ] : a manual or a pedal
[ Panel999 ] : a window containing graphical user interface (GUI) elements
[ Panel999Image999 ] : an image to display in a panel (additional panel if old panel format)
[ Rank999 ] : a group of pipes with similar sonic properties
[ Stop999 ] : the means to activate a selection of ranks
[ Switch999 ] : the means to toggle the state of couplers / stops / tremulants
[ Tremulant999 ] : the means to apply a tremulant effect to a wind-chest
[ WindchestGroup999 ] : a wind-chest on which ranks of pipes are placed

GUI sections names used with the NEW panel format only :
[ Panel999Element999 ] : an element (switch, stop, manual, label, general, setter, ...)

GUI sections names used with the OLD panel format only :
in the main panel :
[ Image999 ] : an image
[ Label999 ] : a label
[ ReversiblePiston999 ] : a piston which toggles between on and off at each push
[ SetterElement999 ] : an element to show/change a setting
in additional panels :
[ Panel999Coupler999 ] : a coupler
[ Panel999Divisional999 ] : a divisional
[ Panel999DivisionalCoupler999 ] : a divisional coupler
[ Panel999Enclosure999 ] : an enclosure
[ Panel999General999 ] : a general
[ Panel999Label999 ] : a label
[ Panel999ReversiblePiston999 ] : a reversible piston
[ Panel999SetterElement999 ] : a setter element
[ Panel999Stop999 ] : a stop
[ Panel999Switch999 ] : a switch
[ Panel999Tremulant999 ] : a tremulant

The NEW panel format is characterized by the presence of a Panel000 section (the main panel) which contains the attribute NumberOfGUIElements.
With the OLD panel format, the main panel is defined inside the Organ section (no Panel000 section is defined).

Each section can consist of a backend part representing the section, and its configuration (eg. list of sample file names) and multiple GUI representations.
Sections like stops only displayed on a non-main panel need an invisible definition for the backend part on the main panel too.

Sections which count the number of other sections are :
[ Organ ]
NumberOfDivisionalCouplers -> DivisionalCoupler999
NumberOfEnclosures -> Enclosure999
NumberOfGenerals -> General999
NumberOfManuals -> Manual999
NumberOfPanels -> Panel999
NumberOfRanks -> Rank999
NumberOfSwitches ->	Switch999
NumberOfTremulants -> Tremulant999
NumberOfWindchestGroups -> WindchestGroup999
Old panel format (for the main panel) :
    NumberOfImages -> Image999
    NumberOfLabels -> Label999
    NumberOfReversiblePistons -> ReversiblePiston999
    NumberOfSetterElements -> SetterElement999

[ Manual999 ]
NumberOfCouplers -> Coupler999
NumberOfDivisionals -> Divisional999
NumberOfStops -> Stop999
NumberOfSwitches ->	Switch999
NumberOfTremulants -> Tremulant999

[ Panel999 ]
New panel format :
    NumberOfGUIElements -> Panel999Element999
New and old panel formats :
    NumberOfImages -> Panel999Image999
Old panel format :
    NumberOfCouplers ->	Panel999Coupler999
    NumberOfDivisionals -> Panel999Divisional999
    NumberOfDivisionalCouplers -> Panel999DivisionalCoupler999
    NumberOfEnclosures -> Panel999Enclosure999
    NumberOfGenerals -> Panel999General999
    NumberOfLabels -> Panel999Label999
    NumberOfReversiblePistons -> Panel999ReversiblePiston999
    NumberOfSetterElements -> Panel999SetterElement999
    NumberOfStops -> Panel999Stop999
    NumberOfSwitches -> Panel999Switch999
    NumberOfTremulants -> Panel999Tremulant999

The structure of ODF sections hierarchy is (new panel format) :
    Organ
            General...
            Manual...
                    Coupler...
                            Switch...
                    Divisional...
                    DivisionalCoupler...
                    Stop...
                            Rank...
                            Switch...
                    Switch...
                    Tremulant...
                            Switch...
            Panel...
                    Panel...Element...
                            Switch...
                    Panel...Image...
            WindchestGroup...
                    Enclosure...
                    Rank...
                    Stop...
                            Switch...
                    Tremulant...
                            Switch...

Minimum mandatory sections to define in an ODF are :
    Organ
            Manual001
                    Stop001
            Panel000 (new panel format)
            WindchestGroup001
                    Stop001


>> Attributes value types

Boolean : Y for "true", N for "false"

Color : BLACK, BLUE, DARK BLUE, GREEN, DARK GREEN, CYAN, DARK CYAN, RED, DARK RED, MAGENTA, DARK MAGENTA, YELLOW, DARK YELLOW, LIGHT GREY, DARK GREY, WHITE, BROWN. Or HTML syntax #RRGGBB

Font size : SMALL, NORMAL, LARGE or an integer number between 1 and 50

Panel size : SMALL, MEDIUM, MEDIUM LARGE, LARGE or an integer number between 100 and 32000

Image format : bmp, gif, jpg, ico, png

floating point numbers : -?[0-9]+(.[0-9]*)? means optional minus sign, followed by at least one digit. The decimal separator is a point.

"samples" counts : number of samples from the start of the WAV file. One sample includes the values of all channels, eg: for a stereo WAV file at 44.1 kHz, 1 second is equivalent to 44100 samples.

File paths are relative to the location of the ODF. The directory separator must be \ (and can be / from GrandOrgue v3.10.0-1). The paths should be considered case sensitive.


>> Sections/objects definition and their attributes

[Organ]
This object describes the whole organ.
For the old panel format, it includes the main panel, therefore the section includes all display metrics attributes.
The new panel format separates the display metrics of the main panel into an object named Panel000.

REQUIRED ATTRIBUTES :
ChurchName=(string, required) Name of the organ/church. This string should be unique, as setting files for organs with the same ChurchName are considered compatible. GrandOrgue will not load a settings file if the ChurchName does not match.
ChurchAddress=(string, required) informational text displayed in the property dialog.
HasPedals=(boolean, required) Determines if the pedal, which is defined as section Manual000, is present.

NumberOfDivisionalCouplers=(integer 0-8, required) number of divisional couplers. The details are in a section called DivisionalCoupler999.
NumberOfEnclosures=(integer 0-999, required) number of enclosures. The details of each enclosure are contained in a section called Enclosure999.
NumberOfGenerals=(integer 0-99, required) number of generals. The details are in a section called General999.
NumberOfManuals=(integer 1-99, required) number of manuals. It does not include the pedal keyboard. The manual information for each manual is available in sections called Manual999. 999 is a number defining each manual, starting with 001.
NumberOfPanels=(integer 0-100, required) number of panels in addition to the  main panel. The details are in a section called Panel999.
NumberOfReversiblePistons=(integer 0-32, required) number of reversible pistons. The details of each reversible piston are in a section called ReversiblePiston999.
NumberOfTremulants=(integer 0-999, required) number of tremulants. The details of each tremulant are contained in a section called Tremulant999.
NumberOfWindchestGroups=(integer 1-999, required) number of windchests. The details of each windchest are in a section called WindchestGroup999.

DivisionalsStoreIntermanualCouplers=(boolean, required) determines if divisionals store/change the state of associated intermanual couplers.
DivisionalsStoreIntramanualCouplers=(boolean, required) determines if divisionals store/change the state of associated intramanual couplers.
DivisionalsStoreTremulants=(boolean, required) determines if divisionals store/change the state of associated tremulants.
GeneralsStoreDivisionalCouplers=(boolean, required) determines if divisionals store/change the state of divisional couplers.

OPTIONAL ATTRIBUTES :
OrganBuilder=(string, not required) informational text displayed in the property dialog.
OrganBuildDate=(string, not required) informational text displayed in the property dialog.
OrganComments=(string, not required) informational text displayed in the property dialog.
RecordingDetails=(string, not required) informational text displayed in the property dialog.
InfoFilename=(string, not required) relative path to an html file with more information about the organ. This setting is currently NOT supported for organ packages.

NumberOfImages=(integer 0-999, default: 0) Number of images on the panel. The section of the label GUI definitions are called Image999. This setting is NOT supported for the new panel format.
NumberOfLabels=(integer 0-999, default: 0) Number of labels on the panel. The section for each label GUI definition is called Label999. This setting is NOT supported for the new panel format.
NumberOfRanks=(integer 0-999, default: 0) number of ranks. The details are in a section called Rank999.
NumberOfSetterElements=(integer 0-999, default: 0) Number of setter elements on the panel. The section of the GUI definitions are called SetterElement999. This setting is NOT supported for the new panel format.
NumberOfSwitches=(integer 0-999, default: 0) number of switches. The details are in a section called Switch999.

CombinationsStoreNonDisplayedDrawstops=(boolean, default: false) determines, if the state of read-only objects (that is calculated based on the state of another objects) is stored in divisionals, generals and the setter.

AmplitudeLevel=(float 0-1000, default: 100) Linear amplitude scale factor applied to the whole organ. 100 means no change.
Gain=(float -120 - 40, default: 0) Amplitude scale factor in dB applied to the whole organ. 0 means no change.
PitchTuning=(float -1800-1800, default: 0) Retune the whole organ the specified number of cents.
PitchCorrection=(float -1800 - 1800, default: 0) Correction factor in cent for the pitch of the whole organ. This setting is used for retuning to other temperaments.
TrackerDelay=(integer 0 - 10000, default: 0) Delay introduced by the tracker applied to the whole organ.
Percussive=(boolean, default: false) If true, the samples are played as is (without any loop/release handling).
HasIndependentRelease=(boolean, default false). If true, releases are played independently of the attacks. If HasIndependentRelease is true then Percussive must also be set to true.

+ display metrics attributes of a panel if old panel format, see [ Panel999 ]


[Button]
Button object is included inside a drawstop, setter element or push button object. These objects share the following common attributes.

REQUIRED ATTRIBUTES :
None

OPTIONAL ATTRIBUTES :
Name=(string, required) Name of the object. The name may be presented to the user in lists too, therefore it should be descriptive. If a GUI representation requires a shorter name, please override this value locally.
ShortcutKey=(integer 0-255, default: 0) 0 means no shortcut, else it specifies the key code of the shortcut key (see the shortcuts list in the GrandOrgue help).
StopControlMIDIKeyNumber=(integer 0-127, default: no MIDI event specified) Only used for building the initial configuration during the first load - provided just for HW1 compatibility. DEPRECATED.
MIDIProgramChangeNumber=(integer 1-128, default: no MIDI event specified) Only used for building the initial configuration during the first load - provided just for HW1 compatibility. DEPRECATED.

Displayed=(boolean, default: false) If true, the section also includes the GUI attributes for the main panel. Otherwise it is not displayed on the main panel.
DisplayInInvertedState=(boolean, default: false) If true, off is displayed as on and on as off.
DisplayAsPiston=(boolean, default: true for divisionals, generals and pistons, else false) True means to display as piston, false as drawstop
DispLabelColour=(color, default: Dark Red) Color for the label text.
DispLabelFontSize=(font size, default: normal) Size of the label font.
DispLabelFontName=(string, default: empty) Font for the text. Empty means use the control label font of the panel.
DispLabelText=(string, default: Name of the button) Content of the text label. You should edit it, if you need to display a shorter string on the label.
DispKeyLabelOnLeft=(boolean, default: true) If displayed as a piston and this attribute is false, move it a little bit left. Otherwise ignored.
DispImageNum=(integer, type dependent, default: see after) Builtin bitmap set to use. GrandOrgue has 6 for drawstops and 5 for pistons (see image below). The default is 3 (piston) or 4 (drawstops) for read-only buttons, otherwise the default is 1.
__ImageNumButton.png
DispButtonRow=(button row starting from 0, default: 1) If displayed as piston, it contains the button row according to the layout model. Otherwise ignored.
DispButtonCol=(button column starting from 1, default: 1) If displayed as piston, it contains the button column according to the layout model. Otherwise ignored.
DispDrawstopRow=(drawstop row, default: 1) If displayed as drawstop, it contains the drawstop row according to the layout model. Otherwise ignored.
DispDrawstopCol=(drawstop column, default: 1) If displayed as drawstop, it contains the drawstop column according to the layout model. Otherwise ignored.

ImageOn=(string, default: use internal bitmap according to DispImageNum) Specify the file name of an image to use as on bitmap. If the bitmap contains a mask for transparency, it will be used.
ImageOff=(string, default: use internal bitmap according to DispImageNum) Specify the file name of an image to use as off bitmap. If the bitmap contains a mask for transparency, it will be used. The size must match the on bitmap.
MaskOn=(string, default: empty) File name for a external mask for the on bitmap. If empty, no mask is added.
MaskOff=(string, default: value of MaskOn) File name for a external mask for the off bitmap. If empty, no mask is added.

PositionX=(integer 0 - panel width, default: according to layout model) Allow to override X position for button.
PositionY=(integer 0 - panel height, default: according to layout model) Allow to override Y position for button.
Width=(integer 0 - panel width, default: bitmap width) Width of the button. If larger than the bitmap, the bitmap is tiled.
Height=(integer 0 - panel height, default: bitmap height) Height of the button. If larger than the bitmap, the bitmap is tiled.
TileOffsetX=(integer 0 - bitmap width, default: 0) X position on the bitmap of the left pixel of the button.
TileOffsetY=(integer 0 - bitmap height, default: 0) Y position on the bitmap of the top pixel of the button.

MouseRectLeft=(integer 0 - Width, default: 0) relative X of left border of the mouse rectangle.
MouseRectTop=(integer 0 - Height, default: 0) relative Y of top border of the mouse rectangle.
MouseRectWidth=(integer 0 - Width, default: Width) width of the mouse rectangle.
MouseRectHeight=(integer 0 - Height, default: Width) height of the mouse rectangle.
MouseRadius=(integer 0 - max(MouseRectHeight, MouseRectWidth), default: max(MouseRectHeight, MouseRectWidth) / 2). If 0, the mouse events are captured inside the mouse rectangle. Otherwise they must be inside a circle of the specified size too.

TextRectLeft=(integer 0 - Width, default: 0) relative X of left border of the text rectangle.
TextRectTop=(integer 0 - Height, default: 0) relative Y of top border of the text rectangle.
TextRectWidth=(integer 0 - Width, default: bitmap width) width of the text rectangle.
TextRectHeight=(integer 0 - Height, default: Height) height of the text rectangle.
TextBreakWidth=(integer 0 - TextRectWidth, default: slightly smaller than TextRectWidth) If 0, no text is displayed. Otherwise the value specifies the maximum line length used for text breaking.

Inside the button, the on/off bitmap (depending on the button state) is tiled. If a text width is set, a text label is displayed on it. Mouse events are only captured inside the mouse rectangle.


[Coupler999]
Coupler is a drawstop object with the following additional attributes. It forwards key presses from one manual to other manuals/keys.

REQUIRED ATTRIBUTES :
UnisonOff=(boolean, required) If true, this coupler decouples the manual from the stops (turn it into a floating manual).
DestinationManual=(integer manual number, required if not a unison off coupler) manual to forward key presses to.
DestinationKeyshift=(integer -24 - 24, required if not a unison off coupler) specifies the keyboard shift between source and destination manual in terms of absolute MIDI note numbers

CoupleToSubsequentUnisonIntermanualCouplers=(boolean, required if not a unison off/melody/bass coupler) Triggers further inter-manual coupler with a destination key shift of zero.
CoupleToSubsequentUpwardIntermanualCouplers=(boolean, required if not a unison off/melody/bass coupler) Triggers further inter-manual coupler with a destination key shift greater than zero.
CoupleToSubsequentDownwardIntermanualCouplers=(boolean, required if not a unison off/melody/bass coupler) Trigger further inter-manual coupler with a destination key shift less than zero.
CoupleToSubsequentUpwardIntramanualCouplers=(boolean, required if not a unison off/melody/bass coupler) Triggers further intra-manual coupler with a destination key shift greater than zero.
CoupleToSubsequentDownwardIntramanualCouplers=(boolean, required if not a unison off/melody/bass coupler) Triggers further intra-manual coupler with a destination key shift less than zero.

OPTIONAL ATTRIBUTES :
CouplerType=(enumeration, default: Normal) Type of the coupler: Normal, Bass or Melody.
FirstMIDINoteNumber=(integer 0-127, default: 0) first MIDI note number to forward.
NumberOfKeys=(integer 0-127, default: 0) number of keys to forward starting with FirstMIDINoteNumber.

+ attributes of a drawstop, see [ DrawStop ]


[Divisional999]
Divisional is a push button object with the following additional attributes.

REQUIRED ATTRIBUTES :
NumberOfCouplers=(integer 0 - coupler count of the manual, required) Number of coupler states stored in this combination. The entries are called Coupler999.
NumberOfStops=(integer 0 - stop count of the manual, required) Number of stop states stored in this combination. The entries are called Stop999.
NumberOfTremulants=(integer 0 - tremulant count of the manual, required) Number of tremulant states stored in this combination. The entries are called Tremulant999.

Coupler999=(integer -999 - 999, required) Number of the coupler. If the value is negative, it is turned off, else turned on.
Stop999=(integer -manual stop count - manual stop count, required) Number of the stop. If the value is negative, it is turned off, else turned on.
Switch999=(integer -manual switch count - manual switch count, required) Number of the switch. If the value is negative, it is turned off, else it is turned on.
Tremulant999=(integer -manual tremulant count - manual tremulant count, required) Number of the tremulant. If the value is negative, it is turned off, else it is turned on.

OPTIONAL ATTRIBUTES :
Protected=(boolean, default: false) If true, the stored combination cannot be changed.
NumberOfSwitches=(integer 0 - switch count of the manual, default) Number of switch states stored in this combination. The entries are called Switch999.

+ attributes of a push button, see [ PushButton ]


[DivisionalCoupler999]
Divisional coupler is a drawstop object with the following additional attributes. If enabled, activating a divisional on one controlled manual will activate the corresponding divisional on all other manuals.

REQUIRED ATTRIBUTES :
BiDirectionalCoupling=(boolean, required) If false, the coupler only couples upward in the manual list of the coupler, else upward and downward.

NumberOfManuals=(integer 1 - manual count, required) Number of manuals affected by this coupler. The list entries are stored in Manual999 setting.
Manual999=(integer manual number, required) Manual affected by the coupler

+ attributes of a drawstop, see [ DrawStop ]


[DrawStop]
Drawstop is a button with toogle functions used for coupler, divisional coupler, stop, switch or tremulant, with the following additional non-GUI attributes.

REQUIRED ATTRIBUTES :
DefaultToEngaged=(boolean, required if Function is Input or not defined, else ignored) State of the button after loading.
Switch999=(integer 1 - switch count, required) Lists the input switches of the logical function of the drawstop. If the drawstop is a switch, it can only reference switches with a lower number. The number of this settings depends on the function.

OPTIONAL ATTRIBUTES :
Function=(enumeration, default: Input) Logical function of the drawstop. If the value is Input, it is a normal user controllable drawstop and has no input switches. Not has one only input and negates the state of the input switch. And, Xor, Nand, Nor as well as Or has a variable number of inputs.
SwitchCount=(integer 1 - switch count, required if the logical function allows a variable number number of inputs) Contains the number of input ports. Switch999 contains the referenced switches.
GCState=(integer -1 - 1, default: implementation defined) State of the button after pressing GC. -1 means no change, 0 off and 1 on.
StoreInDivisional=(boolean, default: dependent on various settings) Determines, if the button should be stored in divisionals without FULL.
StoreInGeneral=(boolean, default: dependent on various settings) Determines, if the button should be stored in generals without FULL.

+ attributes of a button, see [ Button ]


[Enclosure999]
Enclosure is a swell pedal. It consists of non-gui attributes describing its function. If it is displayed, it contains additional GUI attributes. Best practise is to specify enclosures in natural layout order (leftmost first) and give them incremental values of MIDIInputNumber to make initial configurations easy for the user.

OPTIONAL ATTRIBUTES :
Name=(string) Name of the control
AmpMinimumLevel=(integer 0-100, required) Minimum volume, if the enclosure is closed.
MIDIInputNumber=(integer 0 - 200, default: 0) This number is used while building the initial MIDI configuration to map the enclosure object to one MIDI device the user can specify for the respective enclosure. A value of 0 means no association, 1 means enclosure 1, 2 is enclosure 2 etc. Please note, that the GUI only allows the association of the first few enclosures.
Displayed=(boolean, default: false for the new panel format, otherwise true) If true, the enclosure is visible on the main panel.

GUI attributes (are all OPTIONAL) :
DispLabelColour=(color, default: Dark Red) Color for the label text.
DispLabelFontSize=(font size, default: 7) Size of the label font.
DispLabelFontName=(string, default: empty) Font for the text. Empty means use the default font.
DispLabelText=(string, default: Name of the button) Content of the text label. You should edit it if you need to display a shorter string.

EnclosureStyle=(integer 1 - 4, default: implementation dependent) Select a built-in enclosure style (see image below).
__EnclosureStyle.png

BitmapCount=(integer 1 - 128, default: implementation dependent) Number of bitmaps/steps.
Bitmap999=(string, default: use internal bitmap) Specify the file name of an image to use as on bitmap for position 999. If the bitmap contains a mask for transparency, it will be used. All bitmaps must have the same size.
Mask999=(string, default: empty) File name for a external mask for bitmap 999. If empty, no mask is added.

PositionX=(integer 0 - panel width, default: according to layout model) Allow to override X position for enclosure.
PositionY=(integer 0 - panel height, default: according to layout model) Allow to override Y position for enclosure.
Width=(integer 0 - panel width, default: bitmap width) Width of the enclosure. If larger than the bitmap, the bitmap is tiled.
Height=(integer 0 - panel height, default: bitmap height) Height of the enclosure. If larger than the bitmap, the bitmap is tiled.
TileOffsetX=(integer 0 - bitmap width, default: 0) X position on the bitmap of the left pixel of the enclosure.
TileOffsetY=(integer 0 - bitmap height, default: 0) Y position on the bitmap of the top pixel of the enclosure.

MouseRectLeft=(integer 0 - Width, default: 0) relative X of left border of the mouse rectangle.
MouseRectTop=(integer 0 - Height, default: implementation dependent) relative Y of top border of the mouse rectangle.
MouseRectWidth=(integer 0 - Width, default: Width) width of the mouse rectangle.
MouseRectHeight=(integer 0 - Height, default: implementation dependent) height of the mouse rectangle.
MouseAxisStart=(integer 0 - MouseRectHeight, default: implementation dependent) top Y coordinate of the axis.
MouseAxisEnd=(integer MouseAxisStart - MouseRectHeight, default: implementation dependent) bottom Y coordinate of the axis.

TextRectLeft=(integer 0 - Width, default: 0) relative X of left border of the text rectangle.
TextRectTop=(integer 0 - Height, default: implementation dependent) relative Y of top border of the text rectangle.
TextRectWidth=(integer 0 - Width, default: Width) width of the text rectangle.
TextRectHeight=(integer 0 - Height, default: implementation dependent) height of the text rectangle.
TextBreakWidth=(integer 0 - text rectangle width, default: TextWidth) If 0, no text is displayed. Otherwise the value specifies the maximum line length used for text breaking.


[General999]
General is a push button with the following additional combination data store attributes (used to store one preset general combination).

REQUIRED ATTRIBUTES :
NumberOfCouplers=(integer 0 - number of coupler defined in the ODF, required) Number of coupler states stored in this combination. The entries are called CouplerNumber999 and CouplerManual999.
NumberOfDivisionalCouplers=(integer 0 - divisional coupler count, required if storing of divisional coupler in the generals is enabled) Number of divisional coupler state stored in this combination. The entries are called DivisionalCouplerNumber999.
NumberOfStops=(integer 0 - number of stops defined in the ODF, required) Number of stop states stored in this combination. The entries are called StopNumber999 and StopManual999.
NumberOfTremulants=(integer 0 - tremulant count, required) Number of tremulant states stored in this combination. The entries are called TremulantNumber999.

CouplerNumber999=(integer -999 - 999, required) Number of the coupler on the manual. If the value is negative, it is turned off, else it is turned on.
CouplerManual999=(integer manual number, required) Number of the manual, which contains the coupler.
DivisionalCouplerNumber999=(integer -divisional coupler count -divisional coupler count, required) Number of the divisional coupler. If the value is negative, it is turned off, else it is turned on.
StopNumber999=(integer -manual stop count - manual stop count, required) Number of the stop on the manual. If the value is negative, it is turned off, else turned on.
StopManual999=(integer manual number, required) Number of the manual, which contains the stop.
SwitchNumber999=(integer -switch count - switch count, required) Number of the switch. If the value is negative, it is turned off, else it is turned on.
TremulantNumber999=(integer -tremulant count - tremulant count, required) Number of the tremulant. If the value is negative, it is turned off, else turned on.

OPTIONAL ATTRIBUTES :
NumberOfSwitches=(integer 0 - switch count, default: 0) Number of switch states stored in this combination. The entries are called SwitchNumber999.
Protected=(boolean, default: false) If true, the stored combination cannot be changed.

+ attributes of a push button, see [ PushButton ]


[Image999]
Image allows to display an image on a panel. It tiles the image if it is bigger than the image object size.

REQUIRED ATTRIBUTES :
Image=(string, required) Specifies the file name of an image to use as a bitmap. If the bitmap contains a mask for transparency, it will be used.

OPTIONAL ATTRIBUTES :
Mask=(string, default: empty) File name for a external mask for the bitmap. If empty, no mask is added.
PositionX=(integer 0 - panel width, default: 0) X coordinate of the left side. to override X position for button.
PositionY=(integer 0 - panel height, default: 0) Y coordinate of the left side.
Width=(integer 0 - panel width, default: bitmap width) Width of the button. If larger than the bitmap, the bitmap is tiled.
Height=(integer 0 - panel height, default: bitmap height) Height of the button. If larger than the bitmap, the bitmap is tiled.
TileOffsetX=(integer 0 - bitmap width, default: 0) X position on the bitmap of the left pixel of the button.
TileOffsetY=(integer 0 - bitmap width, default: 0) Y position on the bitmap of the top pixel of the button.


[Label999]
Label allows to display a text label on a panel. The background is an image. It is tiled if the image is smaller than the label area.

OPTIONAL ATTRIBUTES :
Name=(string, default: empty) The text to display on this object
FreeXPlacement=(boolean, default: true) True means that the X position is determined by DispXpos, else by DispDrawstopCol and DispSpanDrawstopColToRight.
FreeYPlacement=(boolean, default: true) True means that the Y position is determined by DispYpos, else by DispAtTopOfDrawstopCol.
DispXpos=(integer 0-panel width, default: 0) absolute X position.
DispYpos=(integer 0-panel height, default: 0) absolute Y position.
DispAtTopOfDrawstopCol=(boolean, required if FreeYPlacement is false) If true, the label is displayed above the drawstop, else below.
DispDrawstopCol=(integer 1- number of drawstop columns, required if FreeXPlacement is false) Position label at the specified drawstop column.
DispSpanDrawstopColToRight=(boolean, required if FreeXPlacement is false) If true, move label half of the drawstop to the right.
DispLabelColour=(color, default: black) Color for the label text.
DispLabelFontSize=(font size, default: normal) Size of the label font.
DispLabelFontName=(string, default: empty) Font for the text. Empty means use the group label font of the panel.
DispImageNum=(integer 0-12, default: 1) Builtin bitmap set to use (see image below). 0 means no background image.
__ImageNumLabel.png

Image=(string, default: use internal bitmap according to DispImageNum) Specify the file name of an image to use as bitmap. If the bitmap contains a mask for transparency, it will be used.
Mask=(string, default: empty) File name for a external mask for the bitmap. If empty, no mask is added.

PositionX=(integer 0 - panel width, default: according to the definitions above) Allow to override X position for button.
PositionY=(integer 0 - panel height, default: according to defintions above) Allow to override Y position for button.
Width=(integer 0 - panel width, default: bitmap width) Width of the button. If larger than the bitmap, the bitmap is tiled.
Height=(integer 0 - panel height, default: bitmap height) Height of the button. If larger than the bitmap, the bitmap is tiled.
TileOffsetX=(integer 0 - bitmap width, default: 0) X position on the bitmap of the left pixel of the button.
TileOffsetY=(integer 0 - bitmap height, default: 0) Y position on the bitmap of the top pixel of the button.

TextRectLeft=(integer 0 - Width, default: 0) relative X of left border of the text rectangle.
TextRectTop=(integer 0 - Height, default: 0) relative Y of top border of the text rectangle.
TextRectWidth=(integer 0 - Width, default: Width) width of the text rectangle.
TextRectHeight=(integer 0 - Height, default: Height) height of the text rectangle.
TextBreakWidth=(integer 0 - text rectangle width, default: Width) If 0, no text is displayed. Otherwise the value specifies the maximum line length used for text breaking.


[Manual999]
Manual is associated with a number of stops, tremulants, divisionals and couplers. The accessible range can be played via MIDI, the rest of the logical keys can only be triggered by (octave) couplers.
Best practise is to specify the visible manuals in the order of appearance, lowest first. Invisible manuals and those used for special effects should be specified after the visible ones.

REQUIRED ATTRIBUTES :
Name=(string, required) Name of the manual.
NumberOfLogicalKeys=(integer 1-192, required) Number of keys on this manual (including non-playable ones).
FirstAccessibleKeyLogicalKeyNumber=(integer 1 - NumberOfLogicalKeys, required) number of the first usable key.
FirstAccessibleKeyMIDINoteNumber=(integer 0 - 127, required) MIDI note number of the first MIDI accessible key.

NumberOfAccessibleKeys=(integer 0 - 85, required) number of MIDI accessible keys.
NumberOfCouplers=(integer 0-999, default: 0) Number of couplers associated with this manual. Starting with 1, for each coupler, there is a Coupler999 setting.
NumberOfDivisionals=(integer 0-999, default: 0) Number of divisionals associated with this manual. Starting with 1, for each divisional, there is a Divisional999 setting.
NumberOfStops=(integer 0-999, required) Number of stops associated with this manual. Starting with 1, for each stop, there is a Stop999 setting.
NumberOfSwitches=(integer 0 - number of switches, default: 0) Number of switches associated with this manual. Starting with 1, for each switch, there is a Switch999 setting.
NumberOfTremulants=(integer 0 - number of tremulants, default: 0) Number of tremulants associated with this manual. Starting with 1, for each tremulant, there is a Tremulant999 setting.

Coupler999=(integer, required) Number of the Coupler999 section containing the coupler details.
Divisional999=(integer, required) Number of the Divisional999 section containg the coupler details.
Stop999=(integer, required) Number of the Stop999 section containing the stop details.
Switch999=(integer, required) Number of the Switch999 section containg the switch details.
Tremulant999=(integer, required) Number of the Tremulant999 section containg the tremulant details.

OPTIONAL ATTRIBUTES :
MIDIKey000 - MIDIKey127=(integer 0-127, default: same MIDI key number) Allows to map the MIDI note in MIDIKey999 to a different number. This mapping is used by the default manual MIDI matching type - others may or may not use this mapping table.
MIDIInputNumber=(integer 0 - 200, default: 0) This number is used while building the initial MIDI configuration to map the manual object to what MIDI device the user has set for the respective pedal/manual. 0 means no association. 1 maps to pedal, 2 to first manual, 3 to second manual etc. NOTE: the GUI only allows the association of the first few manuals. Second touch manuals can be set to the same number as the main manual as the user then only has to configure the low velocity to make it work.
Displayed=(boolean, default: false) If true, the manual is visible on the main panel.

The various GUI manual attributes are specified for the different key types. They are named: C, Cis, D, Dis, E, F, Fis, G, Gis, A, Ais, B.
If it is the first key on the manual, it is prefixed with First. If it is the last key on the manual, it is prefixed with Last. So valid values are eg. Gis, FirstDis, LastAis.
In the following, these values will be marked as KEYTYPE.

If the manual is displayed, it contains the following OPTIONAL GUI attributes:
PositionX=(integer 0 - panel width, default: according to layout model) Allow to override X position for manual.
PositionY=(integer 0 - panel height, default: according to layout model) Allow to override Y position for manual.

ImageOn_KEYTYPE=(string, default: implementation dependent bitmap) Bitmap for the specified key type, if the key is pressed. The bitmap may contain a mask.
ImageOff_KEYTYPE=(string, default: implementation dependent bitmap) Bitmap for the specified key type, if the key is not pressed. The bitmap may contain a mask.
MaskOn_KEYTYPE=(string, default: empty string) Mask for the corresponding On bitmap. If empty, no external mask is loaded.
MaskOff_KEYTYPE=(string, default: corresponding on mask) Mask for the corresponding Off bitmap. If empty, no external mask is loaded.
Width_KEYTYPE=(integer 0 - 500, default: implementation dependent) This value is added to the x position of the current key to determine the position of the next key.
Offset_KEYTYPE=(integer -500 - 500, default: implementation dependent) This value can be used to adjust the display of the current key, eg. to place a sharp key overlapped with the previous key.
YOffset_KEYTYPE=(integer -500 - 500, default: 0) This value can be used to adjust the Y coordinate of the current key.

Key999ImageOn=(string, default: corresponding ImageOn_KEYTYPE) Allows to set the on bitmap for the 999 key.
Key999ImageOff=(string, default: corresponding ImageOff_KEYTYPE) Allows to set the off bitmap for the 999 key.
Key999MaskOn=(string, default: corresponding MaskOn_KEYTYPE) Allows to set the on mask for the 999 key.
Key999MaskOff=(string, default: corresponding MaskOff_KEYTYPE) Allows to set the off mask for the 999 key.
Key999Width=(integer 0 - 500, default: corresponding Width_KEYTYPE) Allows to set the width of the 999 key.
Key999Offset=(integer -500 - 500, default: corresponding Offset_KEYTYPE) This value is can be used to adjust the display of the 999 key, eg. to place a sharp key overlapped with the previous 999 key.
Key999YOffset=(integer -500 - 500, default: corresponding YOffset_KEYTYPE) This value is can be used to adjust the Y coordinate of the 999 key.
Key999MouseRectLeft=(integer 0 - key bitmap width - 1 , default: 0) relative X of left border of the mouse rectangle.
Key999MouseRectTop=(integer 0 - key bitmap height - 1, default: 0) relative Y of top border of the mouse rectangle.
Key999MouseRectWidth=(integer 0 - key bitmap width, default: key bitmap width) width of the mouse rectangle.
Key999MouseRectHeight=(integer 0 - key bitmap height, default: key bitmap height) height of the mouse rectangle.

DispKeyColourInverted=(boolean, default: false) True means, the black keys are drawn in a light color while the white keys are drawn in a dark color.
DispKeyColourWooden=(boolean, default: false) True means, that a wood background is used for the keys.
DispImageNum=(integer 1 - 2, default: 1) determines which set of builtin bitmaps is used for displaying the keys.
DisplayFirstNote=(integer 0 - 127, default: FirstAccessibleKeyMIDINoteNumber) Display the first key as the following note.

DisplayKeys=(integer 1 - NumberOfAccessibleKeys, default: NumberOfAccessibleKeys) number of keys to display.
DisplayKey999=(integer 0 - 127, default: FirstAccessibleKeyMIDINoteNumber + 999) The number in the key (999) is between 1 and DisplayKeys. It contains the midi number of the backend key, that is connected to this GUI key.
DisplayKey999Note=(integer 0 - 127, default: FirstAccessibleKeyMIDINoteNumber + 999) The number in the key (999) is between 1 and DisplayKeys. It contains the midi number of the displayed frontend GUI key.


[Panel999]
Panel000 is the main panel with new display format. Additional panels start with number 001. It includes the display metrics.
The layout of any panel is described by a layout model (see the below image). The available space is split vertically into three columns.
The left and the right columns contain drawstops laid out via a mesh.
The middle row is vertically divided:
- At the bottom, the pedal and its buttons are placed (if present).
- Above, an extra row of buttons may follow.
- The next row contains the enclosures.
- Then all manuals with their associated buttons follow.
- The two rows are a block of buttons and pistons.
The exact order can be specified via an attribute.

REQUIRED ATTRIBUTES (new panel format) :
Name=(string, required for non-main panels) Name of the panel.
HasPedals=(boolean, required) the panel includes a keyboard displayed as pedal.
NumberOfGUIElements=(integer 0-999, required for the main panel with new panel format, default 0 for any other panel) Number of elements on the panel. The section of the GUI elements are called Panel999Element999.

OPTIONAL ATTRIBUTES (new panel format) :
Group=(string, default: empty, only for non-main panels) If not empty, place it in the submenu with the specified name, else directly in the panel menu.
NumberOfImages=(integer 0-999, default: 0) Number of images on the panel. The section of the label GUI definitions are called Panel999Image999.

REQUIRED DISPLAY METRICS ATTRIBUTES (both new and old panel formats) :
DispScreenSizeHoriz=(panel size, required) Height of the panel.
DispScreenSizeVert=(panel size, required) Width of the panel.

DispDrawstopBackgroundImageNum=(bitmap number, required) Shown as 01 in the image below.
DispDrawstopInsetBackgroundImageNum=(bitmap number, required) Background of the drawstops columns pairs when DispPairDrawstopCols=Y
DispConsoleBackgroundImageNum=(bitmap number, required) Shown as 05 in the image below.
DispKeyHorizBackgroundImageNum=(bitmap number, required) Shown as 13 in the image below.
DispKeyVertBackgroundImageNum=(bitmap number, required) Shown as 20 in the image below.
__BackgroundRegion.png
Possible bitmap numbers are :
__BitmapNum.png

DispControlLabelFont=(string, required) Name of the font for button labels.
DispShortcutKeyLabelFont=(string, required) Name of the font for keyboard labels.
DispShortcutKeyLabelColour=(color, required) Color for shortcut labels
DispGroupLabelFont=(string, required) Font name for labels.

DispDrawstopCols=(integer 2-12, required) Number of drawstop columns. Must be even. NOTE: If you want more than 12 drawstop columns, you must use absolute positioning.
DispDrawstopRows=(integer 1-20, required) Number of drawstop rows. NOTE: If you want more than 20 drawstop rows you must use absolute positioning.
DispDrawstopColsOffset=(boolean, required) If true, each second row of drawstops on the left/right is displayed vertically shifted.
DispPairDrawstopCols=(boolean, required) Group two drawstop rows together. Number of drawstop rows must be divisible by 4.
DispExtraDrawstopRows=(integer 0-99, required) Number of drawstop rows in the center block. The row numbers start with 100.
DispExtraDrawstopCols=(integer 0 - 40, required) Number of drawstop columns in the center block.
DispButtonCols=(integer 1-32, required) Number of columns for displaying pistons in the center block.
DispExtraButtonRows=(integer 0-99, required) Number of rows for displaying extra pistons in the center block. The row numbers start with 100.
DispExtraPedalButtonRow=(boolean, required) Display an extra piston row with row number 9.
DispButtonsAboveManuals=(boolean, required) Display the pistons associated with the manual above (true) or below (false) the manual.
DispExtraDrawstopRowsAboveExtraButtonRows=(boolean, required) Display extra drawstop block above or below the extra piston block.

DispTrimAboveManuals=(boolean, required)
DispTrimBelowManuals=(boolean, required)
DispTrimAboveExtraRows=(boolean, required)

OPTIONAL DISPLAY METRICS ATTRIBUTES (both new and old panel formats) :
DispDrawstopWidth=(integer 1-150, default: 78) Drawstop width used for layout calculation.
DispDrawstopHeight=(integer 1-150, default: 69) Drawstop height used for layout calculation.
DispDrawstopOuterColOffsetUp=(boolean, required if DispDrawstopColsOffset is true) Determines if second row is shifted up or down.
DispPistonWidth=(integer 1-150, default: 44) Piston width used for layout calculation.
DispPistonHeight=(integer 1-150, default: 40) Piston height used for layout calculation.
DispEnclosureWidth=(integer 1-150, default: 52) Enclosure width used for layout calculation.
DispEnclosureHeight=(integer 1-150, default: 63) Enclosure width used for layout calculation.
DispPedalHeight=(integer 1-500, default: 40) Pedal height used for layout calculation.
DispPedalKeyWidth=(integer 1-500, default: 7) Width of one pedal key used for layout calculation.
DispExtraPedalButtonRowOffset=(boolean, required if DispExtraPedalButtonRow is true) Move extra pistons row slightly to the left.
DispExtraPedalButtonRowOffsetRight=(boolean, required if DispExtraPedalButtonRow is true) Move extra pistons row slightly to the right.
DispManualHeight=(integer 1-500, default: 32) Manual height used for layout calculation.
DispManualKeyWidth=(integer 1-500, default: 12) Width of one manual key used for layout calculation.

REQUIRED ATTRIBUTES (old panel format) :
Name=(string, required) Name of the panel.
HasPedals=(boolean, required) Includes a manual displayed as pedal.

NumberOfCouplers=(integer 0-999, required) Number of couplers on the panel. The section of the couplers GUI definitions are called Panel999Coupler999.
NumberOfDivisionals=(integer 0-999, required) Number of divisionals on the panel. The section of the divisionals GUI definitions are called Panel999Divisional999.
NumberOfDivisionalCouplers=(integer 0 - number of defined divisional couplers, required) Number of divisional couplers on the panel. The section of the divisional coupler GUI definitions are called Panel999DivisionalCoupler999.
NumberOfEnclosures=(integer 0 - number of defined enclosures, required) Number of enclosures on the panel. The section of the enclosures GUI definitions are called Panel999Enclosure999.
NumberOfGenerals=(integer 0 - number of defined generals, required) Number of generals on the panel. The section of the generals GUI definitions are called Panel999General999.
NumberOfImages=(integer 0-999, required) Number of images on the panel. The section of the image GUI definitions are called Panel999Image999.
NumberOfLabels=(integer 0-999, required) Number of labels on the panel. The section of the label GUI definitions are called Panel999Label999.
NumberOfManuals=(integer 0 - number of defined manuals) number of manuals to display on this panel.
NumberOfReversiblePistons=(integer 0 - number of defined reversible pistons, required) Number of reversible pistons on the panel. The section of the reversible pistons GUI definitions are called Panel999ReversiblePiston999.
NumberOfStops=(integer 0-999, required) Number of stops on the panel. The section of the stops GUI definitions are called Panel999Stop999.
NumberOfTremulants=(integer 0 - number of defined tremulants, required) Number of tremulant on the panel. The section of the tremulants GUI definitions are called Panel999Tremulant999.

Coupler999=(valid coupler number, required) Reference to the divisional on the main panel.
Coupler999Manual=(valid manual number, required) Reference to the manual of the coupler on the main panel.
Divisional999=(valid divisional number, required) Reference to the divisional on the main panel.
Divisional999Manual=(valid manual number, required) Reference to the manual of the divisional on the main panel.
DivisionalCoupler999=(valid divisional coupler number, required) Reference to the divisional coupler on the main panel.
Enclosure999=(valid enclosure number, required) Reference to the enclosure on the main panel.
General999=(valid general number, required) Reference to the general on the main panel.
Manual999=(valid manual number, required) Number of the manual to use a specified manual on the panel.
ReversiblePiston999=(valid reversible piston number, required) Reference to the reversible piston on the main panel.
Stop999=(valid stop number, required) Reference to the stop on the main panel.
Stop999Manual=(valid manual number, required) Reference to the manual of the stop on the main panel.
Switch999=(valid switch number, required) Reference to the switch on the main panel.
Tremulant999=(valid tremulant number, required) Reference to the tremulant on the main panel.

OPTIONAL ATTRIBUTES (old panel format) :
Group=(string, default: empty) If not empty, place it in the submenu with the specified name, else directly in the panel menu.
NumberOfSetterElements=(integer 0-999, default: 0) Number of setter elements on the panel. The section of the GUI definitions are called Panel999SetterElement999.
NumberOfSwitches=(integer 0 - number of defined switches, default: 0) Number of switches on the panel. The section of the switches GUI definitions are called Panel999Switch999.


[Panel999Element999]
It displays one GUI element in the Panel999. The Type attribute describes the function (one type per object section), the other attributes depend on the function as described below.

REQUIRED ATTRIBUTES :
Type=Coupler
Manual=(valid manual number, required) Number of the manual.
Coupler=(valid coupler number, required) Number of the coupler on the manual.
+ GUI attributes of a coupler, see [ Coupler999 ]

Type=Divisional
Manual=(valid manual number, required) Number of the manual.
Divisional=(valid divisional number, required) Number of the divisional on the manual.
+ GUI attributes of a divisional, see [ Divisional999 ]

Type=DivisionalCoupler
DivisionalCoupler=(valid divisional coupler number, required) Number of the divisional coupler.
+ GUI attributes of a divisional coupler, see [ DivisionalCoupler999 ]

Type=Enclosure
Enclosure=(valid enclosure number, required) Number of the enclosure.
+ GUI attributes of an enclosure, see [ Enclosure999 ]

Type=General
General=(valid general number, required) Number of the general.
+ GUI attributes of a general, see [ General999 ]

Type=Manual
Manual=(valid manual number, required) Number of the manual.
+ GUI attributes of a manual, see [ Manual999 ]

Type=ReversiblePiston
ReversiblePiston=(valid reversible piston number, required) Number of the reversible piston.
+ GUI attributes of a reversible piston, see [ ReversiblePiston999 ]

Type=Stop
Manual=(valid manual number, required) Number of the manual.
Stop=(valid stop number, required) Number of the stop on the manual.
+ GUI attributes of a stop, see [ Stop999 ]

Type=Switch
Switch=(valid switch number, required) Number of the switch.
+ GUI attributes of a switch, see [ Switch999 ]

Type=Tremulant
Tremulant=(valid tremulant number, required) Number of the tremulant.
+ GUI attributes of a tremulant, see [ Tremulant999 ]

Type=(a setter element, see the possible types in [ SetterElement999 ])


[Panel999Image999]
It displays one image in the Panel999. It tiles the image if it is bigger than image size.

attributes of an image, see [ Image999 ]


[Panel999xxxxx999]
It displays one element xxxxx in the Panel999 (old panel format, xxxxx can be Coupler, Divisional, DivisionalCoupler, Enclosure, General, Label, ReversiblePiston, SetterElement, Stop, Switch or Tremulant).

attributes of a xxxxx, see [xxxxx999]


[Piston]
Piston is a push button which triggers other elements.

REQUIRED ATTRIBUTES :
ObjecType=(string, required) Type of the element to trigger. Value can be STOP, COUPLER, SWITCH or TREMULANT.
ManualNumber=(integer first manual index - last manual index, required for stops and coupler) The manual, to which the referenced object belongs.
ObjectNumber=(integer, required) Determines the number of the object. Depending on the object it must be a valid stop/coupler/switch number on the referenced manual or a valid global tremulant number.

+ attributes of a push button, see [ PushButton ]


[PushButton]
Push button is a button without any state, used in Divisional, General or Piston objects. It is displayed as a piston.

attributes of a button, see [ Button ]


[Rank999]
Rank represents a row of pipes. It can either be part of a stop section or appear in its own section.
A rank section contains the attributes of each of its pipes too. The attributes of each pipe are prefixed with Pipe999 (number starting with 1) as described below.

REQUIRED ATTRIBUTES :
Name=(string, required) Name of the rank. The name may be presented to the user in lists too, therefore it should be descriptive.
WindchestGroup=(integer 1 - number of windchests, required) specify the windchest on which the pipes of the rank are placed.

NumberOfLogicalPipes=(integer 1-192, required) Number of pipes in this rank.
Pipe999=(string, required) Relative path to the sample WAV file of the first attack. It may be listed as REF:aa:bb:cc too. In that case, it means that this pipe is borrowed from manual aa, first rank of stop bb, the pipe cc. It may contain DUMMY, which defines a non-sounding placeholder.

OPTIONAL ATTRIBUTES :
FirstMidiNoteNumber=(integer 0 - 256, if the rank is part of a stop section, the default value is derived from the associated manuals. Otherwise required) MIDI note number of the first pipe.
AmplitudeLevel=(float 0-1000, default: 100) Linear amplitude scale factor applied to the whole rank. 100 means no change.
Gain=(float -120 - 40, default: 0) Amplitude scale factor in dB applied to the whole rank. 0 means no change.
Percussive=(boolean, default inherited from the Windchest section) If true, the samples are played as is (without any loop/release handling).
HasIndependentRelease=(boolean, default inherited from the Windchest section). If true, releases are played independently of the attacks. If HasIndependentRelease is true then Percussive must also be set to true.
PitchTuning=(float -1800-1800, default: 0) Retune the rank by the specified number of cents.
TrackerDelay=(integer 0 - 10000, default: 0) Delay introduced by the tracker for that rank.
HarmonicNumber=(float 1-1024, default: 8) Harmonic number (= 64 / rank size), eg. 2 2/3 => 64 / (2 2/3) = 24. The harmonic number is used determining alternative tunings.
PitchCorrection=(float -1800-1800, default: 0) Correction factor in cent for the pitch specified in the sample. This setting is used for retuning to other temperaments.
MinVelocityVolume=(float 0-1000, default: 100) Linear amplitude scale factor at low velocity applied to the whole rank. 100 means no change.
MaxVelocityVolume=(float 0-1000, default: 100) Linear amplitude scale factor at high velocity applied to the whole rank. 100 means no change.
AcceptsRetuning=(boolean, default: true) Determines if the rank will be retuned according to the current temperament. Retuning should be only disabled for sound effects.

Pipe999Percussive=(boolean, default: rank Percussive setting) If true, the samples are played as is (without any loop/release handling)
Pipe999HasIndependentRelease=(boolean, default: rank HasIndependentRelease setting). If true, releases are played independently of attacks in this pipe. If HasIndependentRelease is true then Pipe999Percussive must be also true and Pipe999ReleaseCount must be greater than 0.
Pipe999AmplitudeLevel=(float 0 - 1000, default: 100) Linear amplitude scale factor applied to the pipe (in addition to the organ/windchest/rank factor). 100 means no change.
Pipe999Gain=(float -120 - 40, default: 0) Amplitude scale factor in dB applied to the pipe (in addition to the organ/windchest/rank factor). 0 means no change.
Pipe999PitchTuning=(float -1800 - 1800, default: 0) Retune this pipe the specified number of cents (in addition to the organ/windchest/rank factor).
Pipe999TrackerDelay=(integer 0 - 10000, default: 0) Delay introduced by the tracker for that pipe.
Pipe999LoadRelease=(boolean, default: reverse of percussive setting) If true, the release part is loaded from the first attack sample.
Pipe999AttackVelocity=(integer 0 - 127, default: 0) minimum velocity to use this attack sample.
Pipe999MaxTimeSinceLastRelease=(integer -1 - 100000, default: -1) maximum time since the last release of the key to be able to use that attack. -1 means infinite.
Pipe999IsTremulant=(integer -1 - 1, default: -1) 1 means, that it is played, if the associated wave-based tremulant is on. 0 means, that it is played, if the associated wave-based tremulant is off. -1 means, that it is not affected by a wave-based tremulant.
Pipe999MaxKeyPressTime=(integer -1 - 100000, default: -1) Up to this time value in ms, the release sample is chosen. -1 means infinite.
Pipe999AttackStart=(integer 0 - 158760000, default: 0) Allows to override the start of the sample. This option is specified in samples.
Pipe999CuePoint=(integer -1 - 158760000, default: -1) Allows to override the cue point for the release. -1 means use from the wave file. This option is specified in samples.
Pipe999ReleaseEnd=(integer -1 - 158760000, default: -1) Allows to override the end of the release. -1 means play till the end of the wav. This option is specified in samples.
Pipe999HarmonicNumber=(float 1-1024, default: rank harmonic number) Harmonic number (= 64 / rank size), eg. 2 2/3 => 64 / (2 2/3) = 24.
Pipe999MIDIKeyNumber=(integer -1 - 127, default: -1) If -1, use pitch information from the Pipe999 sample, else override the information in the sample with this midi note number (Pipe999PitchCorrection is used for specifing the fraction). Specifying the midi note number also reset the pitch fraction in the sample to 0.
Pipe999PitchCorrection=(float -1800-1800, default: rank pitch correction) Correction factor in cent for the pitch specified in the sample. This setting is used for retuning to other temperaments.
Pipe999AcceptsRetuning=(boolean, default: rank setting) Determines if the pipe will be retuned according to the current temperament. Retuning should be only disabled for sound effects.
Pipe999WindchestGroup=(interger 1 - number of windchests, default: rank windchest) specify the windchest, on which this pipe is placed.
Pipe999MinVelocityVolume=(float 0-1000, default: corresponding rank setting) Linear amplitude scale factor at low velocity applied to the pipe. 100 means no change.
Pipe999MaxVelocityVolume=(float 0-1000, default: corresponding rank setting) Linear amplitude scale factor at high velocity applied to the pipe. 100 means no change.

Pipe999LoopCount=(integer 0 - 100, default: 0) Allows to override the loops in the WAV file. 0 means use loops from the wave file.
Pipe999Loop999Start=(integer 0 - 158760000, default: 0) Start sample of the loop. The value must be within the WAV file. This option is specified in samples.
Pipe999Loop999End=(integer Pipe999Loop999Start + 1 - 158760000, required if Pipe999LoopCount is not zero) End sample of the loop. The value must be within the WAV file. This option is specified in samples.

Pipe999AttackCount=(integer 0 - 100, default: 0) Number of additional attack samples.
Pipe999Attack999=(string, required) Relative path to the sample WAV file.
Pipe999Attack999LoadRelease=(boolean, default: reverse of percussive setting) If true, the release part is loaded.
Pipe999Attack999AttackVelocity=(integer 0 - 127, default: 0) minimum velocity to use this attack sample.
Pipe999Attack999MaxTimeSinceLastRelease=(integer -1 - 100000, default: -1) maximum time since the last release of the key to be able to use that attack. -1 means infinite.
Pipe999Attack999IsTremulant=(integer -1 - 1, default: -1) 1 means, that it is played, if the associated wave-based tremulant is on. 0 means, that it is played, if the associated wave-based tremulant is off. -1 means, that it not affected by a wave-based tremulant.
Pipe999Attack999MaxKeyPressTime=(integer -1 - 100000, default: -1) Up to this time value in ms, the release sample is choosen. -1 means infinite.
Pipe999Attack999AttackStart=(integer 0 - 158760000, default: 0) Allows to override the start of the sample. This option is specified in samples.
Pipe999Attack999CuePoint=(integer -1 - 158760000, default: -1) Allows to override the cue point for the release. -1 means use from the wave file. This option is specified in samples.
Pipe999Attack999ReleaseEnd=(integer -1 - 158760000, default: -1) Allows to override the end of the release. -1 means play till the end of the wav. This option is specified in samples.
Pipe999Attack999LoopCount=(integer 0 - 100, default: 0) Allows to override the loops in the WAV file. 0 means use loops from the wave file.
Pipe999Attack999Loop999Start=(integer 0 - 158760000, default: 0) Start sample of the loop. The value must be within the WAV file. This option is specified in samples.
Pipe999Attack999Loop999End=(integer Pipe999Attack999Loop999Start + 1 - 158760000, required if Pipe999LoopCount is not zero) End sample of the loop. The value must be within the WAV file. This option is specified in samples.

Pipe999ReleaseCount=(integer 0 - 100, default: 0) Number of additional release samples.
Pipe999Release999=(string, required) Relative path to the sample WAV file.
Pipe999Release999IsTremulant=(integer -1 - 1, default: -1) 1 means, that it is played, if the associated wave-based tremulant is on. 0 means, that it is played, if the associated wave-based tremulant is off. -1 means, that it not affected by a wave-based tremulant.
Pipe999Release999MaxKeyPressTime=(integer -1 - 100000, default: -1) Up to this time value in ms, the release sample is choosen. -1 means infinite.
Pipe999Release999CuePoint=(integer -1 - 158760000, default: -1) Allows to override the cue point for the release. -1 means use from the wave file.
Pipe999Release999ReleaseEnd=(integer -1 - 158760000, default: -1) Allows to override the end of the release. -1 means play till the end of the wav. This option is specified in samples.

Pipe999LoopCrossfadeLength=(integer 0 - 3000, default: 0) Crossfade length in ms between loop end and loop start for all loops loaded from the file specified in the Pipe999 parameter. A cross fade requires enough samples before the start of the loop. This parameter is not inherited by loops loaded from additional attack files specified in the Pipe999Attack999 parameters.
Pipe999Attack999LoopCrossfadeLength=(integer 0 - 3000, default: 0) Crossfade length in ms between loop end and loop start for all loops loaded from the file Pipe999Attack999. A cross fade requires enough samples before the start of the loop.

Pipe999ReleaseCrossfadeLength=(integer 0 - 3000, default: 0). 0 means automatic selection. Crossfade length in ms between loop and the release loaded from the file specified in the Pipe999 parameter or between different attack samples if Pipe999AttackCount > 0. This parameter is not inherited by the releases loaded from additional attack and release files specified in the Pipe999Attack999 and Pipe999Release999 parameters that should be specified with the Pipe999Attack999ReleaseCrossfadeLength and Pipe999Release999ReleaseCrossfadeLength parameters.
Pipe999Attack999ReleaseCrossfadeLength=(integer 0 - 3000, default: 0). 0 means automatic selection. Crossfade length in ms between loop and the release loaded from the file specified in the Pipe999Attack999 parameter.
Pipe999Release999ReleaseCrossfadeLength=(integer 0 - 3000, default: 0). 0 means automatic selection. Crossfade length in ms between loop and the release loaded from the file specified in the Pipe999Release999 parameter.


[ReversiblePiston999]
Not defined in the GrandOrgue help, unknown attributes, probably at least the one of a switch.


[SetterElement999]
It is possible to display various setter elements on the panels. The Type attribute (one type per object section) describes the function, the other attributes depend on the function.

REQUIRED ATTRIBUTES :
Type=CrescendoLabel (Represents a label with crescendo state, ie the current step that the crescendo pedal is at, from 1 to 32)
+ GUI attributes of a label, see [ Label999 ]

Type=CrescendoA, CrescendoB, CrescendoC or CrescendoD (Buttons to switch between the various crescendo modes)
+ GUI attributes of a button, see [ Button ]  (displayed as button per default)

Type=CrescendoPrev, CrescendoNext or CrescendoCurrent (Buttons for controling the crescendo combinations)
+ GUI attributes of a button, see [ Button ]  (displayed as button per default)

Type=Current (Recall current number button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=CurrFileName (Represents the current combinations file name of the setter
+ GUI attributes of a label, see [ Label999 ]

Type=RefreshFiles, PrevFile, NextFile, LoadFile, SaveFile (Refresh files/Prev file/Next file/Load file/Save file buttons of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as drawstop per default)

Type=Full (Button to enable storing all elements in the setter, restrictions from the ODF are ignored)
+ GUI attributes of a button, see [ Button ]  (displayed as button per default)

Type=GC (General cancel button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=General01 - General50 (Buttons for the setter generals)
+ GUI attributes of a button, see [ Button ]  (displayed as button per default)

Type=GeneralLabel (Represents a label with the general bank number)
+ GUI attributes of a label, see [ Label999 ]

Type=GeneralPrev or GeneralNext (Buttons for switching banks of the setter generals)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Home (Move to 000 button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Insert or Delete (Buttons to insert/delete a combination)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=L0, L1, L2, L3, L4, L5, L6, L7, L8 or L9 (Recall combination with the specified digit as last digit button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Label (Represents the current number of the setter. Only available for old format panels)
+ GUI attributes of a label, see [ Label999 ]

Type=M100, M10, M1, P1, P10 or P100 (+/- 1/10/100 button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=PitchLabel (Label displaying the current pitch shift of the organ)
+ GUI attributes of a label, see [ Label999 ]

Type=PitchP1, PitchP10, PitchP100, PitchM1, PitchM10 or PitchM100 (Buttons for controlling the organ pitch +1, +10, +100, -1, -10, -100 cent)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Prev, Next (Prev/next button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Regular, Scope or Scoped (Button to switch between the various setter modes)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Save (Save button)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=Set (Set button of the setter)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=SetterXXXDivisionalYYY (Represents a divisional button YYY (000 means 1, 001 - 2 etc) for the manual XXX (000 - Pedal, 001 - the first manual, etc))
+ GUI attributes of a button (displayed as piston per default), see [ Button ]

Type=SetterXXXDivisionalBank (Represents a label showing the current bank of divisionals for the manual XXX (000 - Pedal, 001 - the first manual, etc))
+ GUI attributes of a label, see [ Label999 ]

Type=SetterXXXDivisionalPrevBank or SetterXXXDivisionalNextBank (Represents a button switching the current bank of divisionals for the manual XXX (000 - Pedal, 001 - the first manual, etc))
+ GUI attributes of a button (displayed as piston per default), see [ Button ]

Type=SequencerLabel (Represents the current number of the setter)
+ GUI attributes of a label, see [ Label999 ]

Type=Swell (Represents the crescendo swell)
+ GUI attributes of an enclosure, see [ Enclosure999 ]

Type=TemperamentLabel (Label displaying the current temperament of the organ)
+ GUI attributes of a label, see [ Label999 ]

Type=TemperamentPrev or TemperamentNext (Buttons for switching temperaments)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=TransposeDown or TransposeUp (Buttons for transposing)
+ GUI attributes of a button, see [ Button ] (displayed as button per default)

Type=TransposeLabel (Label displaying the current transpose setting)
+ GUI attributes of a label, see [ Label999 ]


[Stop999]
Stop object is a drawstop which consists of a number of ranks. If the number of ranks is set to zero, the stop contains one rank, which is defined in the stop section - else it references a list of ranks.
Only the accessible pipes can be triggered from the manual.

REQUIRED ATTRIBUTES :
FirstAccessiblePipeLogicalKeyNumber=(integer 1-128, required) The key number on the manual of the first accessible pipe.
FirstAccessiblePipeLogicalPipeNumber=(integer 1 - 192, required if NumberOfRanks=0) The number of the first pipe accessible from the manual. If NumberOfRanks is not 0, this setting is not necessary.

NumberOfAccessiblePipes=(integer 1 - 192, required) Number of pipes, that are playable from the manual starting from the first accessible pipe.

Rank999=(integer 0 - rank count specified in the organ section, required) Reference to a rank from the organ section.

OPTIONAL ATTRIBUTES :
NumberOfRanks=(integer 0 - 999, default: 0) Number of referenced ranks. If zero, one rank definition is included in the stop section. The lists of references is specified via the Rank999... settings.

Rank999FirstPipeNumber=(integer 1 - number of pipes in the rank, default: 1) Number of first mapped pipe from the rank.
Rank999PipeCount=(integer 0 - remaining number of pipes in the rank, default: remaining number of pipes in the rank) Number of pipes mapped from the rank.
Rank999FirstAccessibleKeyNumber=(integer 1 - NumberOfAccessiblePipes, default: 1) Key number offset (starting with FirstAccessiblePipeLogicalKeyNumber) for the pipe referenced by Rank999FirstPipeNumber.

+ attributes of a rank if NumberOfRanks is zero, see [ Rank999 ]
+ attributes of a drawstop, see [ DrawStop ]


[Switch999]
Switch is a drawstop without any additional attributes. It can be used, for example, to trigger stop action noises and key action noises.

attributes of a drawstop, see [ DrawStop ]


[Tremulant999]
Tremulant is a drawstop with additional attributes.

REQUIRED ATTRIBUTES :
In case of synthesised tremulants :
Period=(integer 32-44100, required) Period of the tremulant in ms
StartRate=(integer 1-100, required) Determines the startup time of the tremulant.
StopRate=(integer 1-100, required) Determines the stop time of the tremulant.
AmpModDepth=(integer 1-100, required) Determines, how much the volume will be changed.

OPTIONAL ATTRIBUTES :
TremulantType=(enumeration, default: Synth) Type of the tremulant. Valid values are: Synth (synthesized tremulant) and Wave (tremulant based on different wave samples).

+ attributes of a drawstop, see [ DrawStop ]


[WindchestGroup999]
Windchest represents a wind-chest on which pipes of ranks are placed.

REQUIRED ATTRIBUTES :
NumberOfEnclosures=(integer 0 - enclosure count, required) Number of enclosures, which inﬂuence this windchest. The list is specified by the Enclosure999 entries in the windchest section.
NumberOfTremulants=(integer 0 - tremulant count, required) Number of tremulants, which inﬂuence this windchest. The list is specifed by the Tremulant999 entries in the windchest section.

Enclosure999=(integer 1 - enclosure count, required) Number of an enclosure, which inﬂuences this windchest.
Tremulant999=(integer 1 - tremulant count, required) Number of a tremulant, which inﬂuences this windchest.

OPTIONAL ATTRIBUTES :
Name=(string, default: implementation dependent) Display name of this windchest.
AmplitudeLevel=(float 0 - 1000, default: 100) Linear amplitude scale factor in percents applied to the windchest. It is multiplied to the AmplitudeLevel value of the Organ section. 100 means no change.
Gain=(float -120 - 40, default: 0) Amplitude scale factor in dB applied to the windchest. It is added to the Gain value of the Organ section. 0 means no change.
PitchTuning=(float -1800 - 1800, default: 0) Retune the windchest by the specified number of cents. It is added to the PitchTuning value of the Organ section. 0 means no change. This setting is used only for the original temperament.
PitchCorrection=(float -1800 - 1800, default: 0) Correction factor in cent for the pitch of the windchest. It is added to the PitchTuning value of the Organ section. 0 means no change. This setting is used for retuning to other temperaments.
TrackerDelay=(integer 0 - 10000, default: 0) Delay in miliseconds introduced by the tracker applied to the windchest. It is added to the TrackerDelay value of the Organ section.
Percussive=(boolean, default inherited from the Organ section) If true, the samples are played as is (without any loop/release handling).
HasIndependentRelease=(boolean, default inherited from the Organ section). If true, releases are played independently of the attacks. If HasIndependentRelease is true then Percussive must also be set to true.
