The original version of this page can be found at : http://forum.makemusic.com/default.aspx?f=11&m=277900
Posted By : Daniele Ghisi - 12/6/2009 6:33 PM
Hallo,
I have a problem in accessing the notehead parameters. If I do

EDataID id;
id.entryDetail.entryNumber = entry->entnum;
id.entryDetail.inci = 0;
EDTNoteheadMods mods;
fourbyte size = sizeof(mods);
FX_LoadEData(ed_NoteheadMods, &id, &mods, &size);

Then, looking into mods.percent, for example, there's a strange negative value (-9847 or something).

Does anybody know why? entry is an EXENTRY* entry = &tgf -> pent for some i.

Thanks for any help!
Daniele

Post Edited (Daniele Ghisi) : 12/6/2009 4:42:44 PM (GMT-6)


Posted By : Jari Williamsson - 12/6/2009 7:18 PM
What Finale version? I see that your code doesn't look at the entry flags prior to loading the struct? Are you sure FX_LoadEData actually loads correctly? IIRC, the EDTNoteheadMods only exists if there are actually some special tools edits done.


Jari Williamsson

Windows XP, Pentium 4
2.40 GHz, 4 GB RAM


Posted By : Daniele Ghisi - 12/6/2009 7:44 PM
Thanks Jari.
I'm running Finale 2009.
I suppose that you mean that I should check whether
(entry->ef & EF_NOTEDTAIL)

But I was testing the plugin on a measure where i DID change the % of a note.

I was not sure if FX_LoadEData loaded correctly... If I add
> if (FX_LoadEData(ed_NoteheadMods, &id, &mods, &size)){
> StandardMessage("OK"); }
No message is displayed, so I suppose that it DOESN't load things properly...

Why shouldn't it be able to load?

Moreover, also the "setting" part

entry->ef |= EF_NOTEDTAIL;
needRefresh = YES;
memset(&mods, 0, sizeof(mods));
mods.noteID = noteID;
mods.percent = 10;
FX_SaveEData(ed_NoteheadMods, &id, &mods, size);

doesn't seem to work...

Do you have any hint, Jari?
Thanks again,
Daniele

Posted By : Jari Williamsson - 12/7/2009 2:39 PM
Are you sure that the TGF is loaded OK, and that it load the measure you think it should be loading? Have you for example verified the number of entries in the loaded TGF?

The "save" example code won't work since you don't seem to resave the TGF (to store the flag change).


Jari Williamsson

Windows XP, Pentium 4
2.40 GHz, 4 GB RAM


Posted By : Daniele Ghisi - 12/7/2009 3:37 PM
I am pretty sure that the tgf loaded ok, since I printed the the duration of the notes was correct.
For the "save" example, I resaved the TGF later (and freed it)! I just posted the part of code that might have contained the error.

I really have no clue...