The original version of this page can be found at : http://forum.makemusic.com/default.aspx?f=6&m=449855
Posted By : Vaughan - 3/9/2015 9:07 AM
I'm just wondering what you do when you have a document with a large number of measure numbering regions and you need to insert or remove measures, thereby messing up the numbering regions after that point. Do you have a way of changing all the regions following the insertion/deletion spot to take the change into account? I couldn't find a way to do it with the JW Measure Numbers plugin.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Bill Stevens - 3/9/2015 9:41 AM
I haven't experimented with this, but in Jari's measure number plug-in, "Offset Numbering" doesn't do what you need?

Bill


Finale 2014d (all versions since 1.0)
Finally made the move from my trusty 2011c
Staff Paper and #2 Pencil with eraser
OS 10.9.4 on one, 10.10.1 on another


Posted By : Vaughan - 3/9/2015 10:46 AM
When I try this, all I get is a 'ping' error message and nothing happens.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Bill Stevens - 3/9/2015 11:24 AM
Note that it says that it changes the number in regions that are FULLY covered by the selection. Are you doing that, or just selecting part of the region?

Bill


Finale 2014d (all versions since 1.0)
Finally made the move from my trusty 2011c
Staff Paper and #2 Pencil with eraser
OS 10.9.4 on one, 10.10.1 on another


Posted By : Bill Stevens - 3/9/2015 11:32 AM
I fussed with the plug-in a bit and I can't seem to get it to do what you want it to, though I'm not convinced I have it figured out correctly.

Bill


Finale 2014d (all versions since 1.0)
Finally made the move from my trusty 2011c
Staff Paper and #2 Pencil with eraser
OS 10.9.4 on one, 10.10.1 on another


Posted By : Vaughan - 3/10/2015 3:28 AM
I couldn't get it to work the way I need it to, either. It seems to be able to provide an offset but I need the measure numbering regions after a certain point to shift by a number of measures and I still haven't found any way of doing this in one go.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/10/2015 8:09 AM

Vaughan,

I'm sure this can be done using JW Lua.  If Jari sees this, maybe he will provide a script snippet.  I will work on it when I get a chance.  Maybe I can come up with a solution.


PS:  [UPDATE] I have been looking at this project in JW Lua, and it turns out to be relatively easy to accomplish.  The most time consuming part is the UI and I am working out the details of it now.  It will ask what at measure number you want to insert measures and how many.  The script will then insert the given number of measures before after the given insert measure number, and then appropriately set all affected measure number regions.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/10/2015 10:20:53 AM (GMT-5)


Posted By : Vaughan - 3/10/2015 2:12 PM
That'd be great, although I have no idea how to use LW Lua. I would also need it to change measure regions after deleting measures, but I assume the script would work for both. Please let me know if you're able to work this out.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/10/2015 4:18 PM

Vaughan et al,

Attached is my JW Lua script to do what you request.  Download it and save it somewhere on your computer.

To use it, you must have installed the JWLua plug-in for your platform.  Get it here. http://finaletips.nu/index.php/download/category/28-beta-version

With your document open, invoke the JW Lua plug-in.  Click on the "Development" tab at the top of the JW Lua window.  Click on the "open" button and navigate to the script file you downloaded and open the script in the editor window pane.  Click on the "Run script" button.  A dialog box will explain the script.  A second dialog will ask you to enter the number of measures to insert, and the measure number before which to insert.  Sorry, I was confusing myself earlier as to whether it was before/after.

Enjoy!  If something does not look right after running the script, you can always undo immediately.  If you see something you want added, let me know.  It only inserts measures for now.  I will work on deleting measures later.

PS:  There is a way to put a script in the Finale Plug-ins Menu, so you do not have to open the JW Lua window to run the script.  Look here: http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:user_faq

PPS:  Attachment removed due to flawed operation.  See below for temporary workaround.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/11/2015 11:08:34 AM (GMT-5)


