This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
jwlua:harpglisssample [2013/10/08 08:20] jariw |
jwlua:harpglisssample [2013/10/08 12:53] jariw [The Harp Glissando script] |
||
---|---|---|---|
Line 3: | Line 3: | ||
If you have never used //JW Lua// to run scripts before, this is a good page to start. At the bottom of the page is a full script that will automatically create a harp gliss from a 7-tuplet that you might want to test (the script works on Finale 2012 and later versions). | If you have never used //JW Lua// to run scripts before, this is a good page to start. At the bottom of the page is a full script that will automatically create a harp gliss from a 7-tuplet that you might want to test (the script works on Finale 2012 and later versions). | ||
- | This wiki page is based on beta version 0.07, but it should hopefully work with any later version as well. | + | This wiki page is based on **beta version 0.07** of //JW Lua//, but it should hopefully work with any later version as well. |
==== Step 1 - Download and Install JW Lua ==== | ==== Step 1 - Download and Install JW Lua ==== | ||
Line 14: | Line 14: | ||
==== Step 2 - Start JW Lua ==== | ==== Step 2 - Start JW Lua ==== | ||
- | Once the JW Lua plug-in has been installed and Finale has been restarted, select ''JW Lua...'' in the plug-in menu. | + | Once the JW Lua plug-in has been installed and Finale has been restarted, select //JW Lua...// in Finale's //Plug-ins// menu. |
==== Step 3 - Create a script group ==== | ==== Step 3 - Create a script group ==== | ||
+ | To organize the scripts into a workflow, a script need to be put in a group. | ||
+ | |||
+ | - Select the **Manager** page | ||
+ | - Click the **New...** button to the top right, which will open the //Edit Plug-in Group// dialog box. | ||
+ | - Enter a **Group Name** (such as "Harp Editing", "Plucked Strings", "Note Editing", "Client X", etc) where you want to put your script. | ||
+ | - Enter a **Description** with a text that is a more detailed description of what the group will contain. | ||
+ | - Leave everything else as it is and press the **OK** button. | ||
==== Step 4 - Add the script to the group ==== | ==== Step 4 - Add the script to the group ==== | ||
+ | Download the ''harpgliss.lua'' file below, if you haven't done so already. Make sure to store the JW Lua scripts at a good location on your computer. These scripts can be put anywhere on the hard drive, they don't need to be related to the Finale installation. | ||
+ | |||
+ | To add the script to the group: | ||
+ | - Make sure that the group is selected in the //top list// on the //Manager// page. | ||
+ | - Press the **New...** button next to the **bottom list**. | ||
+ | - In the dialog box that appears, locate the script on your computer and select it to add to the group. | ||
+ | |||
+ | When you exit Finale, the changes made on the //Manager// page will be saved. | ||
==== Step 5 - Refresh the plug-in list ==== | ==== Step 5 - Refresh the plug-in list ==== | ||
+ | |||
+ | Select the **Explorer** page and press the **Refresh All** button. The group should now appear with the script inside. | ||
==== Step 6 - Run ==== | ==== Step 6 - Run ==== | ||
+ | |||
+ | On the **Explorer** page, open your group container and select the script. Press the **Run** button. | ||
==== The Harp Glissando script ==== | ==== The Harp Glissando script ==== | ||
+ | |||
+ | The harp glissado script will transform 7-tuplets with seven undotted notes (of a "flagged" note duration) in the selected region into graphical harp glissando start note that spans the duration of the tuplet. | ||
+ | {{ :wiki:jwlua:jwlua-harpgliss.jpg?nolink |}} | ||
+ | |||
+ | The script will only modify staves that are defined a ''Harp'' in Finale's //Score Manager// - so if a 7-tuplet is for example found on a violin staff, nothing will be processed. It will also handle situations such as when the tuplet duration spans a half note or more. The original notes in the tuplet doesn't need to be beamed. | ||
+ | |||
+ | Note that at the very start of the script are 2 values (''StemLength'' and ''SmallNoteResize'') that you might want to modify. To do that, select the **Development** page and open/edit/save the file there. | ||
+ | |||
+ | (Click on the ''harpgliss.lua'' text to download the script.) | ||
<code lua harpgliss.lua> | <code lua harpgliss.lua> | ||
Line 90: | Line 118: | ||
if entry == nil then return false end | if entry == nil then return false end | ||
if entry:IsRest() then return false end | if entry:IsRest() then return false end | ||
- | if entry.Duration >= finale.QUARTER_NOTE then return false end | + | if entry.Duration >= finale.QUARTER_NOTE then return false end |
if entry.Staff ~= firstentry.Staff then return false end | if entry.Staff ~= firstentry.Staff then return false end | ||
if entry.Layer ~= firstentry.Layer then return false end | if entry.Layer ~= firstentry.Layer then return false end | ||
+ | if entry:CalcDots() > 0 then return false end | ||
symbolicduration = symbolicduration + entry.Duration | symbolicduration = symbolicduration + entry.Duration | ||
entry = entry:Next() | entry = entry:Next() |