Finale: Perfect Layout Plugin

The Perfect Layout plugin optimizes the page layout in the score and all parts of a Finale document with one click.
It includes more than 100 features of standard music layout tasks from cue note handling through collision elimination to spacing and part optimization.

In your working process you should first finish the score. The vertical position of the hairpins and expressions doesn't matter at this stage - as long as they are not above the staff. Their horizontal position should only be close the desired position (in order to avoid ambiguities). It is recommended to have the smart shape option "Snap When Attaching To Beats" checked before creating the hairpins and custom smart lines.
When the score is finished, you create the parts (Manage Parts->Generate) and adjust the measure layout (i.e. insert good page turns, have sections preferably start on new systems etc.).
When all this is done, you run the plugin which may take a couple of minutes depending on the complexity of the score. Afterwards you should check all parts and the score and, if necessary, do some more fine-tuning.

Before/after running the plugin:

The image below shows a Finale score before/after running the Perfect Layout plugin and the Harp Glissando plugin (on measure 40 only). For the corresponding part view see bottom of page.
(The blue/red measure numbers were added for visual reference only. They are not from Finale)


(with measures from the score (red) and, if different, measures from the parts (blue):

1.) Removing Collisions
- Removes collision of hairpins with slurs, ties, notes, articulations, expressions, barlines and repeat brackets (below staff only).
(mm.4, 6, 9, 15, 19, 29/30, 43, 55,etc.)
- Removes collision of articulations with (one!) other articulation on top of the staff, with slurs, ties and dynamic expressions. (mm.1, 2, 4, 7, 35, 37 / m.1)
- Removes collision of dynamic expressions with slurs, ties, repeat brackets, notes, accidentals and barlines (below staff only). (mm.6, 22, 23, 24, 28, 51, 52, 56, 59)
- Removes collision of trill line smartshapes with up/down bow articulations.
- Removes collision of text repeats and notes, articulations and multi-measure rest numbers (on top of the staff only).
- Removes collision of ottava and trill lines with notes, accidentals and articulations (on top of the staff only).
- Removes collision of rehearsal mark letters, rehearsal mark texts and tempo mark text expressions with notes, articulations and left-aligned chord symbols. (mm.25-38, 58)
- Removes collision of voice 1 note with voice 2 articulation. (m.25)
- Removes collision of Voice1/Layer1 dynamic expressions with Voice2/Layer2 notes). (m.25)
- Removes collision of glissando lines with accidentals and augmentation dots (together with optimized vertical alignment).
- Not all slur parameters are currently supported, unsymmetric slurs may still have tiny collisions.

Each collision system just checks the collisions of two individual elements. It is not a general collision avoidance system that checks all surrounding elements and calculates the best spacing solution. In most cases this system works fine, but from time to time there are situations where the suggested solution is not the optimum.

2.) Alignment
- Hairpins, dynamic expressions and expressive text below the staff are aligned vertically. Vertical alignment is reset after a few measures, a certain distance and on each new system. (mm.3/4, 8-10, 12-14, 15-16 and more)
- Dynamic expressions and expressive text on the same measure position are aligned horizontally.
- Adjacent hairpins and dynamic expressions are connected with a small visual gap in between. (mm.6, 9, 10, 12 and more)
- Moves dynamic expressions slightly up on systems with slash staff style measures where no other object goes below the bottom staff line. This reduces unnecessary space e.g. on drumset parts with lots of slash notation.
- Positions dynamics expressions in the centre below the note. (mm.1, 3 and more)
- Corrects vertical alignment of hairpins with line breaks (i.e. two alignments necessary). (mm.14/15)
- Alignment of expressions is content-dependent (e.g. pp and mf get a reduced vertical offset value compared to fff, so that the actual distance to a note or articulation is identical).
- Corrects wrong horizontal position of a niente hairpin expression under a rest.
- Tempo and rehearsal marks are aligned horizontally.
- Moves expressions connected to a centered "real" whole rest to other layers' notes on measure position 0 if available.
- Numbers from the Finale "Number Repeated Measures" plugin are centered. (m.45)
- Moves an expression that is assigned to "All Layers" to another layer if layer 1 is invisible. Otherwise Finale doesn't do a correct vertical alignment. (m.58)
- Aligns rehearsal mark texts under multi-measure rests. (m.41/42)
- Moves dynamic expression from the end of the measure to next measure's position 0 if it either has a huge horizontal offset to the right or if the note on measure position 0 is tied backwards.
- Slurs at line breaks which end with high notes will be re-aligned, for example when a run with a slur ends on the next system (This feature is implemented, but doesn't work yet because of a JW Lua bug which currently can't handle break offsets of default slurs).