Posted By : Vaughan - 3/11/2015 4:53 AM
Thank you very much for this, Charles. I will definitely give it a try and am looking forward to a script for deleting measures (or seeing if I can figure out how to do it myself). It would be great to have a function like this available for all users; I can imagine it's often necessary.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Vaughan - 3/11/2015 5:18 AM
I can see why MM hasn't tried to implement something like this. It's more complicated than it seems. Invoking the lua script does indeed insert measures and extend the measure numbering regions although, strangely, the regions after the insertion point all begin with an offset instead of by 1. In addition, all of the measure attributes have stayed put: alternative barlines and, especially, key and time signature changes have remained in their old positions but the music has been pushed to the right, with disastrous results. I'm afraid that for the time being I'll have to go back to inserting the measures in the old way (which offsets all attributes) and just change the number regions by hand.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/11/2015 8:50 AM
Thanks Vaughan.  This is the kind of feedback I needed.  Of course, in my testing everything worked, but I did not have a very complicated document.  I will look into these anomalies you describe as soon as I can.  Sorry it doesn't work, first attempts seldom do. 

I certainly did not give this a thorough review in testing.  shocked I had not included TS's and KS's scattered throughout the measure number regions.  Clef changes seem to be OK.  I hopefully have fixed the problem of the starting number being offset.  I am still investigating the problem of TS's and KS's not moving with the insert.

In the mean time here is a workaround.  Please test it with your complex score.

Use either the Select Tool or Measure Tool and select the measure stack where the insert will be.  Right click and manually insert a measure stack of the appropriate number of measures.  This method shifts all things correctly.  Invoke the attached revised temporary script and enter the correct number of measures and starting point.  The script will not do the insert, but will adjust the measure number regions correctly now, I hope.  I will revise the script when I have worked out the problem with the insert.  Thanks for bearing with me.  Report any problems.

PS:  script file has been deleted.  See below for latest and greatest version 2.1.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/25/2015 10:14:58 AM (GMT-5)


Posted By : Charles Lawrence - 3/11/2015 11:38 AM
Try the workaround posted above.  Thanks.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Vaughan - 3/14/2015 4:00 AM
Hi Charles. This latest version worked very well. It's not a big deal to insert the measures manually first and then to run the plugin and it's MUCH less work than having to change all the measure numbering regions by hand. Would it be difficult to make a version of your lua script for deleting measures?


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/14/2015 9:01 AM

Vaughan,

I'm glad to hear that it worked OK after manually inserting the measures.  I don't know why the JW Lua does not handle that operation correctly.  I have a question in on Jari's site to address this.  In the mean time, if you need it again, just do the insert manually.

I will work on a script to delete measures as well.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Vaughan - 3/14/2015 6:59 PM
Thanks, Charles. Those scripts are great additions to our arsenal of extremely useful plugins!


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Motet - 3/15/2015 2:18 AM
I will definitely make use of it--thanks.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Charles Lawrence - 3/16/2015 4:44 PM
As a heads up, I apologize for taking so long to get the delete measure script to work.  I have not been able to put a lot of time into it lately, but I can report that deleting is much more complex than adding, especially if the delete starts in one region and the delete measure count spans over into one or more downstream regions.  I am working on it, and am confident that I will eventually design the correct algorithm.  I am also combining both insert and delete into one script.  You decide whether to insert or delete the measures.  I will report back.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Vaughan - 3/17/2015 4:55 AM
Brilliant, Charles! I really appreciate your efforts. If the number of measures to delete doesn't span more than one region, is it still more difficult to create an algorithm?


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/20/2015 8:17 AM

Yes, the delete functionality would be much easier to implement if the delete span was contained within a region, but I don't think this artificial restriction should be imposed.  I want it to be complete.

[Progress Report]  I now have it so that the script will correctly insert and delete measures and appropriately move the other measures either downstream or upstream.  I was so close to having the delete worked out, even across region boundaries, but now my code for some reason is causing Finale to lock up busy with no control left.  mad Darn it! mad  The only recourse is to close down Finale, wait a few minutes, and restart Finale.  This situation is very frustrating since JW Lua does not as yet have a debugger, and I haven't been able to pin down the culprit.  I am hell bent on getting this thing completed!

