[JW Lua] Staff-stuff (create, transposition, name)

Bart Visser bartvisser at me.com
Thu Apr 17 12:36:38 CEST 2014


Hi all,

I try to name a bunch of new staves with JW Lua:


local staff_names = {
	[1] = "C",
	[4] = "Bb-bas",
	[5] = "C-bas",
	[6] = "Bb",
	[7] = "Eb-laag",
	[8] = "F",
	[9] = "Eb-hoog",
}

function set_staff_names()
	local all_staves = finale.FCStaves()
	all_staves:LoadAll()
	for staff in each(all_staves) do
		current_name = staff:CreateFullNameString()
        	current_name.LuaString = staff_names[staff.ItemNo]
        	print(staff:SaveFullNameString(current_name))
	end
end

set_staff_names()

It doesn't work (keeps returning false when calling the SaveFullNameString-method). Is there a way to get this working?


Also I would like to set the transposition of each staff (interval -6, etc.). If I read the documentation correctly, this isn't possible at the moment (you can get it but not set it). Would it be possible to add this function?


And while I'm mailing about staff-stuff: is it already possible to create a staff (with all kinds of custom properties) from scratch? (This wasn't possible when I first asked a few months ago).

Thanks,


Bart Visser




More information about the JWLua mailing list