[JW Lua] [JWplugins] replace custom notehead

Joseph Weidinger jsphweid at gmail.com
Thu Jul 9 21:05:23 CEST 2015


Hmm. not sure how or why we got off the list. I wonder if my gmail does
that by default. Anyways. Yeah, and you can just keep doing as you did. I
was about to make a solution where it would all be in one line with tables
but just sending the command twice with different numbers is obviously the
best way to go about it in this case. JW Lua is very exciting. I agree!

On Thu, Jul 9, 2015 at 1:47 PM, shirling at newmusicnotation.com <
shirling at newmusicnotation.com> wrote:

>  YEAAAAAAAAHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!
>
> and i just add lines for the other notehead replacements i want,
> YEEEEAAAAAHHHHHHH!!!! just checked and it worked (after fixing a line wrap
> caused by one of our email programmes or the server).
>
> that is *&^@$%#$ amazing (pardon the newby enthusiasm :-) )
>
> Also, what do you mean 4-5 changes to make? You mean 222 should be 180,
> 241 should be 112, 138 should be 85?
>
> exactly, that sort of thing, changing the slot number for notehead A in
> font A to the correct slot number for notehead A (same symbol) in font B,
> etc.
>
> thanks joseph!
>
> (oh, i just noticed the default setting is to reply to the sender, not the
> list... or did you take this off-list intentionally?  either way, thanks, i
> am very excited about this.)
>
> ===========
>
> function plugindef()
>     finaleplugin.RequireSelection = true
>     finaleplugin.CategoryTags = "Noteheads"
>     return "Correct Noteheads", "Correct Noteheads", "Correct Specified
> Noteheads"
> end
>
> function switchNoteHeads(current, new)
>     for entry in eachentrysaved(finenv.Region()) do
>         if entry:IsNote() then
>             for note in each(entry) do
>                 local notehead_current = finale.FCNoteheadMod()
>                 local notehead_new = finale.FCNoteheadMod()
>                 notehead_current:LoadAt(note)
>                 if notehead_current.CustomChar == current then
>                     notehead_new.CustomChar = new
>                     notehead_new:SaveAt(note)
>                 end
>                end
>         end
>     end
> end
>
> switchNoteHeads(222, 180)
> switchNoteHeads(207, 208)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150709/febbd555/attachment-0002.html>


More information about the JWLua mailing list