3.) Multi-Measure Rests
- Creates multi-measure rests in score and parts if they had not been created automatically yet. (mm.41/42 and (mm.62-71)
- Can remove multi-measure rests in measures that have non-MM breaking expressions and/or hairpins. (mm.14/15)
- Removes multi-measure rests in parts if the measures have changed after the first MM rest creation. (mm.51/52)
- Updates all multi-measure rests to the current style from the multi-measure rest document settings (e.g. change from shape to symbol).
- Moves multi-measure rest numbers slightly down on 1-line staff measures.
- Can optionally hide tempo alterations in MM rests.
- Show measure number ranges below multi-measure rests.
- GP (=Generalpause) expressions are detected and split MM rests.
- If a multi-measure rest ends with a clef change, then the MM rest will be reduced in size to avoid collision between the MM rest and the clef. A measure number group below the MM rest will also be shifted slightly to the right to match the new position. (m.42)

4.) Hairpins
- Hairpins are connected, if possible, to adjacent note entries or notes with dynamic expressions for optimal playback. (mm.4, 6, 9, 10, 12 and more)
- Moves hairpins that are attached to rests to note before, otherwise the Finale 2014 hairpin playback doesn't work correctly. (m.13)
- Lets hairpins start slightly right to a note/rest and lets them end slightly before a note/rest. (mm.4, 13, 9, 10 and more)
- Shortens hairpins that end on measure position 0 of the next system to end on the last beat of the last measure of the previous system, in order to avoid hairpin line breaks (but for optimal playback this should not be done, it's just for visual reasons)
- Automatically resets hairpin horizontal break offset to 0, so that they align with measure start and measure end.
- Support of "niente" hairpins: automatic connection of hairpin with any niente ("o") text expression (currently restricted to one niente hairpin per measure).
- Can auto-connect to the next/previous note if it is close enough.
- Hairpins can be made horizontal.
- Hairpins can be resized to the default opening width.
- Hairpins that start on measure position 0 before the note can be reset to a horizontal offset of 0.
- Hairpins that end in the middle of an empty measure are shortened to the end of the previous measure.

5.) Articulations
- Puts articulations on rhythmic and slash notation measures on top of the staff. (mm.19-22)
- Creates inside slur articulations if necessary for collision with steep slurs.
- Changes certain shape articulations with helpful descriptions in the shape definition to character articulations
For example, different staccato dot articulations may have a shape symbols of their duration, i.e. 30%,50%,75%, etc. The shape is great for the score/playback creation process, but for printing it will be reverted to the staccato dot character.
6.) Tuplets
- Puts tuplets on notes with lyrics on top in order to avoid collision with lyrics on bottom. (m.18)
- Puts tuplets over one line (percussion) staves on top in order to avoid collision with dynamics on bottom. (m.43)
- Optimized tuplet and/or default values from the tuplet preferences can be applied to all tuplets.
- Tuplets on extreme notes can be moved on top of the notes instead of staying on the stem side.
- Tuplet brackets on quarter note tuplets (and higher) can be hidden.

7.) Repeat / Coda symbols
- Moves typically right-aligned text repeats to the right border of the measure (D.C., D.S., Fine, etc.). (m.61)
- Moves typically left-aligned text repeats to the left border of the measure (Coda, Segno, etc.). (m.39)
- Unifies vertical offset of all text repeats.
(mm.39, 61) - Moves a system starting with a "Coda" rehearsal mark expression slightly down. (mm.62-71)

8.) 1-Line Staves
- Adds 5-line staff symbol at the end of a measure if it is a 1-line staff measure followed by a 5-lines staff measure with a new clef. (m.48)
- 1-line staves have different distance values or baselines than 5-Line staves (for example dynamics can come closer to the staff line). (mm.43-48)

