Condition

From MusiCAD

A condition is a formulation of a condition. Conditions are used in layout templates to ensure that changes (executing a layout template) are only performed under the specified condition.

Conditions are constructed as A operator B with

A a property of the current melody (such as note size, line spacing) or
result of the calculation of the melody (such as number of lines/bars, whitespace).
operator     '=, >, < or ' <>
B the value to be tested for the property in question.

In a condition you can query the components separately for a composite parameter such as a font:

Parameter type description example
Name string font name Times New Roman
Size integrity font size 8
Style string font style bold/italic/underlined/narrow fsNormal
Color string color name clDefault
X integrity horizontal position 0
Y integrity vertical position 0
Align string alignment taLeft
LineUp boolean alignment with previous text 0
Visible boolean become visible 1

Examples:

    nLines > 11
    iLineFillPercent < 60
    nPages <> 1
    sMeters = 7/8
    fChords.Name <> Arial

See also