New Lua Scripting Engine

Lua Book

Anyone using NWC version 2.51 or later now has a built-in user tool scripting engine, with no extra download/install sequence required. Version 2.51 introduces a built-in Lua scripting engine that integrates a basic API for handling user tool input and output processing. Every copy of NoteWorthy Composer 2.51 includes two new user tools, found in the new .Automatic section of the User Tools command:

  1. Show Note Names.lua
    This returns a list of note names for the current selection. This is primarily intended as a demonstration of the Lua scripting engine.
  2. Retrograde.lua
    Like the PHP based user tool kit before it, this was the first Lua based user tool while version 2.51 was in development. It will reverse the notes in a selection, which can sometimes be inspiring when working with a composition.

There are several online resources that can help with getting started with your own Lua scripts:

  • The new API available from within a Lua based user tool is currently documented online at: lua.noteworthycomposer.com.
  • Much of the NWC Lua API is actually written in Lua. It can be explored from our gist on github.

Broken Toolbar Icons After Upgrade

MissingToolbarCommand

After upgrading NoteWorthy Composer to version 2.51, you may encounter several images that depict a question mark with the text ERR, as shown here. These icons depict old commands from version 2.50 that no longer exist. The old Insert toolbar contained a series of items that could quickly be added to the current staff simply by clicking the button from the Insert toolbar. These hard coded buttons have been replaced by user customizable selectors that can contain a single item, or a large collection of items.

If your see something like this after upgrading, there are several alternatives to remove the now missing tools from your toolbar setup.

  1. If you want to maintain your custom changes to the toolbars, then you need to revisit your toolbar customizations and delete the commands that are no longer available. This is done by starting at View, Toolbars, then click the Customize button. The missing tools are probably on the Insert toolbar, which needs to be selected from the Toolbar dropdown box. The Active tools list will show all of the commands in the selected toolbar. You can select any commands that are labelled as ##Unknown## and press the button that shows as <–. This will remove the missing tool from that toolbar. You can also just double click them.
  2. If you have only made modest changes to the default toolbar setup in the prior 2.5 version, you might just want to reset your toolbars to the defaults. This is done by starting at View, Toolbars, then click the Customize button. The Restore Defaults button will reset your toolbars to the new version 2.51 defaults.