9.) Lyrics
- Minimizes the distance between the top verse lyrics baseline and lowest note and articulation (chorus/section not supported yet). (mm.4, 17-18)
- Fixes the distance between multiple lyric baselines of the same type.
- Removes vertical offset from manually adjusted syllables.
- Removes invalid syllables.

10.) Spacing
- Broadens measures with condensed hairpins to improve the hairpins visually. (m.12)
- Sets slash style measures to time signature spacing. (mm.21, 63-67)
- Sets slash style measures with visible offbeat notes in other layers to note spacing.
- Removes uneven slash measure spacing caused by non-hidden, but invisible notes. (mm.21, 64)
- Apply music spacing to full score (optionally).
- Reduces the measure width in blank notation style, slash and repeat style measures with individual values for minimum measure widths. (mm.68-71)
- Adaptive spacing for blank notation and repeat styles measures: if the staff is very crowded, these special measures will be squeezed more.
- Reduces the width of the last system on the last page, if that holds too less musical information to span the full system width. (mm.62-71)
- If a measure holds a preparation clef for the next measure, the measure will be broadened and extra space at the end added if there is a collision with a note entry or a slash symbol (from the slash staff style) in that measure. (mm.24, 48)
- Inserts additional beat chart elements to measures if necessary for improved spacing.

