Okay, so I stopped being lazy and looked at the commands inside a macro to change verses. Seems doable. My question now is - what is your convention for indicating verses in a text file? Do you want:
Oh soul are you weary and troubled?
No light in the dark-ness you see?
…
Turn your eyes upon Jesus
…
Thro’ death in-to live ev-er lasting
He passed, and we fol-low him there
…
That “lua” sounds like expert stuff and I’m still waiting for a useful solution in Dorico itself. Hey Sibelius had the ability to split words to syllables already 15 years ago (?). So I’m really looking forward for something like that in Dorico. And yes Sibelius syllabification (is that an understandable word?) wasn’t all good, but it was tremendously fast.
I feel you. I feel for the developers too. Any native Dorico feature will undoubtable be better and more convenient. But if you have work to do today in the meantime, a little hackery can pay sometimes.
Okay, attached is a new draft script that handles multiple verses, translations, etc. It isn’t perfect. It assumes that text files follow conventions like that below. (Note: you can use either verse numbers or the tag (verse), I used both here just as an example.
Oh Jor-dans’ stormy banks I stand, And cast a wish-full eye
To Ca-naan’s fair and hap-py land, Where my pos-ses-sions lie
All o’er those wide-ex-tend-ed plains Shines on e-ter-nal day
There God the Son for-ev-er reigns And scat-ters night a-way
(verse)
No chill-ing winds nor pois’nous breath Can reach that healthful shore
Sick-ness and sor-row, pain and death Are felt and feared no more
(verse)
When shall I reach that happy place, And be for-ev-er blest?
When shall I see my Fa-ther’s face, And in his bos-om rest?
(chorus)
I am bound for the promised land, I am bound for the promised land;
O who will come and go with me? I am bound for the prom-ised land
Here is a fake translation to show you can add one below a
verse/chorus using the * to indicate
Obviously you need to have the notes and rests first, and to select one of them as the starting point where lyrics will be entered when you run the script. You should change the name of the file to be imported at the top of the script or use the LYRICS_IMPORT environment variable as noted before.
For the very brave, you can change enableSyllabify to true at the top of the script, and a primitive function will then try to break your text file into syllables. Frankly its - not something I think you can do easily in a few rules in a LUA script, but it might be of value (or might not). Could be my lack of experience with Lua, but I figure Steinberg is going to do it better later anyway.