BTW, would an option to perform note spacing after the insert/delete be useful.  In my testing, sometimes the score is left in a state where note spacing will clean it up.  I know that some users prefer to postpone such actions until the last step in their workflow.

More to come.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Motet - 3/20/2015 11:02 AM
Charles, thanks for tackling this. I look forward to the final version.

If you do have the script perform note spacing or other post-processing perhaps make it an option rather than an unspoken side-effect. Not only do some users prefer to postpone such actions, but some deliberately turn it off to avoid undoing manual tweaking.

The use I have for this is that I set up the scaffolding of all the measure regions, key- and time-signature changes, piece numbers, etc., before entering any music. But if when then entering music I discover I had miscounted, I need to add or remove measures. This is always going to be within a single region, never spanning two. One could always do it in two chunks if it did span.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Vaughan - 3/20/2015 6:09 PM
I have the same. I don't need to delete measures across two measure numbering regions and, while I can understand your desire to design a script which works in all situations, I would prefer to have the limitation of removing measures only within regions than not at all. Besides, as Motet said, one could easily perform the action twice, once within each region. I also agree with Motet in not needing the Luca script to respace, or at least to present it as an option. Often I've already done spacing (and tweaking) and Finale's default spacing would screw that up. Interesting that just deleting measures the 'old fashioned' way usually doesn't affect the spacing of the measures after that. Once again, thank you Charles for putting so much time and effort into this!


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/22/2015 11:09 AM

Thanks Vaughan and Motet for your feedback.  It is very helpful.  I have reconsidered, and will now concentrate on deleting measures only within any existing measure number region.  I will give a warning if the delete span crosses a measure number region boundary and set the end measure in the user input dialog box to the region end boundary.  As you have pointed out, if more measures need to be deleted in another region, the script can be run again.  Of course, any post operation note spacing will be as a user option.

I have been away for the past several days and will now get back on this project.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Motet - 3/24/2015 3:30 PM
Charles,

Instead of having the user type in a measure number for the insertion/deletion point, it would be nice if you could get it from the current selection. I use "show defined measure numbers," so would have to change that setting to discover the actual measure number.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Motet - 3/24/2015 3:41 PM
So, I tried it. Is it actually supposed to insert measures? It changes the region definitions but I don't see any new measures.

(Also, the processing time reported it not right--I'm seeing numbers on the order of 8 seconds, 12 seconds, but in fact it's less than a second.)


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Charles Lawrence - 3/24/2015 4:02 PM

Motet,

That can be done.  idea I had already thought that would be a better way to do it, but have not implemented it yet.  Are you suggesting the script get the actual measure number as opposed to the defined measure number, even if defined measure numbers are selected?  What actually is the difference?

To everyone interested,

I have finally completed my script.  Whew!  It has been a chore.  Notice the name change.  I have tested every conceivable scenario that I could think of, until I am "blue in the face".  I know from my work as a professional programmer that it is all but impossible to design for every contingency.  Sometimes, you can't see the forest for the trees.  Please give the attached JW Lua script a thorough bashing and try to uncover any anomalous behavior.  Any feedback, such as Motet's suggestion above, will be welcomed.  If you have used the Manager in the JW Lua plug-in to add the script to the menu, please remove any old versions and add this latest version 2.0.  Old versions should be deleted.

Thank you for your patience.  Enjoy!

I thought I would go ahead and release this 2.0 version now and add Motet's suggestion to a later version 2.1 to come out soon.

PS: script file version 2.0 deleted.  It has been replaced with version 2.1.  See below


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/25/2015 10:12:40 AM (GMT-5)


Posted By : Motet - 3/24/2015 4:10 PM
Looks like the latest inserts the measures--thanks.

I was suggesting that, rather than type in the measure number of the insertion point, the user make the selection before running the script. For inserting, you'd still have to say how many measures to insert, but for deleting, the selection defines everything. This is analogous to the way the rest of the Finale UI and most plug-ins work. Likely there's a call available to JW Lua to get the current selection.

