Finale: Getting Started With JW Lua

In my opinion, Finale is a great music notation program, and probably the most flexible one available. However, there are little quirks about the program that can cause more frustration than they need to.

That’s where plug-ins come in.

Because plug-ins are created by Finale users just like you and me to solve these quirks and make our engraving lives faster, easier, and less frustrating.

And luckily, a while back Jari Williams created JW Lua, a scripting language for efficiently coding your plug-ins. With this plug-in, several developers have started to develop custom scripts that you can start running today.

In this post, I’m going to share with you how to install and run scripts with JW Lua as well as sharing several resources for scripts.

JW Lua works on both 32-bit and 64-bit Finale.

1. Install JW Lua

The first step is to download JW Lua from

http://www.finaletips.nu/index.php/download/category/28-beta-version

There are four versions. If you use Finale 25 or later, choose the 64-bit version for your operating system. If not, download the 32-bit version for your operating system.

The installation process is the same for macOS and Windows.

  1. Unzip the file
  2. Save the .bundle in your plug-ins folder (e.g., /Library/Application Support/MakeMusic/Finale 26/Plug-ins or C:\Program Files\MakeMusic\Finale\26\Plug-ins)
  3. Restart Finale

If you have another version of Finale, it might say Finale or Finale 2014.5 instead.

Furthermore, I like to create a new folder in there to save the plug-in to make the menu bar cleaner. For me, it’s saved in /Library/Application Support/MakeMusic/Finale 26/Plug-ins/JW Lua on my Mac.

All JW plug-ins are installed this way. They are worth checking out if you don’t know about them.

2. Learn the Interface

After you restart Finale, open up JW Lua like you’d run any other plug-in. So for me, that would be Plug-ins > JW Lua > JW Lua… since I installed the plug-in within a folder named JW Lua.

First, note the three menu tabs on top: Explorer, Manager, Development. You can go through these to access different parts of the plug-in.

The Explorer tab is a quick way to find and run any scripts you’ve written without having to open up the code. We’ll learn more about this tab at the end of this post.

The Manager tab is where you can manage all of your scripts. You can put them into folders, groups, and even into the Plug-Ins menu bar.

The Development tab is the coding environment to create, modify, and test plug-ins.

So you have a complete idea of the plug-in, we’re going to start with the Development tab. Don’t worry. We won’t be coding at all, so you won’t be left behind if you can’t code. But we will load up a program here so you can get a feel for everything.

3. Run Your First Script

I’ve created a sample script for us to run. It won’t mess with your open file at all. It will just create a popup that says “I ran my first JW Lua script!”.

function plugindef()
   -- This function and the 'finaleplugin' namespace
   -- are both reserved for the plug-in definition.
   finaleplugin.MinFinaleVersion = "2010"
   finaleplugin.Author = "Nick Mazuk"
   finaleplugin.Copyright = "CC0 1.0"
   finaleplugin.Version = "1.00"
   finaleplugin.Date = "December 22, 2018"
   finaleplugin.AuthorURL = "https://nickmazuk.com"
   finaleplugin.AuthorEmail = "https://nickmazuk.com/Contact/"
   return "My First JW Lua Script", "My First JW Lua Script", "Creates a popup that says \"I ran my first JW Lua script!\""
end

finenv.UI():AlertNeutral('I ran my first JW Lua script!', NULL)

Don’t worry about what any of that means. For now, though, take that and paste it into the Development tab. It should look something like this:

Let’s run it! Click “Run Script”.

You should get a popup like this:

/Congratulations!/

You ran your first JW Lua script!

At this point, we want to save the script. If we don’t save it, we won’t be able to access the script later. We would need to copy/paste it again. That’s a hassle.

So click on where it says * Untitled.lua and then hit “< Save >”.

Find the folder you want to save it in. I like saving it in the same folder as the plug-in to keep everything in the same spot, but it can be anywhere on your disk.

As for the name, let’s do myfirstscript.lua. It can be anything you want as long as it ends in .lua.

You can open up the script again by clicking the same dropdown menu as you did to save it, hit “< Open… >”, then find the script.

4. Save Scripts in Your Menu Bar

Let’s discover the Manager tab for a bit.

Because it can be annoying to have to constantly open up this plug-in, open up the script, then run it. Wouldn’t it be easier to run the script from the plug-in menu just like a standard plug-in?

You can do this and more in the Manager tab.

In the tab, you’ll already find one plug-in group: [Menu]. Any script saved to this group will also show up in your menu bar.

Also, notice how this menu has pretty much the same controls on the top and bottom halves. The top half to organize your groups, while the bottom half is to edit each of the groups.

So click on the [Menu] group, and many of the buttons in the lower half will become enabled. Then, click “New…” on the lower half, find the script, then hit open.

And voila! You’ve added the script to the [Menu] group! Close the window, restart Finale, and you should see it in your menu bar.

Here are the steps again:

  1. Click [Menu]
  2. Click “New…” on the lower half
  3. Find the script and open it
  4. Close the JW Lua window
  5. Restart Finale

Then run the script like you would any other plug-in. And keep getting that satisfying popup all day long.

5. The Explorer Tab

If you are using a script for more than everyday use, run it in multiple documents, or access any scripts not in your menu bar without opening up the development tab, use the Explorer tab.

In the middle, you should already see a group that says [Menu]. Open it up, and you’ll see the script from earlier.

Any script that’s in any group will show up here! So the only requirement for adding scripts to this menu is t put them into a group on the Manager tab. And you already know how to do that!

As you can see, I have many scripts in my [Menu] group.

And there are four buttons on the right.

  • Run: runs the script as you’d expect
  • Run Multi…: runs the script in any of your open documents (you can select which)
  • Info…: displays all the info related to the script
  • Refresh All: if you just updated groups, use this button to refresh this tab

Here’s what myfirstluascript.lua has when you press “Info…”.

Many scripts have much more detailed info on this menu.

6. Find Scripts

While there’s much more to learn about in this plug-in, that is the basics for each menu.

So you’re now ready to start finding scripts to use yourself! The more you use the plug-in, the easier it will be to use. And the more powerful you’ll find it.

To help you get started, here are some resources to JW Lua scripts that you can use for free:

Have a great day!


Nick Mazuk is a composer and trombonist in Los Angeles. He mainly freelances by creating arrangements and original compositions for orchestra. In Finale, he specializes in automating tasks so he can achieve great results fast. Nick’s YouTube channel provides more tips and tricks for speeding up your Finale workflow.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.