[JW Lua] Setting instruments to solo mode - save functionality missing

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Fri Jul 4 08:30:59 CEST 2014


Jan,

It's the last line that's wrong. FCLayerPlaybackData (obtained by 
FCInstrumentPlaybackData:GetNoteLayerData) is not saved, since this data 
is a subrecord of the FCInstrumentPlaybackData. You still need to save 
back the data you loaded for the FCInstrumentPlaybackData object. It 
should be mentioned in the docs for FCLayerPlaybackData, I'm adding 
documentation regarding this for 
FCInstrumentPlaybackData:GetNoteLayerData() as well.

Changing the last line like this should work:

---
local InstrPlaybackData = finale.FCInstrumentPlaybackData()
InstrPlaybackData:Load(5)
local NoteLayerPlaybackData = InstrPlaybackData:GetNoteLayerData(1) 
--Read layer 1
NoteLayerPlaybackData:SetSolo(true)
InstrPlaybackData:Save()
---


Best regards,

Jari Williamsson


On 2014-05-29 17:16, Jan Angermüller wrote:
> Jari,
>
> a feature request that I had submitted to MakeMusic some time ago, would
> also be feasible with JW Lua:
> creatings sets of instrument for solo playback.
>
> For example, if I am currently working on the woodwind part of an
> orchestral score. I would like to listen quickly, for example, only to
> the flutes/oboes or all woodwinds or whatever... It is very clumsy
> setting the solo mode in score manager, especially if you want to switch
> a lot between the large instrument sets.
> So the idea would be to define instrument groups in the JW Lua plugin
> and with one macro key switch setting these instrument to solo playback.
>
> I tried this example code (on Staff 5 / Layer 1).
> But while I can get and set the solo mode, it seems like the final
> save-functionality
> is not implemented yet.
>
> local InstrPlaybackData = finale.FCInstrumentPlaybackData()
> InstrPlaybackData:Load(5)
> local NoteLayerPlaybackData = InstrPlaybackData:GetNoteLayerData(1)
> --Read layer 1
> NoteLayerPlaybackData:SetSolo(true)
> NoteLayerPlaybackData:SaveNew()    -- not working
>
> Maybe you could add that in the next release ?
>
> Have a nice day,
> Jan Angermueller
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list