[JW Lua] JW Lua to change pitch wheel value

Chris marcel.denio at gmail.com
Tue Dec 10 20:01:22 CET 2019


This script creates a pitch wheel event for each measure in the selection
(it's just to show you how to create an event)

------------
local musicregion = finale.FCMusicRegion()
musicregion:SetCurrentSelection()
if musicregion:IsEmpty() then return end

for m, s in eachcell(musicregion) do
    -- 'm' is the measure number, 's' is the staff number/ID
    local cell = finale.FCCell(m, s)
    local me = finale.FCMidiExpression()
    me:ConnectCell(cell)
    me:SetUsePitchWheel()
    me.PitchWheelValue = 1000
    me:SaveNew()
end
------------

Chris



More information about the JWLua mailing list