Splitting duration into number of parts?

Hello again,
is there a way to split a selected note into a number of parts (and not into specific durations)? Say: select a quarternote, and map some keyboard command such as Cmd+3 to split it into three tuplet notes.
Or: is there a way for me to write my own plugin that does it?
Thanks,
Daniele

Not into tuplets directly, but there is a command to split notes by either the rhythmic grid duration or the distance between the start of the note and the caret. You can then tupletify the resulting notes, with Insert mode active if needed to prevent overwriting later notes or to draw later notes back into place.

1 Like

Thanks Lillie.
This is not what I was after, as it potentially “messes up” music beyond that point. I was aiming at a very simple and clean way to simply split a note into 3 (or 7, or whatever).

Are there maybe plans to equip Dorico with scripting possibilities? This is something I want easily write myself as a plugin, and it may potentially take just a handful of lines of code…

If you want to turn a crotchet into triplet quavers for example, ie the final total duration of the split notes matches the start duration, then Insert mode prevents your intervening edits overwriting later music, and likewise pulls it back into place when you shorten durations.

Thanks Lillie, but when I have a crochet (followed by something else), and I want to split it into 3 triplet quavers, as I use the instructions of “Turning existing notes into tuplets”, what comes AFTER the crochet also becomes part of the tuplet.
So, that’s not helping in my case: I want to split the crochet into 3 parts without shifting all the following portion of music…

Am I missing something?

Daniele

I’d try activating Insert mode, turning the single crotchet into 3 quavers however is easiest (select, press 5, then R twice, for example), then turn those 3 quavers into triplets.

Hi Lillie, as I do so, the following portion of music gets corrupted, right?
Here’s what I’m doing, and look at the rest that appears:
Dropbox
Have I misunderstood your indications?

Still, if there’s no way of splitting a quaver into 3 crotchet, it’s ok, I just wanted to know, because this looks like something I may need all the time and being a beginner in Dorico I didn’t want to miss something obvious…
Are there plans for allowing user to write simple scripts for custom actions? That would be very powerful…

Daniele

Here is a little macro I made inside Dorico: it splits a quarter into 3

tuplet script

The lua code is this:

local app=DoApp.DoApp()
app:doCommand([[NoteInput.NoteValue?LogDuration=kQuaver]])
app:doCommand([[NoteInput.StartTupletRun?Definition=3:2e]])
app:doCommand([[EventEdit.NavigateNextItemSamePosition]])
app:doCommand([[NoteInput.RepeatLast]])
app:doCommand([[NoteInput.RepeatLast]])

You can change it to other values, name it accordingly, piut it in your scripts folder, and call it from the Script menu. If you want to call it from the Jump Bar, you would need to restart Dorico to recognize it there.

EDIT: it will only split one note at the time.

1 Like

Follow up question - Scripting:
Does anybody know a lua command to (re)select the note instead of potentially some other element, which could be used instead of:

app:doCommand([[EventEdit.NavigateNextItemSamePosition]])

?

Thanks so much for the Script, meixner! Although, to be honest, when I run it I still have the same problem: if I run it on a note in the middle of a sequence of notes, it still tampers with the rest of the sequence, creating a rest mid-way.

But it’s still very nice to see that scripting is possible.
If would be amazing to access the data structures instead of the input commands… Last time I checked was very long ago and I think scripting was sort of undocumented/unsupported.
Is there an official guide? Or is it still in an embryonic stage?

Best,
Daniele

I strongly suggest that you do some experiments to see how Dorico behaves when creating tuplets (or indeed changing any duration) with and without Insert mode on, rather than disappearing down rabbit holes with scripts.

I didn’t want to lead anybody astray … I just spontaneously tried an idea and shared it

1 Like