In addition to the standard Lilypond avoid-collision positioning properties (X/Y-offset, padding, staff-padding and outside-staff-padding) Spontini-Editor supports vertical and horizontal padding done with boxed barriers around graphic objects. These boxes, made with the \jsOSOPadder command, can be edited using the mouse. They also allow you to vertically sort the enclosed objects.
For example, if we have a note with a dynamic, a text markup and an articulation:
{
c'\mf_"text"_>
}
... we can decide to sort the three objects in the following ways (from top to bottom):
- ---> 1) articulation 2) dynamic 3) text
- ---> 1) text 2) articulation 3) dynamic
In both cases just write the objects in the desired order (left to right == top to bottom for objects below the staff, and bottom to top for objects above the staff), and add to each of them the respective jsOSOPadder object:
\include "path/to/lib/ly/jssvg.ly"
\include "path/to/lib/ly/oso-padding.ly"
{
\resetOSPositions
% 1) articulation 2) dynamic 3) text
c' \jsOSOPadder "1" "pads" #'() _\mf \jsOSOPadder "2" "pads" #'() _> \jsOSOPadder "3" "pads" #'() _"text"
}
\include "path/to/lib/ly/jssvg.ly"
\include "path/to/lib/ly/oso-padding.ly"
{
\resetOSPositions
% 1) text 2) articulation 3) dynamic
c' \jsOSOPadder "6" "pads" #'() _"text" \jsOSOPadder "4" "pads" #'() _> \jsOSOPadder "5" "pads" #'() _\mf
}
Once the code has been compiled, not only will the three objects be ordered as desired: a rectangular barrier will be added to them. The dimensions of this barrier can be modified with the mouse, which will consequently modify the padding of the enclosed objects.
You can add a jsOSOPadder in three ways:
- By clicking on the corresponding object, in the SVG panel, with the right mouse button, and choosing the "OSOPadder" item
- By pressing Ctrl-6 keys in the text panel
- By choosing TOOLS ---> \jsOSOPadder
Try THIS and THIS example to better understand. Look at THIS example as well, in order to see how OSOPadding can be used together with EasyCrossStaff.