Skip to content

Commit

Permalink
chore: autopublish 2024-08-12T13:14:45Z
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 12, 2024
1 parent 8a2c7e5 commit 0d67cca
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 23 deletions.
7 changes: 7 additions & 0 deletions dist/articulation_autoposition_rolled_chords.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ package.preload["library.articulation"] = package.preload["library.articulation"
end
return text_mets:CalcWidthEVPUs(), text_mets:CalcHeightEVPUs()
end

function articulation.reset_to_default(artic, artic_def)
artic_def = artic_def or artic:CreateArticulationDef()
artic.StackingMode = finale.ARTICSTACKING_USEDEFINITION
artic.PlacementMode = finale.ARTICPLACEMENT_AUTOMATIC
artic:ResetPos(artic_def)
end
return articulation
end
function plugindef()
Expand Down
24 changes: 14 additions & 10 deletions dist/articulation_reset_auto_positioning.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function plugindef()
finaleplugin.Author = "Robert Patterson"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Version = "1.0.1"
finaleplugin.Date = "February 28, 2020"
finaleplugin.Version = "1.1"
finaleplugin.Date = "July 29, 2024"
finaleplugin.CategoryTags = "Articulation"
finaleplugin.MinFinaleVersionRaw = 0x1a000000
finaleplugin.MinJWLuaVersion = 0.58
Expand All @@ -23,27 +23,31 @@ logic to manage the stacking context.
}
]]
finaleplugin.HashURL = "https://raw.githubusercontent.com/finale-lua/lua-scripts/master/hash/articulation_reset_auto_positioning.hash"
return "Reset Automatic Articulation Positions", "Reset Automatic Articulation Positions", "Resets the position of automatically positioned articulations while ignoring those with manual positioning."
return "Reset Automatic Articulation Positions", "Reset Automatic Articulation Positions",
"Resets the position of automatically positioned articulations while ignoring those with manual positioning."
end
local articulation = require("library/articulation")
function articulation_reset_auto_positioning()
for note_entry in eachentry(finenv.Region()) do
local articulations = note_entry:CreateArticulations()
for articulation in each(articulations) do
for artic_assign in each(articulations) do
local articulation_def = finale.FCArticulationDef()
if articulation_def:Load(articulation.ID) then
if articulation_def:Load(artic_assign.ID) then
local do_save = false
if articulation_def.CenterHorizontally then
articulation.HorizontalPos = 0
artic_assign.HorizontalPos = 0
do_save = true
end
if finale.ARTPOS_MANUAL_POSITIONING ~= articulation_def.AutoPosSide then
local save_horzpos = articulation.HorizontalPos
articulation:ResetPos(articulation_def)
articulation.HorizontalPos = save_horzpos
local save_horzpos = artic_assign.HorizontalPos
local save_flip = artic_assign.PlacementMode
articulation.reset_to_default(artic_assign, articulation_def)
artic_assign.HorizontalPos = save_horzpos
artic_assign.PlacementMode = save_flip
do_save = true
end
if do_save then
articulation:Save()
artic_assign:Save()
end
end
end
Expand Down
12 changes: 6 additions & 6 deletions dist/articulation_reset_positioning.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function plugindef()
finaleplugin.Author = "Robert Patterson"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Version = "1.0.1"
finaleplugin.Date = "February 28, 2020"
finaleplugin.Version = "1.1"
finaleplugin.Date = "July 29, 2024"
finaleplugin.CategoryTags = "Articulation"
finaleplugin.MinFinaleVersionRaw = 0x1a000000
finaleplugin.MinJWLuaVersion = 0.58
Expand All @@ -25,13 +25,13 @@ logic to manage the stacking context.
finaleplugin.HashURL = "https://raw.githubusercontent.com/finale-lua/lua-scripts/master/hash/articulation_reset_positioning.hash"
return "Reset Articulation Positions", "Reset Articulation Positions", "Resets the position of all selected articulations."
end
local articulation = require("library/articulation")
function articulation_reset_positioning()
for note_entry in eachentry(finenv.Region()) do
local articulations = note_entry:CreateArticulations()
for articulation in each(articulations) do
local artic_def = articulation:CreateArticulationDef()
articulation:ResetPos(artic_def)
articulation:Save()
for artic_assign in each(articulations) do
articulation.reset_to_default(artic_assign)
artic_assign:Save()
end
end
end
Expand Down
7 changes: 7 additions & 0 deletions dist/note_automatic_jete.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ package.preload["library.articulation"] = package.preload["library.articulation"
end
return text_mets:CalcWidthEVPUs(), text_mets:CalcHeightEVPUs()
end

function articulation.reset_to_default(artic, artic_def)
artic_def = artic_def or artic:CreateArticulationDef()
artic.StackingMode = finale.ARTICSTACKING_USEDEFINITION
artic.PlacementMode = finale.ARTICPLACEMENT_AUTOMATIC
artic:ResetPos(artic_def)
end
return articulation
end
package.preload["library.utils"] = package.preload["library.utils"] or function()
Expand Down
7 changes: 7 additions & 0 deletions dist/pitch_transform_harmonics_fifth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ package.preload["library.articulation"] = package.preload["library.articulation"
end
return text_mets:CalcWidthEVPUs(), text_mets:CalcHeightEVPUs()
end

function articulation.reset_to_default(artic, artic_def)
artic_def = artic_def or artic:CreateArticulationDef()
artic.StackingMode = finale.ARTICSTACKING_USEDEFINITION
artic.PlacementMode = finale.ARTICPLACEMENT_AUTOMATIC
artic:ResetPos(artic_def)
end
return articulation
end
package.preload["library.transposition"] = package.preload["library.transposition"] or function()
Expand Down
7 changes: 7 additions & 0 deletions dist/pitch_transform_harmonics_fourth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ package.preload["library.articulation"] = package.preload["library.articulation"
end
return text_mets:CalcWidthEVPUs(), text_mets:CalcHeightEVPUs()
end

function articulation.reset_to_default(artic, artic_def)
artic_def = artic_def or artic:CreateArticulationDef()
artic.StackingMode = finale.ARTICSTACKING_USEDEFINITION
artic.PlacementMode = finale.ARTICPLACEMENT_AUTOMATIC
artic:ResetPos(artic_def)
end
return articulation
end
package.preload["library.transposition"] = package.preload["library.transposition"] or function()
Expand Down
7 changes: 7 additions & 0 deletions dist/pitch_transform_harmonics_major_third.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ package.preload["library.articulation"] = package.preload["library.articulation"
end
return text_mets:CalcWidthEVPUs(), text_mets:CalcHeightEVPUs()
end

function articulation.reset_to_default(artic, artic_def)
artic_def = artic_def or artic:CreateArticulationDef()
artic.StackingMode = finale.ARTICSTACKING_USEDEFINITION
artic.PlacementMode = finale.ARTICPLACEMENT_AUTOMATIC
artic:ResetPos(artic_def)
end
return articulation
end
package.preload["library.transposition"] = package.preload["library.transposition"] or function()
Expand Down
15 changes: 15 additions & 0 deletions docs/library/articulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [delete_from_entry_by_char_num(entry, char_num)](#delete_from_entry_by_char_num)
- [is_note_side(artic, curr_pos)](#is_note_side)
- [calc_main_character_dimensions(artic_def)](#calc_main_character_dimensions)
- [reset_to_default()](#reset_to_default)

### delete_from_entry_by_char_num

Expand Down Expand Up @@ -57,3 +58,17 @@ Uses `FCTextMetrics:LoadArticulation` to determine the dimensions of the main ch
| Return type | Description |
| ----------- | ----------- |
| `number, number` | the width and height of the main articulation character in (possibly fractional) evpus, or 0, 0 if it failed to load metrics |

### reset_to_default

```lua
articulation.reset_to_default()
```

[View source](https://github.com/finale-lua/lua-scripts/tree/refs/heads/master/src/library/articulation.lua#L84)

Implements all calls necessary to reset the articulation to default positioning. These settings achieve
the same result as hitting the Clear key for the Articulation in the Finale UI.

@artic (FCArticulation)
@artic_def (FCArticulationDef) optional definition for this articulation (calculated if not supplied)
2 changes: 1 addition & 1 deletion hash/articulation_autoposition_rolled_chords.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
47cc1a393c0a5ace6ee580fd0d911cf7602e072fc557b0a0a2e8a93d785a21d1efb35e29fe065eef8ad01bfc73c7315cade87eeb1d51a5f342859a9bcc45c4b3 articulation_autoposition_rolled_chords.lua
3f240c15b9d06b603b35d08e5c755724ea1e34fa5d6a6c7e4eb061c580484883e86339379d660edd87c492187faa1bc6b81b109bf6a74ada8ad960c9f44a9c80 articulation_autoposition_rolled_chords.lua
2 changes: 1 addition & 1 deletion hash/articulation_reset_auto_positioning.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9fe5b834d0183b9f153436421b0b7f1420ed96e0d875867d84f4e4936d1148fac71c9d7fb9f76e3ea115889a8e0e1f19fab8c2a9fa4361da17ef652ee07580df articulation_reset_auto_positioning.lua
a4c59e5d267b3d1045887304d9aa5c3421af5bf119b5b0f4ee87de9918ab7ece31d74f208ee56b129d479d80526790e2df883e24698e7229ad2c55be29e27b34 articulation_reset_auto_positioning.lua
2 changes: 1 addition & 1 deletion hash/articulation_reset_positioning.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d3105fdf80956cda92dcb34cb7b25f023a8bdc3c32df97aec0529ab297e5a8a42473a58a20c4b89330d59b91d670af53e659e8d8b456b00c34cf62d955bbf429 articulation_reset_positioning.lua
128143ea49dcf04aeedaa4907e8e8628319e201d21d7821acc610cdc3a042ba423f7c5a0c7873bd0f813dfbaefc239e01fe8ea5f78d50f5ea69867e299ea1533 articulation_reset_positioning.lua
2 changes: 1 addition & 1 deletion hash/note_automatic_jete.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d07c89592e3b933393992a2327087863548ab231f1eefe9a493137a3003f2566d65878fcdf3f532cdf0d16eb04a65495325dff6b74decf89385421b7bb3adea note_automatic_jete.lua
978a07cfe1a0a30033ed6f63467991cc34e60e75318aa23641dcdf3a1d83e7c2e3f82f46c8820622ec7b70c321c72ae532bf153629c7fef3183f82c6d112abbd note_automatic_jete.lua
2 changes: 1 addition & 1 deletion hash/pitch_transform_harmonics_fifth.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c0e93d3f211984b254a0c72d899544058f05a2c82af10f062524f3f667e926c77e06336b59b87eb76554e97baf750c8b107c2939b66afa82941e2ec6bea49632 pitch_transform_harmonics_fifth.lua
c3522ec152be0e98dc8c058f919b27e47eb9d972eec6a2e053f56d9c18560dfb1b009547b39adbf7dce2e24a496b13efd34a2f1b1efafe67b32c05f250480151 pitch_transform_harmonics_fifth.lua
2 changes: 1 addition & 1 deletion hash/pitch_transform_harmonics_fourth.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5762e3c40a1fc46b29579a03bcf511518427efb70b9fdb32bc3a9da66855cb447dece019000e679a6bad41ef783ee0fff6cc48e5e0ec8dc70a6d540d6b43499b pitch_transform_harmonics_fourth.lua
3d80042901dd5e290554ddf09a3ae45035c0b2fc824c27e45839429c7a0f476f262a61e4c62ace2916811a7c2d79aec29b2fdcae14990296ba6a6f68640d11a0 pitch_transform_harmonics_fourth.lua
2 changes: 1 addition & 1 deletion hash/pitch_transform_harmonics_major_third.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9252227ee32a072913681750878c4d9b72e15fa249d3a9a143c1a4bc3e07dd7e7aeb9f36dc1f1cef7462a7f1573ea39a7c29ed4c7bedb46bb0405fafc59b680a pitch_transform_harmonics_major_third.lua
40db99b3f1f6db493695521a9d6abe7207a103f9dd06989f75a7c72463b4a04ff372518f0836c541019d1655e17551877656b7c69e263a35d11a691021189516 pitch_transform_harmonics_major_third.lua

0 comments on commit 0d67cca

Please sign in to comment.