Paragraph styles with pre-populated text

Is there a way to invoke a paragraph style with pre-populated text?

What I want to do is create a paragraph style for example “Vamp indications,” assign it to a keep command, perhaps ctr-v, and then instruct it to populate the word “Vamp” when I hit ctr-v.

I can achieve this with macros programmed outside of dorico but I was wondering if there is any way to do this natively.

Thanks!

There’s no built-in way to tell Dorico to create a new text item with default text, no.

You could create a Playing Technique with that text, of course.

I too would like that functionality for custom paragraph styles. The macro solution would be totally sufficient for me. But I am wondering how to actually do it.

When recording a macro while pressing Shif+X and entering text the text insertion is not recorded as a command in the script.
Is it a parameter of the function for creating system/staff text I don’t see or does this work completely different?

If this is possible with the scripting functionality I could adjust my user-defined keycommand.json and be happy.

You could also use a Script, within Dorico.

And it’s easy enough to copy an existing text element, with Alt-click.

I’ve recorded a macro while inputting a staff text called “hello”.
These are the commands that were recorded:

app:doCommand([[NoteInput.CreateText?ParagraphStyleID=paragraph.defaulttext]])
app:doCommand([[NoteInput.TextCreateFinished?FlowID=0&EventBlockID=44&AboveOrBelow=kAbove&IsSystemText=0&RhythmicPositionPair=73/2]])

So I can make popup the create text dialog with the right paragraph style but how do I pass the text “hello” in the script?

My mistake. It looks like the contents of the text popover aren’t recorded. Sorry.

No problem, I just thought it is possible because of above quote.
Or AlGore lied to us (not meant politically!)

I’m trying to do something similar. I’d like to be able to insert custom rehearsal marks (Verse, Chorus, etc.) in the Rehearsal Marks paragraph style using a macro. Where I’m getting held up is making a change to the Paragraph Style dropdown in the insert text popover (accessed with ‘Shift+x’). I didn’t really follow your script above. I’m using Keyboard Maestro and Streamdeck. Any idea how I could make that Paragraph Style selection in the popover?

If you have a custom paragraph style defined and saved as a default (that is, you clicked the star button so that it’s available in all projects), you can assign a custom key command to it in Preferences. For example, I have a custom style called Expressive Text, and I’ve assigned Alt+Shift+E to it. When I type that combo, the the formatting toolbar comes up with that style already selected.

If you’d rather work with third-party tools and leave Dorico’s key commands out of it, you can also directly create a text item with a custom paragraph style from the Write menu. So my Expressive Text style is available at Write > Create Text > Expressive Text

That’s really helpful! But did I understand correctly that you have to set that custom paragraph style as the default? Meaning that any other time I insert text it will start with my custom rehearsal marks paragraph style?

Not as the default, but as a default.

In many of the Dorico dialogs, there’s a star button:

When you click that button and the star becomes filled in, the properties of whatever you’re editing get saved in your user library file. If you create a new paragraph style and then click the star, it will be available in all your Dorico projects.

In your case, I’d forgotten that you’re just using the existing Rehearsal Marks style. So you don’t need to worry about custom styles; you can just add a key command for creating Rehearsal Marks text:

Or do Write > Create Text > Rehearsal Marks

1 Like

Al Gore was quite important for computer-generated music, since he invented Al Gore rhythms.

4 Likes

Yeah right, and not to forget he invented the internet.

That was great. Thanks!