[JW Lua] FCBaseline Load for System?

Bart Visser bartvisser at me.com
Fri Aug 14 20:12:03 CEST 2015


Hi,

I've run into the same problem but didn't take the time to dig deeper. Even if I create a baseline manually for a staff, it returns nil. My code:


local bls = finale.FCBaselines()
bls:LoadAllForSystem(systemNo, finale.BASELINEMODE_LYRICSVERSE)
-- bls == nil

-- since bls == nil, this doesn't work either
local firstBaseline = bls:FindLyricNumber(1, 1)
 
So no help from me I'm afraid...

Bart



> Op 14 aug. 2015, om 19:19 heeft Jan Angermüller <jan at angermueller.com> het volgende geschreven:
> 
> Hi Jari + Bart,
> 
> I have tried to the do same as Bart below ( set baseline of 1st verse on staff system x on staff y to value z ) with the method you, Jari,  suggested below.
> It works fine if an individual baseline already existed on that staff (i.e. if it was created manually before).
> But it fails if the specific staff baseline didn't exist (i.e. if it had the value zero, or in other words: if it used the default baseline on that staff): then FindLyricNumber returns nil.
> 
> In this case I would need an FCBaseline:SaveNew(staffsystemno,staffno) method to create this new baseline.
> Or FindLyricNumber would have to return a baseline with the vertical offset 0.
> 
> Or am I missing something ?
> 
> All the best,
> Jan
> 
> 
> Am 09.07.2015 um 18:27 schrieb Jari Williamsson:
>>> I'm fiddling around with the FCBaseline-class. I'm looking for a way to set the baseline-offset for a certain verse/chorus/section on a per-system basis. So for example:
>>> 
>>> - Set baseline of 2nd chorus on staff system 10 to x
>>> 
>>> I'm able to set the offset on a global and per-staff basis. Would it be possible to add a SetSystem-method (since there is a GetSystem...).
>> 
>> The easiest way is to use the FCBaselines collection class and load all system-specific baselines in one go:
>> 
>> ---
>> local bls = finale.FCBaselines()
>> bls:LoadAllForSystem(1, finale.BASELINEMODE_LYRICSVERSE)
>> ---
>> 
>> After that you can search for the specific lyric basline with FindLyricNumber(staffno, lyricno).
> 
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list