[JW Lua] Copy/Paste Between Staves

Martin Marris mmarris at notecraft.com
Fri Dec 4 08:26:06 CET 2020


I am having a bit of trouble getting my head around the copy/paste
mechanism. I just want to, programmatically (i.e. without making a human
"selection"), copy the entire contents of a staff into another (blank)
staff. I have tried to define a "region" and so forth but am getting stuck.
I looked closely at Jari's "swap staves" plugin but am still not really
"getting it."

 

I'm also wondering if, in a case like this, the copy/paste via the clipboard
is necessary or optimal. Would it be better just to load the staff contents
into some kind of array (or rather, in Lua parlance, a table) and use that
instead? (I also note the use of terms such as "cell" and will investigate
that.)

 

For background, this is part of a large JW Lua script that "explodes" a
condensed 9-staff score into between 18 and 52 individual instruments
depending on content. The source material is voluminous (nearly 600 scores)
and homogeneous, therefore scripting has the potential to save a lot of time
(between 5 and 10 minutes per score, even if you use all the available JW
and other plugins to facilitate the human task).

 

Martin Marris

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20201204/47d4f649/attachment.htm>


More information about the JWLua mailing list