"Defined" measure numbers have a region number and a measure number within the region, for example 7:91 would be measure 91 in region 7. The actual measure number might be something like 802. Not a big deal, but the distinction wouldn't even be necessary with the above "selection" suggestion.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Motet - 3/24/2015 5:23 PM
I hasten to add, though, that it's great already. Thanks so much.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Vaughan - 3/25/2015 6:42 AM
Brilliant, Charles! I just used it after deleting measures in a score. I did have to do the deletions first by hand and then run the script. I didn't try inserting measures. Just wondering, why does the script insert measures but not delete them? BTW, I didn't have any deletions over more than one measure numbering group. As Motet mentioned, it would indeed be handy if the script could determine which measures were selected for deletion but it's no big deal to remember how many measures need deleting and to input the measure number after the deletion point. I always have Display Actual Measure Numbers selected. Anyway, even with these steps, the script worked perfectly and was much easier than having to edit all the measure numbering groups or delete them all and have to create them anew. Thank you!


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Vaughan - 3/25/2015 6:54 AM
P.S. I just tried inserting measures and the script does it perfectly, including changing the measure numbering regions afterwards and not affecting anything else (unless the option to respace is selected). I still can't get it to delete measures, though.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/25/2015 7:54 AM

Vaughan,

It is puzzling that the script does not delete measures for you.  Of course, in my exhaustive testing of every scenario I could think of, both insert and delete worked OK.  I am on Windows, so maybe it is a Mac thing.  I do not have a Mac to test on, so I will bounce that off Jari and see.

BTW:  I have finished implementing the select range interface, but still have a problem in the script if there are no measure number regions in the document.  Hope to have that worked out soon.

Could you supply a test document where delete does not work for you?  Thanks.

PS:  There is a DEGUG flag in the code that prints out some information in the JW Lua plug-in so I could see what was happening.  You may not want to see these messages.  I forgot to turn the flag off when I released the scriptopen the script and set the flag DEBUG = false if you prefer.  These messages will not show if you run the script from the menu.

PPS:  I don't think it matters to JW Lua whether the measures are displayed in actual or defined numbers.  It always works in actual numbers, AFAIK.  When I looked at this in my test document, not all the measures showed in defined numbers (R:M) when that option was chosen.  Strange?


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/25/2015 8:05:07 AM (GMT-5)


Posted By : Vaughan - 3/25/2015 8:03 AM
Hi Charles,
Thanks for your response. I just tried it on a random file (I made sure all was correctly filled in and that there was a measure numbering region) and got the following message. Does this help?

Running [InsertDeleteMeasures] ======>
spanStart 7 spanEnd 8 opCount 2
Before Delete Measure Number Regions Count 1
Before Delete Number of measures 46
After Delete Number of measures 44
[string "function plugindef()
..."]:218: attempt to call global 'eachbackwards' (a nil value)
<======= [InsertDeleteMeasures] FAILED.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/25/2015 8:13 AM
Yes, Vaughan, that helps a lot.  That means you need to download the latest JW Lua plug-in beta 0.31.  You are using an earlier version that does not implement the "eachbackwards" iterator.  I am sorry I forgot to mention that when I released the script.  Anyone trying to use this script needs beta 0.31 installed.  Oops!
 
BTW, if you look at the very top of the script, you will see a reference to the minimum version level the script requires.  Too bad, JW Lua will not alert you to this.  Maybe in a future release from Jari.

Please do try to break the script.  I have included some checks on the user input values.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Vaughan - 3/25/2015 9:20 AM
Success! What a timesaver this script is! I'm eternally grateful (or grateful as long as I'm using Finale). This should really be made known to all users; I can imagine that a lot of people working on large scores would find this indispensable. I'll put it through the wringer as often as I can and report back! Thanks again, Charles.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/25/2015 10:01 AM

Vaughan, et al.,

