<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Robert,<br>
<br>
I have recently had a document that included seemingly "empty"
FCNoteheadMods.<br>
I.e. all options from the NoteheadMod dialog were set to the default
value. <br>
<br>
So I deleted it with nh:DeleteData(), because I thought it was an
unnecessary/corrupt FCNoteheadMod.<br>
This lead to a problem:<br>
When you do the CreateRawDataDump and list the 11th value, it may
include a "4", and 13th value may include a "13".<br>
<br>
local nu=nh:CreateRawDataDump()<br>
print(nu:GetItemAt(10).Int)<br>
<br>
If this returns 4, then the "Enharmonic" bit is activated. Otherwise
it returns 0.<br>
If you delete the FCNoteheadMod in this case, the enharmonic flip
disappears.<br>
nu:GetItemAt(12).Int sometimes returns "13". I didn't find out what
this is.<br>
<br>
As Perfect Layout wants to delete corrupt/empty FCNoteheadMods by
default, it's difficult to find out when looking at the score only:<br>
If the enharmonic flip is only in a linked part and you load the
FCNoteheadMod in the score, you won't recognize that there may be a
flip in a part.<br>
Or in other words: if you analyze the DataDump in the score, it
looks like the FCNoteheadMod doesn't make sense, because all values
are set to 0 (except the 100 resize value).<br>
<br>
My questions:<br>
- Maybe you could add the GetEnharmonic() to FCNoteheadMod?<br>
- Maybe you know what the 13 is?<br>
- Do you know if there is a simple way to decide when looking at the
FCNoteheadMod in the score whether this is a "false/empty"
FCNoteheadMod or if this is actually an unlinked FCNoteheadMod?<br>
According to my documentation there have been situations (maybe in
corrupt documents?) where false/empty FCNoteheadMods should be
deleted.<br>
Until now I did when all values where set to the default values in
the score. And I don't want to switch through all parts at that
point, if possible.<br>
<br>
Here is a test script for the attached document:<br>
local reg=finale.FCMusicRegion()<br>
reg:SetFullDocument()<br>
local parts=finale.FCParts()<br>
parts:LoadAll()<br>
for p in each(parts) do<br>
p:SwitchTo()<br>
for e in eachentry(reg) do<br>
if e.NoteDetailFlag then<br>
local nhmods=e:CreateNoteheadMods() <br>
for nh in each(nhmods) do<br>
local nu=nh:CreateRawDataDump()<br>
if nu then<br>
print(p.ID,e.Measure,e.MeasurePos,nu:GetItemAt(10).Int,nu:GetItemAt(12).Int)<br>
end<br>
end<br>
end<br>
end<br>
p:SwitchBack()<br>
end<br>
<br>
Running [Unnamed Script] ======><br>
0 1 0 0 0 --> Score: Measure 1, Pos 0, all default values (=0)<br>
0 1 2048 0 0<br>
0 2 0 0 13 --> 13 is set<br>
0 3 2560 4 13 --> 4 and 13 is set<br>
9 1 0 4 0 --> 4 is set<br>
9 1 2048 4 0 --> 4 is set<br>
9 2 0 4 13 --> 4 and 13 is set<br>
9 3 2560 0 13 --> 13 is set<br>
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).<br>
<br>
Four notes have enharmonic flips and two also have the "13" value.<br>
Three notes have the "4" in the linked part, one note has it in the
score.<br>
<br>
Jan<br>
<br>
<br>
<br>
</body>
</html>