Triplet bracket: opposing hooks

Activation: no keyboard shortcut has been assigned, as this macro will likely be executed infrequently. Assign to the menu structure, or choose your own hotkey.

NOTE: this process works only for triplet brackets. For tuplet brackets with any other numeral, this process will not yield the desired results; devising an automatism for tuplet brackets with numerals other than “3”, and with opposing hooks, is more complicated and will likely involve calling upon some external procedure. I have not yet developed such a script; when I do, I will post it on the site.

This macro is a straightforward keystroke macro, executing various parameter modifications directly within ScorBox. The aim is simple: you wish to enter triplet brackets whose ends point in opposite directions, as in the case of indicating some tuplet values of notes notated across two staves, such as in the following example (ignore the fact that the note values here don’t make sense: the point is the appearance of the tuplet brackets):

There are no parameter provisions for creating such “opposing hook” tuplet brackets easily, neither in Score 3 nor in Score 4. This macro is designed to facilitate their creation. In essence, you begin by creating a tuplet bracket and positioning it roughly in the desired position, such as this:

Note that you always position the right end of the bracket as you wish it to appear, including the required p7 value (in this example, p7 = -2). This inevitably means that the left hook at this stage is not as you wish it to appear; in this example, you would want it to point downwards, with the same length as the upward pointing right hook. Position the left end and the bracket slant approximately where it should be, once the downward pointing hook is applied; you can always fine tune the result later.

Once you have positioned the tuplet bracket, select it (i.e., go into Edit mode), and then execute the macro. As I have not assigned a keyboard shortcut to this macro, I invoke it from within my menu structure:

Note, by the way, that the macro title is preceded by an asterisk, and followed by “[SC]”. That’s just my own convention: the asterisk indicates that an item must be selected (i.e., in Edit mode) before the macro is invoked; the “[SC]” indicates that the macro is entirely a Score keystroke macro, i.e. consisting entirely of Score commands. The menu is a “CODE 5″ sub-menu of my master menu:

I have tried to make the macro fool proof, by building full instructions into two prompts that will appear; simply follow the instructions. If you find the dialog boxes annoying, simply change the text, or delete them: it’s up to you.

The end result of the macro is that the left hook of the tuplet bracket has been suppressed (by setting p9 = -1), and that the new left hook is attached as a code 4 (line) item at the precise location at the left end of the tuplet bracket, pointing in the opposite direction, with a length that matches the right hook of the tuplet bracket. Therefore, if you need to fine tune the left end, you’ll have to nudge the tuplet bracket and the line by the same amount. For adjusting the right hook, simply select the code 5 tuplet bracket, and adjust the right end as needed.

Finally, should you invoke the macro accidentally (e.g., you weren’t in Edit mode, or you invoked it accidentally on some other item), you will receive unwanted results due to the parameter and command strings being piped into ScorBox. In order to prepare for this possibility, the macro has been constructed with an “Undo” option, reconfiguring the file to the state before the macro was invoked.

The following video illustrates the process:

Within Macro Express, position both macros into “Code 05″:

Posted by Jürgen Selk

initial posting:  2 February 2012

Download file:

Triplet bracket: opposing hooks [SC].zip

The download file contains the following:

Macro Express module:

  • Tuplet bracket: opposing hooks [SC]