Please find attached my script version 2.1.  It implements the selected range interface suggested by Motet, and fixes every problem I have encountered in debugging.

Enjoy!

Please delete all previous versions of this script.  If you set version 2.0 to run from the menu, you should not have to do that again, as 2.1 has the same name.

Version 2.1 superseded by version 2.2, which correctly checks for the required minimum JW Lua version.  No other changes were made.


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Post Edited (Charles Lawrence) : 3/27/2015 6:25:19 PM (GMT-5)


Posted By : Ralph L. Bowers Jr. - 3/25/2015 10:17 AM
Are you going to post this on the "Plugin Development" ?

Thank you Charles.....this needs a wider audience.


Finale 2010b, 2011b, 2012c, 2014d TGTools Pro, Patterson plugins, JW plugins (current)
Sibelius 6.2, 7.1.3, 7.5.1, Write Score Sound Sets, Bob Zawalich plugins, Dolet 6.4
Print Music 2004, 2010a, 2011a, 2014a
Progression, Progression 2, Notion 4, [Notion 5, (bought but not installed)]
Pro Tools 9.5, Reaper
Kontakt 5
GPO4, World Instruments
Smart Score Pro X , PhotoScore Ultimate 6 & 7 ( 7 has some utility----best of those available)
M-Audio "Oxygen 25" Midi input keyboard (recent addition 2014)
Systems (4) // Windows XP Pro, [email protected] Windows 7 Pro, 8.1 Pro, 64 bit, 4GB - 16GB RAM
Paper & Pencil

BMus, MM (Musicology)


Posted By : Motet - 3/25/2015 11:23 AM
Charles Lawrence said...

PPS: I don't think it matters to JW Lua whether the measures are displayed in actual or defined numbers. It always works in actual numbers, AFAIK. When I looked at this in my test document, not all the measures showed in defined numbers (R:M) when that option was chosen. Strange?

Apparently if the defined measure number exists in only one region (e.g., at the end of longest region), then Finale drops the R: from the display. Strange, indeed--I don't like it.

I tried the latest using a selection and it worked fine. I didn't have to switch options to find out what the actual measure number is. Thanks, again--I will make use of this.


Finale 2011b, 2005, TGTools
Windows 7, MIDI input
Finale Transposition Chart


Posted By : Vaughan - 3/26/2015 4:59 AM
Thank you, Charles. Inserting and deleting measures in a file with numerous measure numbering regions is now easy and quick and, AFAICS, problem-free.


Vaughan

Finale 3.2 - 2014d, Sibelius 4 - 7
Tobias Giesen's plugins, full version, Robert Patterson plugins, Dolet 6 plugin
MacOS 10.10.2
MacPro 6GB, MacBookPro (2011) 8GB

Amsterdam


Posted By : Charles Lawrence - 3/26/2015 8:34 AM

Vaughan et al.,

I'm glad you and others find it useful.  It took a while to get it all worked out, but it was worth it.  There still may be problems, but for most work, it will do the job.  If you do run up on anything problematic in your work, let me know.

Thanks, and enjoy!


"Anything is possible if you don't know what you are talking about!"

 

Intel(R) Core(TM) i7-5930K CPU with 6 dual core processors @ 3.50 GHz (12 threads)

Realtek High Definition on board audio
NVIDIA GeForce GTX 980 GPU with 4GB ram

512 GB SSD

Four 4TB and one 1TB internal SATA HD's
Microsoft Windows 8.1 Professional with Media Center x64 Edition, (06.03.9600.00)
Finale versions: 2011b.r2, 2012c.r13, 2014d.v5030

GPO4.02

 

Cakewalk SONAR X3

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell


Posted By : Harpsi - 10/1/2015 9:08 AM
Charles,

Thank you so much for writing this fantastically useful script. I just tried for the first time and it is really great!

One small thing though. In the DB where I choose Add or Delete measures, I get kanji signs instead of letters. Maybe this has to do with my localization settings (Sweden)?


Finale 2014d, Win 10, Korg M1, Oxygen 25