Music selection of multiple flows

Hi !
Is there a way to select the music of many flows ? (i have a 35 flows project and i 'd rather like to make changes to the whole project instead of 35 times !).
Thank you !
(Dorico pro 4)

What sort of changes are you referring to?

Hi Daniel,
For exemple to make all the notes an octave higher or lower…

No, you’ll have to do each one. Though you can use Dorico’s scripting abilities to record the steps for each Flow – possibly even including a “Go To Next Flow” command.

Hi Ben
thank you ! i 'll then use the script to make the job easier ! However i 'd rather not have repetitives tasks when using a computer ! Perhaps a idea for a next update ?
I still think Dorico is a tremendous software !)

If you want all the notes belonging to one instrument to be consistently an octave higher/lower (or any other transposition that’s consistent), you could override that instrument’s transposition in the layout.

Hi Lillie,
Thank you, i’ll check that !

Tricky but possible.

The whole point of using scripts is to avoid repetitive tasks. The following Lua script will perform the same operation for a given number of Flows.

local app=DoApp.DoApp()
app:doCommand([[Edit.GoToFlow?FlowID=0]])
-- Set the number of Flows in the line below:
numberOfFlows=3
for i=1,numberOfFlows do
	app:doCommand([[Edit.SelectAll]])
	-- Add your operations here
	app:doCommand([[Edit.TransposeSelection]])
	app:doCommand([[Edit.GoToNextFlow]])
end

Note that this script just brings up the Transpose dialog, so you’ll have to press Return every time (it should remember the settings). I dare say there’s a way to describe the dialog’s options in the script.

@benwiggy, do you know any good “first steps” to Lua scripting?
Also, do you know what are the commands/operations scriptable in Dorico?

Lua scripting in Dorico is quite limited: any ‘operation’ or command that Dorico can do, can be recorded.
If you click on “Start Recording Macro” in the Script menu; then any commands executed will go into the script. Click on End Recording Macro to finish.
Then the script will be in the user settings folder, in a subfolder called Script Plug-ins, named “usermacro.lua”. Change the name to something else, or it will get overwritten.

Any lua scripts in that folder will appear in the Scripts menu, and can be triggered from there.

You can’t query the app for an object’s property, e.g. “If flow = 3”, "If stem = “Hidden”.

But you can use some basic Lua commands, like I did with the for loop.

2 Likes

Many thanks for the tips, @benwiggy! I’m trying to decipher now your script (I know a bit of AppleScripting).
If I understood right, the 0 in Edit.GoToFlow?FlowID=0 is your doing, not the result of the Macro Recording (because there’s no Flow 0), so that the GoToNextFlow command in the “for…end” loop will get the flow no. 1?
And the name of the constant [?] “numberOfFlows” and the variable “i” is your doing also? It could be named anything else, wright?

(Sorry to digress from the OP…)

Hi F !
I’m just at home now and i’ve just tried your tricky but fantastic scrolling solution !
Thank you, i will use it now and then :blush:

1 Like

Thank you Ben for bringing me this exemple of the powerfullness of Lua scripts in Dorico.
I keep that for later when i am more experienced with scripts !

As usual in computing, numbers start from 0, so Flow 1 has an ID of 0.

The constant and for loop are my additions to the macro, yes.

No: the for loop processes the operations in the current flow, then goes to the next flow, then it starts again.

1 Like