12.) Cleaning Up
- Relinks all expressions, articulations and hairpins from the parts with the score before further processing (older Finale documents can have expressions attached to different beats in score and part which might confuse the alignment). (m.39)
- Clears manual positioning of articulations, dynamic expressions, rehearsal marks and tempo expressions. (m.24, 52 and more)
- Removes unneccessary articulations on rests (e.g. if staccato dots were copied to rests with the explode function. Allowed articulations like a fermata remain.). (m.32)
- Removes duplicate articulations of the same kind on the same note (resulting for example from staff implode). (m.32)
- Removes duplicate identical expressions at the same position
- Removes duplicate identical hairpins at the same position.
- Removes duplicate identical slurs.
- Resets manual accidental shifts.
- Right-aligned multi-measure rest breaking expressions are duplicated and also stored in measure 1 of the multi-measure rest, so that they don't disappear anymore at the end of the mm rest.
- Separated "f" and "p" dynamics on a note will be connected to "fp".
- Removes accidentals from backwards tied notes.
- Updates "imported" expressions from MusicXML that have unfavourable settings (e.g. "Horizontal Click Position" for placement") with the settings from the corresponding category.
- Sets tempo marks, tempo alterations and rehearsal marks to "break multi-measure rests".
- Removes 'open ties' (i.e. tie starts that don't have a corresponding tie end). Laisser-vibrer staves like harp, timpani, cymbals or vibraphone can be ignored.
- Slightly overlapping hairpins are "connected" with a gap.
- Assigns noteID to entry-based glissando lines that are connected with a note, but have no noteID.
- Sets vertically moved rests to standard position if it is a one-layer and one-voice measure.
- Detects text expressions assigned to invalid categories and moves them to "Miscellaneous".
- Certain smart lines will be placed at a fixed vertical position on top of a staff (for example Fill-in-------¬ on drumset staves). They will also be aligned with right before the barline if they are close. (m.66)
- Deletes empty pages at the end of a part. (m.68-71 - not visible)
- Corrects expressions that are connected to a slightly wrong measure position (e.g. Pos 32 instead of 0) to the correct position (this occurs especially in older Finale documents). (m.9)
- All single grace notes get slashes. (m.59)
- All single grace notes become 8th notes, all multiple grace notes become 16th notes.
- Rests are checked if they match the time signature and otherwise splitted/merged and the measures respaced (composite AND non-composite time signatures are supported).
- Invalid composite time sigs that are actually non-composite time sigs are included in the rest check for time signature matching.
- Rebar is optionally possible (same as Utilites->Rebar, but off by default because of its side effects on quantization)
- Measures can optionally be padded with rests if incomplete (by default this option is off in order not to pad layers that are incomplete on purpose)
- Removes stunted slurs and hairpins that start and end on the same note/position.
- Deletes invisible articulations with invalid articulation definitions (i.e. those articulation definitions that were already deleted).
- Expressions that were assigned beyond measure duration (e.g. position 4096 EDUs in a 3072 EDUs measure) are corrected and assigned to the best fitting note position where they are currently visible.
- Manual adjustments of slurs can be removed
- Accidentally flipped hairpins that start and end in the same measure are corrected.
- Accidentally flipped ties are removed if there are no voice2 entries and no entries in other layers.
- Accidentally flipped/frozen stems are removed if there are no voice2 entries and no entries in other layers.
- Voice2Launch flags are reset if there is no voice2 on that beat. This also corrects the direction of wrong stems and slurs.
- Corrects messed up measure number region indices.
- Removes slurs that double ties.
- Dynamic expressions which are assigned to non-dynamic expression categories are automatically shifted to 'Dynamic Expressions'.
- Slurs can be updated from on/off to automatic engraver slur.
- Slurs not connected to the end note of a series of tied notes will be connected to the end note (except for grace note slurs).
- Invalid invisible slurs (attached only to one entry instead of two) are deleted.
- Wrong SmartShape flags in measures are cleared.
- Wrong Expression flags in measures are cleared.
- Wrong Special flags in note entries are cleared.
- Wrong Articulation flags in note entries are cleared.
- Manual positioning of notes can be cleared.
- Group brackets can be automatically added on groups with at least 3 staves (and bracket set to none).
- Moves entries that were accidentally placed on layers 2-4 to layer 1. Cue notes, non-playback layers, or notes under alt notation staff styles are not moved.
- Hairpins with a start or end measure position greater than the acutal measure duration are reset to the measure duration.
- Hairpins that end after the last measure are reset to end in the last measure.
- Horizontal custom smart lines are forced to be horizontal.

13.) Cue Notes (created with the Finale Cue Note plugin)
- Cue notes get all stems down. (m.11)
- Cue note instrument texts move below the staff. (m.11)
- Cue note instrument texts are connected with the first note of the cue (instead of rests). (m.11)
- Assigns cue note instrument text to the same layer as the cue note, so that they have a reduced size as the cue note. (m.11)
- Hides "cue notes only"-measures in the score and applies an "Blank Notation with Rests" staff style. (m.11)
- Hides "100% sized"-cue notes that were only created to have 100% sized lyrics with a "Blank Notation: Layer X" staff style.
- Cue note text expressions (e.g. "(Fl.)") without notes can now break multi-measure rests.
- If an "empty" pick-up measure holds a cue note clef change only, the width of the measure will be fixed so that the clef is displayed correctly
(i.e. this is necessary if a part starts with a clef followed by a cue note clef which can only be handled with an empty extra measure)

14.) Score/Parts Processing
- The plugin runs over the score AND all linked parts in one go, making different adjustments in the parts and score (e.g. vertical alignment of dynamics/hairpins has different results on the score and the parts as their staff systems include different measures).

15.) Improved Readability / Hiding Elements
- All measures with notes on a certain layer are set to blank notation on that layer (for example to remove playback only layers).
- Makes chords left-aligned.
- Hides unnecessary group names that are also part names (e.g. Piano or Harp).
- Hides chord symbols on selected staves in the score, but shows them in the parts (to reduce complexity in the score). (m.63)
- Hides rehearsal mark texts that have the same text as the lyrics in that measure. (m.5)
- Hides all expressions in the score that are only to be shown in page view (e.g. harp tuning or solo markings) based on user-defined expression categories. (m.16)
- Hides instrument-specific articulations in the score that are only to be shown in the parts to reduce complexity of the score (e.g. up/down bow). (m.1, m.1)
- Adds automatic measure counting to slash measures (every xth measure and after double barlines) and one-bar repeat measures (every measure). (m.44-46 and 63-67)

16.) Usability
- All the functions mentioned above can be switched on/off and have many parameters.
- The plugin uses the same font database as the House Style Changer and recognizes music symbol and glyph spacing from more than 300 music fonts. (mm.35, 51, 52)

