Finale SmartMusic
  Home | Log In | Register | Search | Help
   
MakeMusic Forum > Public Forums > Plug-In Development - FORUM HAS MOVED! > JW Lua - preview  Forum Quick Jump
 
You cannot post new topics in this forum. You cannot reply to topics in this forum. Printable Version
[ << Previous Thread | Next Thread >> | Show Newest Post First ]

Jari Williamsson
Registered Member

Click to send Jari Williamsson email.Click to visit Jari Williamsson's website.Send a Private Message to Jari WilliamssonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 1998
Total Posts : 3246
 
   Posted 7/30/2013 4:14 PM (GMT -5)    Quote This PostAlert An Admin About This Post.
I'm hooking up my PDK Framework to the Lua script language (so you can write your own plug-ins in Finale), and the early tests seem to work perfectly. The code below is an example of a fully functional plug-in task. Look and see if you can understand what the script does:
----
region = finale.FCMusicRegion()
region:SetCurrentSelection()
measures = finale.FCMeasures()
measures:LoadRegion(region)
for measure in each(measures) do
measure.Width = measure.Width * 110 / 100
end
measures:SaveAll()
---


Jari Williamsson

Windows XP, Pentium 4
2.40 GHz, 4 GB RAM

www.finaletips.nu - The Finale Productivity Tips site

Back to Top

LO
Registered Member



Click to send LO email.Click to visit LO's website.Send a Private Message to LOAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2004
Total Posts : 65
 
   Posted 7/31/2013 4:46 AM (GMT -5)    Quote This PostAlert An Admin About This Post.
Hi Jari,
this is a great idea!!! The code is understandable for me and - if we would get some examples more - I believe for many other users. Sometimes I have tried to produce Plugins with several FIN PDKs, but never had success, though I got support by Thomas Giesen. This could be the beginning of a new area...
Do you think LUA will allow us also to use dialogs for the data input?

Thank you for your plan and regards
LO


Lothar

Intel i5-3570, 3,4GHz QuadCore
RAM: 8 GB OS: Win 8 64 Bit
Finale 3.5 - 2012r3 / TGTools full / Smartscore X Prof.
Germany

www.lothars-music-edition.com

Back to Top

Jari Williamsson
Registered Member

Click to send Jari Williamsson email.Click to visit Jari Williamsson's website.Send a Private Message to Jari WilliamssonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 1998
Total Posts : 3246
 
   Posted 7/31/2013 12:55 PM (GMT -5)    Quote This PostAlert An Admin About This Post.
LO said...
Do you think LUA will allow us also to use dialogs for the data input?


Lua will basically support whatever I choose to support, and I plan to provide dialog support through the PDK Framework methods later on. Lua is very different to other script languages, as it's designed to be an embedded "glue" language. (It's also extremely fast compared to other script languages, that's why it's used in lots of large games, for example.) My PDK Framework is designed to be easily scriptable, and for Lua the cost on my part is extremely small to make efficient scripting happening. The PDK Framework documentation will be used as the script documentation as well, I'll later provide information in a wiki on how to read the PDK Framework documentation from a scripting point of view. (In the future, I might also write tasks in my larger C++ plug-ins directly as embedded Lua.)

I'll also soon start a separate mailing list for all topics regarding using the script plug-in.

Here's another fully featured plug-in example. It browses through each part (including the score view) of a document, loads the first page of each part, and makes sure that the width/height/percent are identical on all subsequent pages in each part:


allparts = finale.FCParts()
allparts:LoadAll()
for apart in each (allparts) do
    apart:SwitchTo()
    pageone = finale.FCPage()
    pageone:Load(1)
    allpages = finale.FCPages()
    allpages:LoadAll()
    for apage in each(allpages) do
        if apage.ItemNo > 1 then
            apage.Width = pageone.Width
            apage.Height = pageone.Height
            apage.Percent = pageone.Percent
            apage:Save()
        end
    end
    apart:SwitchBack()
end


Jari Williamsson

Windows XP, Pentium 4
2.40 GHz, 4 GB RAM

www.finaletips.nu - The Finale Productivity Tips site

Post Edited (Jari Williamsson) : 7/31/2013 6:14:53 PM (GMT-5)

Back to Top

Jari Williamsson
Registered Member

Click to send Jari Williamsson email.Click to visit Jari Williamsson's website.Send a Private Message to Jari WilliamssonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 1998
Total Posts : 3246
 
   Posted 8/1/2013 7:23 PM (GMT -5)    Quote This PostAlert An Admin About This Post.
I have now created a specific mailing list for the "JW Lua" plug-in (a plug-in to run scripts as fully-featured plug-ins in Finale), where you can discuss the plug-in, script programming, share scripts, etc.

Sign up for that mailing list at:
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu

There's now also a Wiki (still in progress) for "JW Lua" at:
http://jwmusic.nu/jwplugins/wiki/doku.php?id=jw_lua

I hope to have a first plug-in beta of "JW Lua" available for download some day next week.


Jari Williamsson

Windows XP, Pentium 4
2.40 GHz, 4 GB RAM

www.finaletips.nu - The Finale Productivity Tips site

Back to Top

Charles Lawrence
Registered Member



Click to send Charles Lawrence email.Personal Homepage Not AvailableSend a Private Message to Charles LawrenceAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Dec 2009
Total Posts : 3638
 
   Posted 8/2/2013 9:01 AM (GMT -5)    Quote This PostAlert An Admin About This Post.
This is a great idea!  Looks like this will be much more versatile and useful, and need I say bug free than the present Finalescript.
 
Thanks for all you do.


"Anything is possible if you don't know what you are talking about!"

 

Dell XPS 600, GenuineIntel Intel(R) Pentium(R) D CPU 3.00GHz [Intel64 Family 15 Model 4 Stepping 4] (2 processors)
8GB Ram
HT Omega Striker 7.1
MSI N430GT 2GB GPU
1TB x 4 internal HD's

Microsoft Windows 7 Ultimate x64 Edition, (06.01.7600.00)
Finale 2012c.r13

 

"There is a world of difference between a person who has a big problem and a person who makes a problem big." – John Maxwell

Back to Top
You cannot post new topics in this forum. You cannot reply to topics in this forum. Printable Version
   
Forum Information
Currently it is Saturday, May 28, 2022 9:53 AM (GMT -5)
There are a total of 403,820 posts in 58,165 threads.
In the last 3 days there were 0 new threads and 0 reply posts. View Active Threads