[JW Lua] FCNoteEntry:CopyEntryDetails - copytuplets without effect

Jan Angermüller jan at angermueller.com
Wed Jan 28 21:01:07 CET 2015


Jari,

below is a function that copies note entries within a partial measure
from layer x to layer y. It works fine so far - even with tuplets.

But I don't understand what influence the "copytuplets" parameter
has in FCNoteEntry:CopyEntryDetails.
If I set it to true (and there are tuplets in the measure), it still
creates no tuplet information, and even the IsPartOfTuplet()
returns false while in the original note entries it returns true.

The tuplet information is created afterwards with CloneTuplets
(and works fine).
So I think the "copytuplets" parameter currently has no effect.

Best regards,
Jan

function 
CopyNotesFromPartialMeasureLayerToLayer(sourcelayer,destlayer,sourcestaff,deststaff,measure,startmeasurepos,endmeasurepos)
     local 
sourceentrylayer=finale.FCNoteEntryLayer(sourcelayer-1,sourcestaff,measure,measure)
     sourceentrylayer:Load()
     local 
destentrylayer=finale.FCNoteEntryLayer(destlayer-1,deststaff,measure,measure)
     destentrylayer:Load()
     local lastentry=NULL
     for e in each(sourceentrylayer) do
       if (e.MeasurePos>=startmeasurepos)
          and (e.MeasurePos<=endmeasurepos) then
         e2=destentrylayer:InsertEntriesAfter(lastentry,1,false)
         e2:CopyNotes(e)
         e2:CopyEntry(e)
         e2:CopyEntryDetails(e,true)
         print(e2:IsPartOfTuplet(),e:IsPartOfTuplet())
         e2.Legality=true
         lastentry=e2
       end
     end
     destentrylayer:Save()
     destentrylayer:CloneTuplets(sourceentrylayer)
     destentrylayer:Save()
end

CopyNotesFromPartialMeasureLayerToLayer(1,3,1,1,1,0,2047) --copies first 
two quarter notes in staff 1 measure 1 from layer 1 to layer 3

Running [Unnamed Script] ======>
false false
false true *(here a tuplet starts in the original lay**er !)*
false true
false true
false false
<======= [Unnamed Script] succeeded (Processing time: 0.008 s).




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150128/2d8279c8/attachment-0002.html>


More information about the JWLua mailing list