17.) Known Issues
- No support for scores with staff dependent time signatures.
- Diagonal hairpins are only partially supported.
- Non left-aligned chords are only partially supported in collision detection.
- Enclosures are not supported yet for all collision types.
- Cross-staff smartshapes are not supported for collision detection.
- Rests in very ambiguous time signatures are not corrected (e.g. 11/4).
- Accidentals as expressions are not taken into account for collisions.
- The clef slots are assumed to be used as in the Finale default document (i.e. slot 1=violin clef, slot 4=bass clef, etc.).
- JW Lua doesn't allow the detection of full or short barline in 1-line staves, so they are both aligned identically.
- Three stacked articulations (e.g. downbow, fermata and accent) are not included in collision removement.
- Lyrics baseline optimization currently requires TG Tools->Lyrics->Baselines run before the Perfect Layout plugin (JW Lua bug).
- Document options for tie placement currently can't be read through the plugin interface, so the plugin always assumes Finale's standard values tie positionings.
- Empty shape instructions cause JW Lua to crash. They are used for example for invisible custom stems.
- Collision of articulations with ties on top of the staffline is currently not supported yet, but also occurs rather seldom.
- Pickup duration detection is unstable: if a pickup measure is created with the "Use a different time signature for display" method and the second measure has a completely different time signature, the pickup is only detected if one of the first measures has at least one rest. (JW Lua bug: it has limited support for "Use a different time signature".)
- Automatic shape detection is currently switched off as JW Lua currently crashes Finale when examining shape instructions (i.e. down/up bow shapes are not detected as valid articulations for collision detection).
- Supported shape articulations (like "Up+Down Bow") must be designed "on baseline" (they must not cross below the baseline). Otherwise the stacked articulation collision doesn't work.
- Because of a Finale bug with the "Slur Tips Avoid Staff Lines" option, there may be collisions with slurs in rare cases that appear on the screen only. But: when printing the document to a printer or to PDF, the collisions are not visible.
- Hairpins that appear on three staff systems in a row are only checked for collision on the first row.
- Slur collisions are only detected correctly for slurs without line break or for the first half of slurs with a linebreak (i.e. the slur after the linebreak is not taken into account, because of a JW Lua or Finale PDK bug).
- Engraver slur metrics with extreme distortions are sometime not calculated perfectly which might result in collisions not being detected correctly.
- Dynamic expressions might get close to steep beams. Those beams are currently not included in collision detection.
- A TTF font file must be available on the hard disk for font metrics analyzation, otherwise the metrics are not available.
- Priorization: manually adjusted tremolo articulations may be messed up when the connected note entry has illegal flags (like Special or Voice2Launch). So note entry flag correction has a higher priority than tremolo articulation placement. So it's recommended to run for example the JW Yada Yada plugin after having run the Perfect Layout plugin.
- The plugin has not been tested with international versions of Finale and might not fully work in these because of different keywords.

This image shows the corresponding Finale part before/after running the plugin (for score see above):

Screencam before/after videos from within Finale:
Video 1: Automatic Hairpin and Expression Alignment in Score and Parts

Video 2: Articulation and Slur Alignment

Video 3: Automatic Hairpin and Expression Alignment

Video 4: The Perfect Layout plugin on different parts

Video 5: Rehearsal Marks with Notes and Key Signature Collision

Video 6: Articulation Stacking with Multiple Fonts

Video 7: Custom, Ottava and Trill Line Alignment

Video 8: Demonstrating the Collision Calculations Visually

Video 9a: Tempo Marks Alignment with Minimized Vertical Offset (Maestro font)

Video 9b: Tempo Marks Alignment with Minimized Vertical Offset (HayFIN font)

Video 10: Automatic Rests Adjustment According to the Time Signature

Video 11: Automatic Rests Adjustment in Ambiguous Time Signatures like 5/4
The score is scanned vertically to see if there are any rhythmical hints for a 2+3 or 3+2 division in other staves.
The more staves the score has or the more clear the notation rhythms is, the better the division detection.

Availability: Dependent on further updates of JW Lua by Jari Williamsson, probably Q2/2017.

If you want to participate in beta testing, please apply via our
contact form.
Please mention if you work on MacOS or Windows.
If you want to support the project, consider making a donation to Jari Williamsson's JW Lua project.

(c) 2014-2017 Jan Angermüller