Finale PDK Framework  0.54
ff_noteframe.h
1 /*
2  * File: ff_noteframe.h
3  * Author: Jari Williamsson
4  *
5  * Created on den 18 november 2010, 01:20
6  */
7 
8 #ifndef FF_NOTEFRAME_H
9 #define FF_NOTEFRAME_H
10 
11 #include "ff_basecollection.h"
12 
13 
14 #ifdef PDK_FRAMEWORK_ENTRIES
15 class FCNoteEntry;
16 
27 class FCNote : public __FCBase
28 {
29 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
30  bool _shouldbeerased;
31 
32  int _index;
33  EXNOTE* _pNote;
34  FCNoteEntry* _pEntry;
35 
40  void _SetNoteFlag(FLAG_32 flag, bool state)
41  { Set32BitFlag(&_pNote->flag, flag, state); }
42 
47  bool _GetNoteFlag(FLAG_32 flag) const { return GetBitFlag(_pNote->flag, flag); }
48 
49 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
50 
51  public:
52  virtual const char* ClassName() { return "FCNote"; }
53 
55  FCNote(int index, EXNOTE* pexnote, FCNoteEntry* pParent) : __FCBase()
56  {
57  _index = index;
58  _pNote = pexnote;
59  _pEntry = pParent;
60  _shouldbeerased = false;
61  }
62 
63 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
64 
69  ENTNUM _GetEntryNumber();
70 
72  EXNOTE* _GetEXNOTE() { return _pNote; }
73 
75  void _UpdateEXNOTE(EXNOTE* pNote) { _pNote = pNote; }
76 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
77 
78 
83  FCNoteEntry* GetEntry() const { return _pEntry; }
84 
96  bool GetAccidental() const { return _GetNoteFlag(NF_ACCIBIT); }
97 
103  bool GetAccidentalFreeze() const { return _GetNoteFlag(NF_FREEZEACCI); }
104 
110  bool GetAccidentalParentheses() const { return _GetNoteFlag(NF_PARENACCI); }
111 
119  twobyte GetDisplacement() const
120  {
121 #ifdef PDK_FRAMEWORK_DIAGNOSE
122  if ((_pNote->noteID < 0) || (_pNote->noteID > 32))
123  {
124  DebugOutDigit("Illegal Note ID value in FCNote::GetDisplacement(): ", _pNote->noteID);
125  }
126 #endif
127  return _pNote->tcd;
128  }
129 
138  bool GetLegality() const { return _GetNoteFlag(NF_VALID); }
139 
149  twobyte GetRaiseLower() const { return _pNote->alteration; }
150 
157  bool GetSpacing() const { return !_GetNoteFlag(NF_NOSPACING); }
158 
167  bool GetPlayback() const { return !_GetNoteFlag(NF_NOPLAYBACK); }
168 
175  bool GetTie() const { return _GetNoteFlag(NF_TIESTART); }
176 
183  bool GetTieBackwards() const { return _GetNoteFlag(NF_TIEEND); }
184 
191  bool GetCrossStaff() const { return _GetNoteFlag(NF_CROSSBIT); }
192 
200  eNoteID GetNoteID() const { return _pNote->noteID; }
201 
202 #ifdef PDK_FRAMEWORK_PREFS
203 
224  void GetString(FCString* pString, FCKeySignature* pKey, bool simplifydoublesharp = false,
225  bool writtenpitch = false);
226 
239  bool CalcAccidental() const;
240 
262  twobyte CalcOctave(FCKeySignature* pKey, int transposeinterval = 0);
263 
281  twobyte CalcWrittenOctave(FCKeySignature* pKey, int transposevalue, bool simplifytranspose, bool chromatictranspose);
282 
304  bool SetString(FCString* pString, FCKeySignature* pKey, bool writtenpitch);
305 
306 #endif // #ifdef PDK_FRAMEWORK_PREFS
307 
314  void SetAccidental(bool state) { _SetNoteFlag(NF_ACCIBIT, state); }
315 
321  void SetAccidentalFreeze(bool state) { _SetNoteFlag(NF_FREEZEACCI, state); }
322 
328  void SetAccidentalParentheses(bool state) { _SetNoteFlag(NF_PARENACCI, state); }
329 
336  void SetSpacing(bool state) { _SetNoteFlag(NF_NOSPACING, !state); }
337 
346  void SetPlayback(bool state) { _SetNoteFlag(NF_NOPLAYBACK, !state); }
347 
356  void SetLegality(bool state) { _SetNoteFlag(NF_VALID, state); }
357 
365  void SetDisplacement(twobyte disp) { _pNote->tcd = disp; }
366 
374  void SetRaiseLower(twobyte amount) { _pNote->alteration = amount; }
375 
386  void SetNoteID(eNoteID noteid)
387  {
388  _pNote->noteID = noteid;
389  }
390 
396  void SetTie(bool value) { _SetNoteFlag(NF_TIESTART, value); }
397 
406  void SetTieBackwards(bool value) { _SetNoteFlag(NF_TIEEND, value); }
407 
417  void SetCrossStaff(bool state) { _SetNoteFlag(NF_CROSSBIT, state); }
418 
426  bool CalcOnLedgerLine();
427 
438  int CalcCrossStaffNumber();
439 
451  bool CalcRightsidePlacement();
452 
459  twobyte CalcNoteheadWidth();
460 
479  twobyte CalcStaffPosition();
480 
488  char CalcPitchChar();
489 
499  char CalcWrittenPitchChar();
500 
513  twobyte CalcPitchRaiseLower(bool writtenpitch);
514 
519  twobyte CalcMIDIKey();
520 
521 #ifdef PDK_FRAMEWORK_PREFS
522 
531  void SetMIDIKey(twobyte midikey);
532 #endif
533 
539  bool IsIdenticalPitch(FCNote* pPitchNote);
540 
547  bool IsHigherPitchThan(FCNote* pPitchCompareNote);
548 
555  bool IsLowerPitchThan(FCNote* pPitchCompareNote);
556 
557 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
558 
562  void _SetNoteDetailEntryFlag(bool state);
563 
568  bool _GetNoteDetailEntryFlag();
569 
574  void _SetPerformanceDataEntryFlag(bool state);
575 
580  bool _GetPerformanceDataEntryFlag();
581 
586  void _SetSpecialAltsEntryFlag(bool state);
587 
592  bool _GetSpecialAltsEntryFlag();
593 
594 
599  void _SetCrossStaffEntryFlag(bool state);
600 
605  bool _GetCrossStaffEntryFlag();
606 
611  void _SetArticulationEntryFlag(bool state);
612 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
613 
627  void MarkForErase() { _shouldbeerased = true; }
628 
629 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
630 
635  bool _GetShouldEraseState() { return _shouldbeerased; }
636 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
637 
638 
639 #ifdef PDK_FRAMEWORK_DEBUG
640  virtual void DebugDump()
641  {
643  DebugOutDigit("Note ID: ", GetNoteID());
644  DebugOutDigit("Displacement: ", GetDisplacement());
645  DebugOutDigit("Alteration: ", GetRaiseLower());
646  }
647 #endif
648 };
649 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
650 
651 #ifdef PDK_FRAMEWORK_ENTRIES
652 
662 class FCNotePitch : public FCNote
663 {
664  EXNOTE _exnote;
665 public:
666  virtual const char* ClassName() { return "FCNotePitch"; }
667 
669  FCNotePitch() : FCNote(0, &_exnote, NULL) {
670  memset(&_exnote, 0, sizeof(_exnote));
671  }
672 
674  void CopyFrom(FCNote* pNote)
675  {
676  memcpy(&_exnote , pNote->_GetEXNOTE(), sizeof(EXNOTE));
677  }
678 };
679 
683 {
684  int _measureno;
685  int _staffno;
686  int _layerno;
687  bool _gracenote;
688  int _gracenoteindex;
689  int _frameindex;
690  TimeEdu32 _edupos;
691  ENTNUM _entnum;
692  TimeEdu32 _duration;
693  TimeEdu32 _actualduration;
694 public:
696  {
697  _measureno = 0;
698  _staffno = 0;
699  _layerno = 0;
700  _gracenote = false;
701  _gracenoteindex = 0;
702  _frameindex = 0;
703  _edupos = 0;
704  _entnum = 0;
705  _duration = 0;
706  _actualduration = 0;
707  }
708 
710  FCNotePitch* GetItemAt(int index) { return (FCNotePitch*) __FCCollection::GetItemAt(index); }
711 
712  virtual const char* ClassName() { return "FCNotePitches"; }
713 
714 #ifdef PDK_FRAMEWORK_PREFS
715 
718  void AddFromEntry(FCNoteEntry* pEntry);
719 #endif
720 
735  void CloneEntryPositionData(FCNoteEntry* pEntry);
736 
739  int GetMeasure() { return _measureno; }
740 
743  int GetStaff() { return _staffno; }
744 
747  int GetLayerNumber() { return _layerno; }
748 
751  bool GetGraceNote() { return _gracenote; }
752 
755  int GetGraceNoteIndex() { return _gracenoteindex; }
756 
759  TimeEdu32 GetMeasurePos() { return _edupos; }
760 
762  ENTNUM GetENTNUM() { return _entnum; }
763 
765  TimeEdu32 GetDuration() { return _duration; }
766 
768  TimeEdu32 GetActualDuration() { return _actualduration; }
769 
771  int GetFrameIndex() { return _frameindex; }
772 
773 #ifdef PDK_FRAMEWORK_DEBUG
774  virtual void DebugDump()
775  {
777  DebugOutDigit("Measure: ", _measureno);
778  DebugOutDigit("Edu position: ", _edupos);
779  }
780 #endif
781 
782 };
783 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
784 
785 
786 #ifdef PDK_FRAMEWORK_ENTRIES
787 class FCArticulations;
788 class FCNoteEntries;
789 class FCTuplet;
790 class FCTuplets;
791 class FCNoteheadMods;
792 class FCPerformanceMods;
793 
809 {
810 #ifndef DOXYGEN_SHOULD_SKIP_THIS
811  EXENTRY* _pEntryRef;
812  EXTGF2005a* _pFrameRef;
813  twobyte _framemeasure;
814  twobyte _framestaff;
815  FCNoteEntry* _pPreviousEntry;
816  FCNoteEntry* _pNextEntry;
817  FCArticulations* _pArticulationCache;
818 
819  void _SetXefFlag(FLAG_16 mask, bool state)
820  {
821  Set16BitFlag(&_pEntryRef->xef, mask, state);
822  }
823 
824  void _SetEfFlag(FLAG_32 mask, bool state)
825  {
826  Set32BitFlag(&_pEntryRef->ef, mask, state);
827  }
828 
829  bool _GetXefFlag(FLAG_32 mask) const
830  {
831  return GetBitFlag(_pEntryRef->xef, mask);
832  }
833 
834  bool _GetEfFlag(FLAG_32 mask) const
835  {
836  return GetBitFlag(_pEntryRef->ef, mask);
837  }
838 
839  void _UpdateNoteCollection();
840 
845  twobyte _FindUniqueNoteID();
846 
847 #endif /*DOXYGEN_SHOULD_SKIP_THIS*/
848 public:
855  FCNote* GetItemAt(int index) { return (FCNote*) __FCCollection::GetItemAt(index); }
856 
857 
865  BREVE = 8192,
866  WHOLE_NOTE = 4096,
867  NOTE_WHOLE = 4096,
868  HALF_NOTE = 2048,
869  NOTE_HALF = 2048,
870  QUARTER_NOTE = 1024,
871  NOTE_QUARTER = 1024,
872  EIGHTH_NOTE = 512,
873  NOTE_8TH = 512,
874  SIXTEENTH_NOTE = 256,
875  NOTE_16TH = 256,
876  THIRTYSECOND_NOTE = 128,
877  NOTE_32ND = 128,
878  SIXTYFOURTH_NOTE = 64,
879  NOTE_64TH = 64,
880  NOTE_128TH = 32
881  };
882 
883 
884  virtual const char* ClassName() { return "FCNoteEntry"; }
885 
887  FCNoteEntry(EXENTRY* pEntry, EXTGF2005a* pFrame, FCNoteEntry* pPrevious) : __FCCollection()
888  {
889  _pArticulationCache = NULL;
890  _pEntryRef = pEntry;
891  _framemeasure = pFrame->meas;
892  _framestaff = FX_SlotToInst(pFrame->staffSlot, pFrame->iuList);
893  _pFrameRef = pFrame;
894  _pPreviousEntry = pPrevious;
895  _pNextEntry = NULL;
896  _UpdateNoteCollection();
897  }
898 
900  virtual ~FCNoteEntry();
901 
902 #ifndef DOXYGEN_SHOULD_SKIP_THIS
903 
908  void _AttachNextEntry(FCNoteEntry* pNext) { _pNextEntry = pNext; }
909 
913  void _AttachPreviousEntry(FCNoteEntry* pNext) { _pPreviousEntry = pNext; }
914 
917  EXENTRY* _GetEXENTRY() { return _pEntryRef; }
918 
921  EXTGF2005a* _GetTGFRef() { return _pFrameRef; }
922 
923  /* \brief For internal use only.
924  *
925  * Calculates the index within the TGF frame. Returns -1 if index
926  * wasn't found (SHOULD NEVER HAPPEN).
927  * */
928  int _CalcTGFIndex();
929 
931  void _TGFUpdate(EXTGF2005a* pTGF, EXENTRY* pEntry)
932  {
933  _pFrameRef = pTGF;
934  _pEntryRef = pEntry;
935  /* The TGF info for the entry is now updated.
936  * Update the EXNOTE references for all the note objects as well. */
937  for (int i = 0; i < GetCount(); i++)
938  {
939  FCNote* pNote = GetItemAt(i);
940  pNote->_UpdateEXNOTE(&pEntry->note[i]);
941  }
942  }
943 
945  FCArticulations* _GetArticulationCache() { return _pArticulationCache; }
946 #endif /*DOXYGEN_SHOULD_SKIP_THIS*/
947 
948 
954  FCNote* FindNoteID(twobyte noteID);
955 
956 
962  void SetRestDisplacement(twobyte value);
963 
969  twobyte GetRestDisplacement();
970 
971 
980  FCNoteEntry* Previous() { return _pPreviousEntry; }
981 
991  {
992  if (!_pPreviousEntry) return NULL;
993  if (_pPreviousEntry->_GetTGFRef() != _GetTGFRef()) return NULL;
994  return _pPreviousEntry;
995  }
996 
1005 
1006 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1007 
1008  FCArticulations* CreateArticulations_GC();
1009 #endif
1010 
1019 
1020 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1021 
1022  FCNoteheadMods* CreateNoteheadMods_GC();
1023 #endif
1024 
1033 
1034 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1035 
1036  FCPerformanceMods* CreatePerformanceMods_GC();
1037 #endif
1038 
1047 
1048 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
1049 
1050  FCTuplets* CreateTuplets_GC();
1051 #endif
1052 
1053 
1059  ENTNUM GetEntryNumber() const { return _pEntryRef ? _pEntryRef->entnum : 0; }
1060 
1061 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1062 
1067  void _PackEXENTRYNotes();
1068 
1073  bool _GetTupletDef(twobyte inci, EDTTuplet2005* pTuplet);
1074 
1075 #ifdef PDK_FRAMEWORK_PREFS
1076 
1080  bool _CalcRestFlippable();
1081 
1086  bool _CalcRestBeamedGroupEnd();
1087 #endif /* PDK_FRAMEWORK_PREFS */
1088 #endif /*DOXYGEN_SHOULD_SKIP_THIS*/
1089 
1094  void SetNoteFlag(bool state) { _SetEfFlag(EF_NOTEBIT, state); }
1095 
1102  void SetPlayback(bool state) { _SetXefFlag(XEF_NOPLAYBACK, !state); }
1103 
1109  void SetCombineRests(bool state);
1110 
1116  void SetFlipTie(bool state) { _SetEfFlag(EF_FLIPTIE, state); }
1117 
1124  void SetSpacing(bool state) { _SetXefFlag(XEF_NOSPACING, !state); }
1125 
1132  void SetVisible(bool state) { _SetEfFlag(EF_IGNOREBIT, !state); }
1133 
1140  void SetGraceNote(bool state) { _SetEfFlag(EF_GRACENOTE, state); }
1141 
1147  void SetVoice2(bool state) { _SetEfFlag(EF_V2BIT, state); }
1148 
1154  void SetVoice2Launch(bool state) { _SetEfFlag(EF_V1CNTLRBIT, state); }
1155 
1162  void SetGraceNoteSlash(bool state) { _SetXefFlag(XEF_SLASHGRACE, state); }
1163 
1170  void SetCrossStaff(bool state) { _SetEfFlag(EF_CROSSSTAFF, state); }
1171 
1178  void SetBeamBeat(bool state) { _SetEfFlag(EF_BEAMBIT, state); }
1179 
1186  void SetFreezeBeam(bool state) { _SetXefFlag(XEF_FREEZEBEAM, state); }
1187 
1196  void SetFlatBeam(bool state) { _SetXefFlag(XEF_FLATBEAM, state); }
1197 
1204  void SetLedgerLines(bool state) { _SetXefFlag(XEF_NOLEGER, !state); }
1205 
1211  void SetFreezeStem(bool state) { _SetEfFlag(EF_FREEZSTEM, state); }
1212 
1223  void SetCheckAccidentals(bool state);
1224 
1233  void SetLegality(bool state) { _SetEfFlag(EF_VALID, state); }
1234 
1239  void SetManualPosition(Evpu16 pos) { _pEntryRef->orgposi = pos; }
1240 
1245  void SetClefIndex(eClef clef) { _pEntryRef->clef = clef; }
1246 
1256  void SetStemUp(bool state) { _SetEfFlag(EF_UPSTEMBIT, state); }
1257 
1265  void SetDuration(TimeEdu32 duration) { _pEntryRef->dura = duration; }
1266 
1273  void SetFloatingRest(bool state) { _SetEfFlag(EF_FLOATREST, state); }
1274 
1281  void SetNoteDetailFlag(bool state) { _SetEfFlag(EF_NOTEDTAIL, state); }
1282 
1289  void SetPerformanceDataFlag(bool state) { _SetEfFlag(EF_PRFMDATA, state); }
1290 
1297  void SetSpecialAltsFlag(bool state) { _SetEfFlag(EF_DOTTIEALTS, state); }
1298 
1305  void SetArticulationFlag(bool state) { _SetEfFlag(EF_ARTICDTAIL, state); }
1306 
1312  void SetSmartShapeFlag(bool state) { _SetXefFlag(XEF_SMARTSHAPEDETAIL, state); }
1313 
1319  void SetTupletStartFlag(bool state) { _SetEfFlag(EF_TUPLSTART, state); }
1320 
1325  void SetLyricFlag(bool state) { _SetEfFlag(EF_LYRICDETAIL, state); }
1326 
1333  void SetStemDetailFlag(bool state) { _SetEfFlag(EF_STEMDTAIL, state); }
1334 
1341  void SetSecondaryBeamFlag(bool state) { _SetEfFlag(EF_SECBEAMBIT, state); }
1342 
1350  void SetActualDuration(TimeEdu32 value) { _pEntryRef->actdur = value; }
1351 
1364  void SetMeasurePos(TimeEdu32 value) { _pEntryRef->elldur = value; }
1365 
1372  bool GetBeamBeat() const { return _GetEfFlag(EF_BEAMBIT); }
1373 
1379  bool GetCheckAccidentals() const;
1380 
1387  bool GetLedgerLines() const { return !_GetXefFlag(XEF_NOLEGER); }
1388 
1394  bool GetFreezeStem() const { return _GetEfFlag(EF_FREEZSTEM); }
1395 
1403  bool GetLegality() const { return _GetEfFlag(EF_VALID); }
1404 
1410  bool GetFreezeBeam() const { return _GetXefFlag(XEF_FREEZEBEAM); }
1411 
1420  bool GetFlatBeam() const { return _GetXefFlag(XEF_FLATBEAM); }
1421 
1428  bool GetPlayback() const { return !_GetXefFlag(XEF_NOPLAYBACK); }
1429 
1436  bool GetCombineRests() const;
1437 
1443  bool GetFlipTie() const { return _GetEfFlag(EF_FLIPTIE); }
1444 
1451  bool GetSpacing() const { return !_GetXefFlag(XEF_NOSPACING); }
1452 
1459  bool GetVisible() const { return !_GetEfFlag(EF_IGNOREBIT); }
1460 
1467  bool GetGraceNote() const { return _GetEfFlag(EF_GRACENOTE); }
1468 
1476  bool GetGraceNoteSlash() const { return _GetXefFlag(XEF_SLASHGRACE); }
1477 
1483  bool GetVoice2() const { return _GetEfFlag(EF_V2BIT); }
1484 
1490  bool GetVoice2Launch() const { return _GetEfFlag(EF_V1CNTLRBIT); }
1491 
1502  bool GetStemUp() const { return _GetEfFlag(EF_UPSTEMBIT); }
1503 
1510  bool GetCrossStaff() const { return _GetEfFlag(EF_CROSSSTAFF); }
1511 
1520  TimeEdu32 GetDuration() const { return _pEntryRef->dura; }
1521 
1528  bool GetFloatingRest() const { return _GetEfFlag(EF_FLOATREST); }
1529 
1538  TimeEdu32 GetActualDuration() const { return _pEntryRef->actdur; }
1539 
1551  {
1552  TimeEdu32 duration = GetDuration();
1553  TimeEdu32 timeedu_try = 8192;
1554  while (timeedu_try)
1555  {
1556  if (timeedu_try & duration) return timeedu_try;
1557  timeedu_try /= 2;
1558  }
1559  return 0;
1560  }
1561 
1567  twobyte CalcDots()
1568  {
1569  return CalcDotsForDuration(GetDuration());
1570  }
1571 
1577  twobyte GetLayerNumber() const { return _pFrameRef->layer + 1; }
1578 
1584  Evpu16 GetManualPosition() const { return _pEntryRef->orgposi; }
1585 
1594  eClef GetClefIndex() const { return _pEntryRef->clef; }
1595 
1605  int CalcGraceNoteIndex();
1606 
1615  twobyte CalcHighestStaffPosition();
1616 
1625  twobyte CalcHighestDisplacement();
1626 
1634  twobyte CalcDisplacementRange();
1635 
1647  twobyte CalcBeamCount()
1648  {
1649  TimeEdu32 duration = CalcNondottedDuration();
1650  if (duration == 0) return 0;
1651  if (duration > EIGHTH_NOTE) return 0;
1652  twobyte retvalue = 1;
1653  TimeEdu32 tryvalue = EIGHTH_NOTE;
1654  while (tryvalue)
1655  {
1656  if (tryvalue == duration) return retvalue;
1657  retvalue ++;
1658  tryvalue /= 2;
1659  }
1660  return 0;
1661  }
1662 
1671  bool CalcMultiLayeredCell();
1672 
1684  int CalcDisplacementMatchCount(FCNoteEntry* pCompareEntry);
1685 
1699  FCNote* CalcHighestNote(FCNote* pCeiling = NULL);
1700 
1714  FCNote* CalcLowestNote(FCNote* pFloor = NULL);
1715 
1728 
1734 
1740 
1747  bool HasSameNotes(FCNoteEntry* pEntry);
1748 
1758  FCNote* FindDisplacement(twobyte displacement);
1759 
1770  FCNote* FindPitch(FCNote* pPitchNote);
1771 
1781  TimeEdu32 GetMeasurePos() const { return _pEntryRef->elldur; }
1782 
1789  bool GetNoteDetailFlag() const { return _GetEfFlag(EF_NOTEDTAIL); }
1790 
1799  bool GetPerformanceDataFlag() const { return _GetEfFlag(EF_PRFMDATA); }
1800 
1807  bool GetSpecialAltsFlag() const { return _GetEfFlag(EF_DOTTIEALTS); }
1808 
1814  bool GetTupletStartFlag() const { return _GetEfFlag(EF_TUPLSTART); }
1815 
1820  bool GetLyricFlag() const { return _GetEfFlag(EF_LYRICDETAIL); }
1821 
1828  bool GetStemDetailFlag() const { return _GetEfFlag(EF_STEMDTAIL); }
1829 
1836  bool GetSecondaryBeamFlag() const { return _GetEfFlag(EF_SECBEAMBIT); }
1837 
1843  bool GetArticulationFlag() const { return _GetEfFlag(EF_ARTICDTAIL); }
1844 
1850  bool GetSmartShapeFlag() const { return _GetXefFlag(XEF_SMARTSHAPEDETAIL); }
1851 
1858  twobyte GetMeasure() const { return _framemeasure; }
1859 
1866  twobyte GetStaff() const { return _framestaff; }
1867 
1878  FCNoteEntry* Next() { return _pNextEntry; }
1879 
1886  bool IsNote() { return _GetEfFlag(EF_NOTEBIT); }
1887 
1894  bool IsRest() { return !_GetEfFlag(EF_NOTEBIT); }
1895 
1901  bool IsDotted();
1902 
1912  bool IsStartOfTuplet();
1913 
1923  bool IsStartOfTupletParam(TupletInfo* pInfoStorage = NULL);
1924 
1933  bool IsPartOfTuplet();
1934 
1945  bool IsOverlappedEntry(FCNoteEntry* pTestEntry);
1946 
1955  bool IsPartOfTupletParam(TupletInfo* pInfoStorage = NULL);
1956 
1962  {
1963  if (!Next()) return true;
1964  return (Next()->GetMeasure() != GetMeasure());
1965  }
1966 
1976 
1977 #ifdef PDK_FRAMEWORK_PREFS
1978 
1992  bool CalcFlippable();
1993 
2004  bool CalcBeamedGroupEnd();
2005 
2014  bool CalcUnbeamedNote();
2015 #endif
2016 
2017 #ifdef PDK_FRAMEWORK_PREFS
2018 
2030 #endif
2031 
2032 #ifdef PDK_FRAMEWORK_PREFS
2033 
2046  bool CalcLargestNoteheadResize(FCNumber* pLargestFontSize, FCNumber* pLargestResize);
2047 
2061  bool CalcSmallestNoteheadResize(FCNumber* pSmallestFontSize, FCNumber* pSmallestResize);
2062 #endif
2063 
2073  twobyte CalcWidestNoteheadWidth();
2074 
2084  bool CalcStemUp();
2085 
2095  twobyte CalcResize();
2096 
2106  twobyte CalcStemLength();
2107 
2118  {
2121  }
2122 
2132  static TimeEdu32 CalcNondottedDurationForDuration(TimeEdu32 duration);
2133 
2143  static int CalcDotsForDuration(TimeEdu32 duration);
2144 
2154  static bool IsValidDuration(TimeEdu32 duration);
2155 
2167  static TimeEdu32 CalcValidDuration(TimeEdu32 duration);
2168 
2177  bool IsTied();
2178 
2186  bool IsTiedBackwards();
2187 
2197  bool IsTiedToPrevious();
2198 
2206  bool IsAllTied();
2207 
2216  bool IsAllTiedBackwards();
2217 
2226  void ClearPitches();
2227 
2235  FCNote* AddNewNote();
2236 
2253  int AddPitches(FCNoteEntry* pSourceEntry, bool unique, bool settie = false);
2254 
2255 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
2256 
2266  int AddPitches(FCNotePitches* pPitches, bool unique);
2267 #endif
2268 
2279  int AddPitch(FCNote* pNote);
2280 
2303  int AddArticulations(FCNoteEntry* pSourceEntry, bool bNoDuplicates = true);
2304 
2314  void TieAll(bool bTie);
2315 
2325  void SetAccidentals(bool bAccidental);
2326 
2336  void CopyNotes(FCNoteEntry* pFrom);
2337 
2346  void CopyNote(FCNote* pFrom);
2347 
2356  void CopyEntry(FCNoteEntry* pFromEntry);
2357 
2376  void CopyEntryDetails(FCNoteEntry* pFromEntry, bool copytuplets);
2377 
2384  void CopyEntryPercussionDetails(FCNoteEntry* pFromEntry);
2385 
2398  bool DeleteNote(FCNote* pNote);
2399 
2414  void CacheArticulations();
2415 
2420  bool IsRestMovable();
2421 
2427  void MakeRest();
2428 
2434  void MakeMovableRest();
2435 
2441  void MakeNote();
2442 
2447 
2454 
2455 #ifdef PDK_FRAMEWORK_DEBUG
2456 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2457  void DebugOutLocation()
2458  {
2459  FCString location("Location - Staff: ");
2460  location.AppendInteger(GetStaff());
2461  location.AppendCString(" Measure: ");
2462  location.AppendInteger(GetMeasure());
2463  location.AppendCString(" Duration Pos: ");
2464  location.AppendInteger(GetMeasurePos());
2465  DebugOut(location.GetCString());
2466  }
2467 
2468  virtual void DebugDump()
2469  {
2471  DebugOutDigit("Entry Number: ", GetEntryNumber());
2472  DebugOutDigit("Duration position: ", GetMeasurePos());
2473  DebugOutDigit("Duration: ", GetDuration());
2474  DebugOutBool("Is note: ", IsNote());
2475  DebugOutBool("Beam/Beat: ", GetBeamBeat());
2476  DebugOutBool("Stem goes up: ", CalcStemUp());
2477  DebugOutBool("Articulation Flag: ", GetArticulationFlag());
2478  }
2479 
2480  virtual void DebugDataDump()
2481  {
2483  DebugOutHex("xef: ", _pEntryRef->xef);
2484  DebugOutHex("ef: ", _pEntryRef->ef);
2485  }
2486 #endif /* #ifndef DOXYGEN_SHOULD_IGNORE_THIS */
2487 #endif
2488 
2489 };
2490 
2491 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
2492 
2493 
2494 
2495 #ifdef PDK_FRAMEWORK_ENTRIES
2496 
2504 {
2505 protected:
2506 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2507 
2512  void _ClearTGF(EXTGF2005a* pTgf)
2513  {
2514  FX_DeleteEXENTRY( pTgf, 0, pTgf->numEntries );
2515  }
2516 
2518  void _CopyEntries(EXTGF2005a* pSourceTgf, EXTGF2005a* pDestinationTgf);
2519 
2520 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2521 
2522 public:
2531  {
2532  for (int i = 0; i < GetCount(); i++)
2533  {
2534  FCNoteEntry* pNoteEntry = (FCNoteEntry*) GetItemAt(i);
2535  if (pNoteEntry->GetEntryNumber() == entnum) return pNoteEntry;
2536  }
2537  return NULL;
2538  }
2539 
2542 
2543 };
2544 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
2545 
2546 
2547 #ifdef PDK_FRAMEWORK_ENTRIES
2548 
2556 {
2557 public:
2558  virtual const char* ClassName() { return "FCNoteEntries"; }
2559 };
2560 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
2561 
2562 #ifdef PDK_FRAMEWORK_ENTRIES
2563 
2575 {
2576  /* Settings that controls the flow of the 'Find' methods. All defaults to ON. */
2577  bool _findvisible;
2578  bool _findhidden;
2579  bool _findnotes;
2580  bool _findrests;
2581  bool _findalternatenotation;
2582  bool _findcutaway;
2583  bool _findvoice1;
2584  bool _findvoice2;
2585  bool _findvoice2launch;
2586 
2587  /* For internal use only. Helper method for all the 'Find' methods. */
2588  bool _ShouldScanEntry(FCNoteEntry* pNoteEntry);
2589 
2590 public:
2596  {
2598  LLM_NONE = -3,
2599 
2602 
2605 
2608  };
2609 private:
2610 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2611 
2617  EXTGF2005a* _frames[20];
2618 
2619  int _measure;
2620  int _staff;
2621 
2622  int _loadlayermode;
2623  bool _loadmirrors;
2624 
2629  void _SetupEntries();
2630 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
2631 
2632 public:
2633  virtual const char* ClassName() { return "FCNoteEntryCell"; }
2634 
2639  FCNoteEntryCell(int measure, int staff) : __FCNoteEntryCollection()
2640  {
2641  /* Set all settings related to the 'Find methods to ON */
2642  _findvisible = true;
2643  _findhidden = true;
2644  _findnotes = true;
2645  _findrests = true;
2646  _findalternatenotation = true;
2647  _findcutaway = true;
2648  _findvoice1 = true;
2649  _findvoice2 = true;
2650  _findvoice2launch = true;
2651 
2652  _loadlayermode = (int) LLM_ALLVISIBILELAYERS; // Load all visible layers
2653  _loadmirrors = true;
2654  _measure = measure;
2655  _staff = staff;
2656  for (int i = 0; i < FX_GetMaxLayers(); i++) _frames[i] = NULL;
2657  }
2658 
2664  {
2665  ClearFrame();
2666  }
2667 
2682  FCNoteEntry* AppendEntriesInLayer(int layerno, int noofentries);
2683 
2701  bool MoveEntry(FCNoteEntry* pEntry, FCNoteEntryCell* pSourceEntryCell);
2702 
2710  {
2711  if (GetCount() == 0) return false;
2712  FCNoteEntry* pFirstEntry = GetItemAt(0);
2713  for (int i = 1; i < GetCount(); i++)
2714  {
2715  FCNoteEntry* pCheckEntry = GetItemAt(i);
2716  if (pFirstEntry->GetLayerNumber() != pCheckEntry->GetLayerNumber()) return true;
2717  }
2718  return false;
2719  }
2720 
2731  bool IsLayerContainingEntries(int layerno)
2732  {
2733  for (int i = 0; i < GetCount(); i++)
2734  {
2735  FCNoteEntry* pCheckEntry = GetItemAt(i);
2736  if (pCheckEntry->GetLayerNumber() == layerno) return true;
2737  }
2738  return false;
2739  }
2740 
2750  TimeEdu32 CalcLayerDuration(int layerno)
2751  {
2752  if (!_frames[layerno - 1]) return -1;
2753  return FX_GetTGFDuration(_frames[layerno - 1]);
2754  }
2755 
2760  void ClearFrame()
2761  {
2762  ClearAll();
2763  for (int i = 0; i < FX_GetMaxLayers(); i++)
2764  {
2765  if (_frames[i]) FX_FreeTGF(_frames[i]);
2766  _frames[i] = NULL;
2767  }
2768  }
2769 
2788  FCNoteEntry* FindEntryStartPosition(TimeEdu32 pos, int layerno);
2789 
2804  FCNoteEntry* FindCoveredEntry(TimeEdu32 pos, int layerno);
2805 
2820  FCNoteEntry* FindClosestPos(TimeEdu32 pos);
2821 
2839  FCNoteEntry* FindNextEntryPos(TimeEdu32 pos);
2840 
2858  FCNoteEntry* FindPreviousEntryPos(TimeEdu32 pos);
2859 
2875  bool DeleteAllNullEntries();
2876 
2885  bool DeleteEntry(FCNoteEntry* pEntry);
2886 
2895  bool Load();
2896 
2903  bool Save();
2904 
2914  FCNoteEntry* GetRegionItemAt(int index, FCMusicRegion* pRegion);
2915 
2916 
2917  /***********/
2918  /* GETTERS */
2919  /***********/
2920 
2928  int GetLoadLayerMode() const { return _loadlayermode; }
2929 
2937  bool GetLoadMirrors() const { return _loadmirrors; }
2938 
2948  bool GetFindVisible() const { return _findvisible; }
2949 
2959  bool GetFindHidden() const { return _findhidden; }
2960 
2970  bool GetFindNotes() const { return _findnotes; }
2971 
2981  bool GetFindRests() const { return _findrests; }
2982 
2995  bool GetFindAlternateNotation() const { return _findalternatenotation; }
2996 
3007  bool GetFindCutaway() const { return _findcutaway; }
3008 
3019  bool GetFindVoice1() const { return _findvoice1; }
3020 
3031  bool GetFindVoice2() const { return _findvoice2; }
3032 
3043  bool GetFindVoice2Launch() const { return _findvoice2launch; }
3044 
3051  twobyte GetMeasure() const { return _measure; }
3052 
3059  twobyte GetStaff() const { return _staff; }
3060 
3061  /***********/
3062  /* SETTERS */
3063  /***********/
3064 
3078  void SetLoadLayerMode(int mode) { _loadlayermode = mode; }
3079 
3085  void SetLoadMirrors(bool state) { _loadmirrors = state; }
3086 
3098  void SetFindVisible(bool state) { _findvisible = state; }
3099 
3111  void SetFindHidden(bool state) { _findhidden = state; }
3112 
3124  void SetFindNotes(bool state) { _findnotes = state; }
3125 
3137  void SetFindRests(bool state) { _findrests = state; }
3138 
3153  void SetFindAlternateNotation(bool state) { _findalternatenotation = state; }
3154 
3167  void SetFindCutaway(bool state) { _findcutaway = state; }
3168 
3179  void SetFindVoice1(bool state) { _findvoice1 = state; }
3180 
3191  void SetFindVoice2(bool state) { _findvoice2 = state; }
3192 
3203  void SetFindVoice2Launch(bool state) { _findvoice2launch = state; }
3204 
3205 
3212 };
3213 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
3214 
3215 #ifdef PDK_FRAMEWORK_ENTRIES
3216 
3231 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3232  twobyte _layerindex;
3233  twobyte _staff;
3234  twobyte _startmeasure;
3235  twobyte _endmeasure;
3236 
3237  bool _loadmirrors;
3238  bool _usevisiblelayeronly;
3239 
3240  int _tgfcounter;
3241  EXTGF2005a** _tgfarray;
3242 
3247  void _SetupEntries();
3248 
3255  bool _LoadRedir(twobyte layer_redir,
3256  twobyte staff_redir,
3257  twobyte startmeasure_redir);
3258 
3259 
3269  EXTGF2005a* _SilentTGFUpdate(EXTGF2005a* pOldTGF);
3270 
3271 
3278  EXTGF2005a* _GetNextTGFRef(EXTGF2005a* pTGF)
3279  {
3280  for (int i = 0; i < _tgfcounter - 1; i++)
3281  {
3282  if (_tgfarray[i] == pTGF) return _tgfarray[i + 1];
3283  }
3284  return NULL;
3285  }
3286 
3287 
3288 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
3289 
3290 public:
3291  virtual const char* ClassName() { return "FCNoteEntryLayer"; }
3292 
3293 
3304  FCNoteEntryLayer(twobyte layer, twobyte staff, twobyte startmeas = 1, twobyte endmeas = -1);
3305 
3307  virtual ~FCNoteEntryLayer() {
3308  ClearFrames();
3309  }
3310 
3314  void ClearFrames() {
3315  ClearAll();
3316  for (int i = 0; i < _tgfcounter; i++) {
3317  if (_tgfarray[i]) FX_FreeTGF(_tgfarray[i]);
3318  _tgfarray[i] = NULL;
3319  }
3320  delete [] _tgfarray;
3321  _tgfarray = NULL;
3322  _tgfcounter = 0;
3323  }
3324 
3342  bool DeleteAllNullEntries();
3343 
3362  bool DeleteAllRestFrames();
3363 
3370  {
3371  for (int i = 0; i < _tgfcounter; i++) {
3372  if (_tgfarray[i]) _ClearTGF(_tgfarray[i]);
3373  }
3374  ClearAll();
3375  }
3376 
3382  twobyte GetLayerIndex() const { return _layerindex; }
3383 
3388  twobyte GetStaff() const { return _staff; }
3389 
3394  twobyte GetStartMeasure() const { return _startmeasure; }
3395 
3401  twobyte GetEndMeasure() const { return _endmeasure; }
3402 
3408  bool GetLoadMirrors() const { return _loadmirrors; }
3409 
3417  bool GetUseVisibleLayer() const { return _usevisiblelayeronly; }
3418 
3426  void SetUseVisibleLayer(bool value) { _usevisiblelayeronly = value; }
3427 
3437  void SetLayerIndex(twobyte layerno);
3438 
3444  void SetLoadMirrors(bool state) { _loadmirrors = state; }
3445 
3453  bool Load();
3454 
3461  bool Save();
3462 
3478  FCNoteEntryLayer* CreateCloneEntries(twobyte layerindex_redir,
3479  twobyte staff_redir,
3480  twobyte startmeasure_redir);
3481 
3482 #ifdef PDK_FRAMEWORK_LUAFRIENDLY
3483 
3484  FCNoteEntryLayer* CreateCloneEntries_GC(twobyte layer_redir,
3485  twobyte staff_redir,
3486  twobyte startmeasure_redir);
3487 #endif
3488 
3489 
3501 
3502 
3516  FCNoteEntry* InsertEntriesBefore(FCNoteEntry* pPositionEntry, int count);
3517 
3535  FCNoteEntry* InsertEntriesAfter(FCNoteEntry* pPositionEntry, int count, bool nextmeasure = false);
3536 
3537 
3551  bool CloneTuplets(FCNoteEntryLayer* pSource);
3552 
3553 
3569  bool IsInSuccession(FCNoteEntry* pEntry1, FCNoteEntry* pEntry2)
3570  {
3571  if (pEntry1->Next() != pEntry2) return false;
3572  if ((pEntry2->GetMeasure() - pEntry1->GetMeasure()) > 1) return false;
3573  return true;
3574  }
3575 
3587  TimeEdu32 CalcFrameDuration(int measurenumber);
3588 
3597  int CalcMeasureSpan() { return GetEndMeasure() - GetStartMeasure() + 1; }
3598 
3609  int CalcRegionCount(FCMusicRegion* pRegion);
3610 
3623  FCNoteEntry* GetRegionItemAt(int index, FCMusicRegion* pRegion);
3624 
3632  int ForEachInRegion(FCIteratorHandler* pIterator, FCMusicRegion* pRegion);
3633 
3636 #ifdef PDK_FRAMEWORK_DEBUG
3637  virtual void DebugDump()
3638  {
3641  DebugOutDigit("Layer: ", GetLayerIndex());
3642  DebugOutDigit("Staff: ", GetStaff());
3643  DebugOutDigit("Start measure: ", GetStartMeasure());
3644  DebugOutDigit("End measure: ", GetEndMeasure());
3645  DebugOutDigit("TGF Frame counter: ", _tgfcounter);
3646  for (int i = 0; i < _tgfcounter; i++) {
3647  if (_tgfarray[i])
3648  {
3649  DebugOutDigit("=> TGF No", i);
3650  DebugOutDigit("===> .frame ", _tgfarray[i]->frame);
3651  DebugOutDigit("===> .inst ", _tgfarray[i]->inst);
3652  DebugOutDigit("===> .staffSlot ", _tgfarray[i]->staffSlot);
3653  DebugOutDigit("===> .meas ", _tgfarray[i]->meas);
3654  }
3655  }
3656  }
3657 #endif
3658 };
3659 
3660 
3669 {
3670  int _staffno;
3671  int _startmeasure;
3672  int _endmeasure;
3673 
3674  bool _usevisiblelayersonly;
3675 public:
3676 
3684  FCNoteEntryLayers(twobyte staff, twobyte startmeas = 1, twobyte endmeas = -1)
3685  {
3686  _staffno = staff;
3687  _startmeasure = startmeas;
3688  _endmeasure = endmeas;
3689  _usevisiblelayersonly = true;
3690  }
3691 
3695  bool LoadAll()
3696  {
3697  bool result = false;
3698  for (int layer = 0; layer < FX_GetMaxLayers(); layer++)
3699  {
3700  FCNoteEntryLayer* pNoteEntryLayer = new FCNoteEntryLayer(layer, _staffno, _startmeasure, _endmeasure);
3701  pNoteEntryLayer->SetUseVisibleLayer(_usevisiblelayersonly);
3702  if (pNoteEntryLayer->Load()) result = true;
3703  Add(pNoteEntryLayer);
3704  }
3705  return result;
3706  }
3707 
3709  bool SaveAll()
3710  {
3711  for (int layeridx = 0; layeridx < GetCount(); layeridx++)
3712  {
3713  FCNoteEntryLayer* pLayer = (FCNoteEntryLayer*) GetItemAt(layeridx);
3714  if (!pLayer->Save()) return false;
3715  }
3716  return true;
3717  }
3718 
3719 
3721  void SetUseVisibleLayersOnly(bool value)
3722  {
3723  _usevisiblelayersonly = value;
3724  }
3725 
3728  {
3730  }
3731 };
3732 
3733 
3734 
3735 #endif // #ifdef PDK_FRAMEWORK_ENTRIES
3736 
3737 
3738 #endif /* FF_NOTEFRAME_H */
3739 
TimeEdu32 CalcFrameDuration(int measurenumber)
Calculates the duration of a frame (in one measure) based on the entries in the frame.
Definition: finaleframework.cpp:18199
twobyte CalcNoteheadWidth()
Returns the width of the notehead.
Definition: finaleframework.cpp:15185
__FCBase * GetItemAt(int index)
Returns the object at the index position. Index is 0-based.
Definition: finaleframework.cpp:12797
bool Load()
Loads the note entries for the layer. Mirror frames are loaded based on the GetLoadMirrors setting...
Definition: finaleframework.cpp:17836
void SetCrossStaff(bool state)
Sets the cross staff state for the entry.
Definition: ff_noteframe.h:1170
FCNoteEntryLayer * CreateCloneEntries(twobyte layerindex_redir, twobyte staff_redir, twobyte startmeasure_redir)
Creates a cloned copy that can be saved as a copy. The cloned copy is recreated from reloaded Finale ...
Definition: finaleframework.cpp:18149
void SetVoice2Launch(bool state)
Sets the entry that controls the launch of voice 2.
Definition: ff_noteframe.h:1154
void MakeNote()
Turns the entry into a note.
Definition: finaleframework.cpp:17342
FCNoteEntry * FindPreviousEntryPos(TimeEdu32 pos)
Finds the first entry that appears earlier than the indicated position. All loaded layers will be sca...
Definition: finaleframework.cpp:17782
virtual void DebugDataDump()
Outputs a memory dump of the data block in the object for debugging purposes.
Definition: finaleframework.cpp:555
void SetTie(bool value)
Sets the tie state for the note.
Definition: ff_noteframe.h:396
FCNoteEntry * GetItemAt(int index)
Overridden GetItemAt() method.
Definition: ff_noteframe.h:3635
bool GetPlayback() const
Gets the playback state of the note entry.
Definition: ff_noteframe.h:1428
bool Load()
Loads the note entries for the cell. Which layers that will be loaded are controlled by the SetLoadLa...
Definition: finaleframework.cpp:17455
void SetRaiseLower(twobyte amount)
Raises or lowers the pitch of the note.
Definition: ff_noteframe.h:374
bool CalcMultiLayeredCell()
Returns true if the entry is in a cell with multiple layers of music.
Definition: finaleframework.cpp:16106
FCNoteEntry * CalcLastTupletEntry(FCTuplet *pTuplet)
Scans forward and returns the end entry of a tuplet that's connected to this entry object...
Definition: finaleframework.cpp:17080
void ClearAll()
Destroys all the objects in the collection and empties the collection.
Definition: ff_basecollection.h:130
twobyte GetDisplacement() const
Returns the vertical note position on the staff.
Definition: ff_noteframe.h:119
twobyte CalcStemLength()
Definition: finaleframework.cpp:16733
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:2558
twobyte CalcHighestDisplacement()
Calculates the highest displacement value found in the entry's chord.
Definition: finaleframework.cpp:16079
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_noteframe.h:640
void SetAccidental(bool state)
Sets the accidental state for the note.
Definition: ff_noteframe.h:314
bool IsPartOfTupletParam(TupletInfo *pInfoStorage=NULL)
Returns true if the entry is part of a tuplet (parameter version).
Definition: finaleframework.cpp:17148
bool GetGraceNote() const
Gets the grace note state of the note entry.
Definition: ff_noteframe.h:1467
bool SetString(FCString *pString, FCKeySignature *pKey, bool writtenpitch)
Changes the note based on the string representation. See FCNote::GetString for syntax.
Definition: finaleframework.cpp:15601
TimeEdu32 GetActualDuration()
Returns the actual duration.
Definition: ff_noteframe.h:768
void SetFindCutaway(bool state)
Sets if entries that are hidden by cutaway notation should be searched in the 'Find' methods...
Definition: ff_noteframe.h:3167
FCNoteEntry * CreateShallowClone()
Creates a shallow copy of the note entry, meaning that the reference to the entry, TGF and notes are the same. The object instance is new, though.
Definition: finaleframework.cpp:17386
Collection class to load all layers for a staff, to be used when the entries in the layers need to in...
Definition: ff_noteframe.h:3668
ENTNUM GetEntryNumber() const
Returns the internal entry number (ID) for the note entry.
Definition: ff_noteframe.h:1059
FCTuplets * CreateTuplets()
Creates a collection for all the tuplets connected to the note entry.
Definition: finaleframework.cpp:16034
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:666
twobyte CalcPitchRaiseLower(bool writtenpitch)
Returns the number of sharps or flats the note actually has in the key signature. ...
Definition: finaleframework.cpp:15293
Class for attaching an tuplet to an entry.
Definition: ff_entrydetails.h:1647
static void DebugOut(const char *pszLine)
Static method to output a line of text for debugging purposes.
Definition: finaleframework.cpp:465
FCNoteEntry * FindEntryStartPosition(TimeEdu32 pos, int layerno)
Finds the entry that starts exacly at the indicated measure position in the indicated layer (or in an...
Definition: finaleframework.cpp:17706
static void MarkMetricsForRebuild()
Static method that sets the refresh flag, so the next Load call will rebuild the metrics data...
Definition: ff_base.h:3290
FCNoteEntryLayers(twobyte staff, twobyte startmeas=1, twobyte endmeas=-1)
The constructor.
Definition: ff_noteframe.h:3684
FCNote * CalcLowestPercussionNote()
For percussion notation, calculates the bottommost percussion note.
Definition: finaleframework.cpp:16310
FCArticulations * CreateArticulations()
Creates a collection for all the articulations attached to the note entry.
Definition: finaleframework.cpp:15985
void SetCrossStaff(bool state)
Sets the cross staff state for the note.
Definition: ff_noteframe.h:417
bool GetBeamBeat() const
Gets the "beam/beat" flag state of the entry.
Definition: ff_noteframe.h:1372
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_basecollection.h:309
void SetUseVisibleLayersOnly(bool value)
Sets the value to if only visible layers should be loaded or not.
Definition: ff_noteframe.h:3721
bool GetSpacing() const
Gets the music spacing state of the note entry.
Definition: ff_noteframe.h:1451
bool GetTieBackwards() const
Gets the backwards tie state for the note.
Definition: ff_noteframe.h:183
void SetFlatBeam(bool state)
Sets the "flat beam" state of the entry.
Definition: ff_noteframe.h:1196
twobyte CalcDisplacementRange()
Calculates the range of the highest and lowest note in a chord.
Definition: finaleframework.cpp:16091
FCNoteEntry * FindClosestPos(TimeEdu32 pos)
Finds the entry that is closest to the indicated duration position. All loaded layers will be scanned...
Definition: finaleframework.cpp:17739
void SetClefIndex(eClef clef)
Sets the clef index for the entry.
Definition: ff_noteframe.h:1245
bool CalcEntriesInMultiLayers()
Returns true if the note entry cell contain entries from more than one layer.
Definition: ff_noteframe.h:2709
bool DeleteNote(FCNote *pNote)
Deletes a note from a chord. The note collection is rebuilt after the deletion.
Definition: finaleframework.cpp:16564
void SetMeasurePos(TimeEdu32 value)
Sets the elapsed position in the measure for the entry.
Definition: ff_noteframe.h:1364
bool Save()
Saves the note entries for the cell. Mirror frames are never saved.
Definition: finaleframework.cpp:17622
bool GetLedgerLines() const
Gets the ledger line state for the note entry.
Definition: ff_noteframe.h:1387
Abstract class that encapsulate collections of note entries (of the FCNoteEntry class). The note entries doesn't need to belong to the same TGF frame.
Definition: ff_noteframe.h:2503
void SetAccidentals(bool bAccidental)
Sets/removes accidental display for all chord notes in the entry.
Definition: finaleframework.cpp:16440
virtual ~FCNoteEntryLayer()
The destructor.
Definition: ff_noteframe.h:3307
void SetFloatingRest(bool state)
Sets the floating rest status of the entry.
Definition: ff_noteframe.h:1273
bool GetAccidentalFreeze() const
Returns the freezed accidental state.
Definition: ff_noteframe.h:103
twobyte GetLayerNumber() const
Returns the 1-based layer number that the entry belongs to.
Definition: ff_noteframe.h:1577
FCNoteEntryCell(int measure, int staff)
The constructor.
Definition: ff_noteframe.h:2639
twobyte CalcResize()
Calculates the resize percent for the note entry.
Definition: finaleframework.cpp:16724
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_noteframe.h:774
bool GetCrossStaff() const
Gets the cross staff state for the note.
Definition: ff_noteframe.h:191
void SetFindNotes(bool state)
Sets if note entries (=non-rests) should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3124
FCNoteEntry(EXENTRY *pEntry, EXTGF2005a *pFrame, FCNoteEntry *pPrevious)
The constructor.
Definition: ff_noteframe.h:887
bool IsStartOfTupletParam(TupletInfo *pInfoStorage=NULL)
Returns true if the entry is the start of a tuplet (parameter version).
Definition: finaleframework.cpp:17110
void CopyFrom(FCNote *pNote)
Copies the note pitch info from a FCNote object.
Definition: ff_noteframe.h:674
bool GetNoteDetailFlag() const
Returns true for existing note detail records.
Definition: ff_noteframe.h:1789
void SetBeamBeat(bool state)
Sets the "beam/beat" state of the entry.
Definition: ff_noteframe.h:1178
void Set16BitFlag(FLAG_16 *flag, FLAG_16 flagbits, bool state)
Sets a 16 bit flag in the data block.
Definition: finaleframework.cpp:573
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:884
Definition: ff_noteframe.h:2607
bool IsInSuccession(FCNoteEntry *pEntry1, FCNoteEntry *pEntry2)
Verifies that 2 entries really appears directly after one another in the layer.
Definition: ff_noteframe.h:3569
bool CalcAccidental() const
Returns the displayed state of an accidental. This is the method that should be used to find out if a...
Definition: finaleframework.cpp:15738
virtual ~FCNoteEntryCell()
The destructor.
Definition: ff_noteframe.h:2663
void SetLedgerLines(bool state)
Sets the ledger line state for the note entry.
Definition: ff_noteframe.h:1204
bool GetSmartShapeFlag() const
Returns true if the entry is marked to contain smart shapes.
Definition: ff_noteframe.h:1850
FCNote * FindNoteID(twobyte noteID)
Definition: finaleframework.cpp:16406
void SetTupletStartFlag(bool state)
Sets the flag that marks that a tuplet starts on the entry.
Definition: ff_noteframe.h:1319
twobyte GetEndMeasure() const
Returns the 1-based end measure number.
Definition: ff_noteframe.h:3401
bool GetFindVoice2Launch() const
Returns if entries that marked as voice 2 start should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3043
FCNoteEntries * CreateRegionEntries(FCMusicRegion *pRegion)
Extracts just the entries that are within the region into a collection.
Definition: finaleframework.cpp:18249
void SetSpacing(bool state)
Sets the music spacing state of the note entry.
Definition: ff_noteframe.h:1124
Collection class for FCNoteheadMod class objects. The collection would typically collect all notehead...
Definition: ff_entrydetailscollection.h:389
FCNote * CalcHighestNote(FCNote *pCeiling=NULL)
Finds the note with the highest pitch in the chord.
Definition: finaleframework.cpp:16144
ENTNUM GetENTNUM()
Returns the entry number.
Definition: ff_noteframe.h:762
void CopyEntry(FCNoteEntry *pFromEntry)
Copies the duration and notes (or rest) from the source entry.
Definition: finaleframework.cpp:16470
bool GetFindCutaway() const
Returns if entries that are hidden by cutaway notation should be searched in the 'Find' methods...
Definition: ff_noteframe.h:3007
twobyte GetMeasure() const
Returns the entry's measure.
Definition: ff_noteframe.h:1858
void SetGraceNote(bool state)
Sets the grace note state of the note entry.
Definition: ff_noteframe.h:1140
static void DebugOutDigit(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in d...
Definition: finaleframework.cpp:274
void SetFindRests(bool state)
Sets if rest entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3137
Class that contains information about the note, without being dependent on a note entry frame...
Definition: ff_noteframe.h:682
int GetMeasure()
Returns the measure number, if CloneEntryPositionData has been used.
Definition: ff_noteframe.h:739
int GetStaff()
Returns the staff number, if CloneEntryPositionData has been used.
Definition: ff_noteframe.h:743
void SetAccidentalFreeze(bool state)
Sets the freezed accidental state.
Definition: ff_noteframe.h:321
TimeEdu32 GetDuration() const
Gets the symbolic duration of the entry. For tuplet entries, the symbolic duration would be different...
Definition: ff_noteframe.h:1520
FCNote * GetItemAt(int index)
Overload version of GetItemAt(), which returns a note object (if available) for the note entry...
Definition: ff_noteframe.h:855
void SetAccidentalParentheses(bool state)
Sets the parentheses accidental state.
Definition: ff_noteframe.h:328
bool CalcUnbeamedNote()
Returns true if the entry is a non-beamed note (=not part of a beamed group.)
Definition: finaleframework.cpp:16900
Definition: ff_noteframe.h:2598
FCNote * CalcLowestNote(FCNote *pFloor=NULL)
Finds the note with the lowest pitch in the chord.
Definition: finaleframework.cpp:16188
Definition: ff_noteframe.h:2601
int GetFrameIndex()
Returns the 0-based frame index within the TGF frame.
Definition: ff_noteframe.h:771
int GetLoadLayerMode() const
Returns the "layer mode" that will be used for the object at a Load() call.
Definition: ff_noteframe.h:2928
TimeEdu32 GetDuration()
Returns the duration.
Definition: ff_noteframe.h:765
bool CloneTuplets(FCNoteEntryLayer *pSource)
Copies the tuplets from one layer to another identical layer after a layer has been cloned...
Definition: finaleframework.cpp:18171
TimeEdu32 CalcLayerDuration(int layerno)
Returns the duration of the indicated layer.
Definition: ff_noteframe.h:2750
bool GetArticulationFlag() const
Returns true if the entry is marked to contain articulations.
Definition: ff_noteframe.h:1843
bool IsLastInMeasure()
Returns true if it's the last entry in the measure frame.
Definition: ff_noteframe.h:1961
bool GetFindVisible() const
Sets if visible entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:2948
void SetStemUp(bool state)
Sets the "stem up" flag for the entry.
Definition: ff_noteframe.h:1256
virtual ~FCNoteEntry()
Definition: finaleframework.cpp:15951
__FCCollection()
The constructor.
Definition: ff_basecollection.h:60
bool GetPlayback() const
Gets the playback status for the note.
Definition: ff_noteframe.h:167
bool HasSameNotes(FCNoteEntry *pEntry)
Compares the notes with the notes in another note entry.
Definition: finaleframework.cpp:16359
ENTRY_DURATIONS
Defintions of common note durations, for use with any operation where the TimeEdu32 type is used...
Definition: ff_noteframe.h:864
FCNote * FindDisplacement(twobyte displacement)
Tries to finds a note in the chord with a specific displacement value.
Definition: finaleframework.cpp:17364
Collection class for FCNoteEntry class objects. This class is intended for the collection of random e...
Definition: ff_noteframe.h:2555
bool GetSpecialAltsFlag() const
Returns true for existing special alteration records.
Definition: ff_noteframe.h:1807
TimeEdu32 GetActualDuration() const
Gets the actual duration of the entry. For tuplet entries, the symbolic duration would be different f...
Definition: ff_noteframe.h:1538
void SetPlayback(bool state)
Sets if the note should play back or be muted.
Definition: ff_noteframe.h:346
bool GetFreezeBeam() const
Gets the freeze state for the "beam/beat".
Definition: ff_noteframe.h:1410
static void MarkEntryMetricsForUpdate()
Static method that mark that the entry-related layout info needs to be rebuilt (for CalcStemUp()...
Definition: ff_noteframe.h:2117
void CacheArticulations()
Stores the available articulations in a cache memory.
Definition: finaleframework.cpp:17286
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:3291
void SetFreezeBeam(bool state)
Sets the freeze state for the "beam/beat".
Definition: ff_noteframe.h:1186
char CalcPitchChar()
Returns the sounding note name character for the note.
Definition: finaleframework.cpp:15250
void SetVisible(bool state)
Sets the visibility state of the note entry.
Definition: ff_noteframe.h:1132
char CalcWrittenPitchChar()
Returns the written note name character for the note.
Definition: finaleframework.cpp:15260
twobyte GetStartMeasure() const
Returns the 1-based start measure number.
Definition: ff_noteframe.h:3394
FCNoteEntry * InsertEntriesBefore(FCNoteEntry *pPositionEntry, int count)
Inserts empty entries to the TGF frame before the indicated point.
Definition: finaleframework.cpp:18271
FCNoteheadMods * CreateNoteheadMods()
Creates a collection for all the notehead modifications attached to the note entry.
Definition: finaleframework.cpp:16002
bool CalcStemUp()
Returns the direction of the beam.
Definition: finaleframework.cpp:16622
TimeEdu32 CalcNondottedDuration()
Returns the non-dotted symbolic duration of the entry.
Definition: ff_noteframe.h:1550
bool GetFlipTie() const
Gets the "flip tie" state of the note entry.
Definition: ff_noteframe.h:1443
FCNoteEntry * GetRegionItemAt(int index, FCMusicRegion *pRegion)
Returns the entry item at the index position - but only if it's within the region.
Definition: finaleframework.cpp:17659
Definition: ff_noteframe.h:2604
bool GetLoadMirrors() const
Returns the state of mirror frame loading that will be used for the object at a Load() call...
Definition: ff_noteframe.h:2937
LOADLAYERMODES
Special layer constants to be used with SetLoadLayerMode().
Definition: ff_noteframe.h:2595
void Set32BitFlag(FLAG_32 *flag, FLAG_32 flagbits, bool state)
Sets a 32 bit flag in the data block.
Definition: finaleframework.cpp:581
void SetFindVoice2Launch(bool state)
Sets if entries that marked as voice 2 start should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3203
bool GetFindRests() const
Returns if rest entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:2981
bool IsStartOfTuplet()
Returns true if the entry is the start of a tuplet.
Definition: finaleframework.cpp:17105
Collection class for FCPerformanceMod class objects (which contains the playback modification data fo...
Definition: ff_entrydetailscollection.h:640
twobyte CalcDots()
Returns the number of dots for a dotted entry.
Definition: ff_noteframe.h:1567
int AddPitches(FCNoteEntry *pSourceEntry, bool unique, bool settie=false)
Adds (appends to the existing notes) all notes from another entry.
Definition: finaleframework.cpp:17202
bool CalcHiddenThroughAltNotation()
Calculates if entry is hidden through alternate notation.
Definition: finaleframework.cpp:16280
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:712
eNoteID GetNoteID() const
Returns the unique note ID.
Definition: ff_noteframe.h:200
bool MoveEntry(FCNoteEntry *pEntry, FCNoteEntryCell *pSourceEntryCell)
Moves the entry from one cell to another. The entry number is preserved (so all note-attached will fo...
Definition: finaleframework.cpp:17565
FCNotePitches * CreateNotePitches()
Create local copies of the note pitches in a collection.
Definition: finaleframework.cpp:17392
void SetCombineRests(bool state)
Sets the flag for if the rest should combine.
Definition: finaleframework.cpp:15967
int CalcCrossStaffNumber()
Returns the staff ID that belongs to the cross staff note.
Definition: finaleframework.cpp:15153
FCNoteEntry * FindCoveredEntry(TimeEdu32 pos, int layerno)
Finds the entry that is at the indicated measure position in the indicated layer. ...
Definition: finaleframework.cpp:17725
static void MarkMetricsForRebuild()
Static method that sets the flag that the metrics should be rebuilt on the next load.
Definition: ff_base.h:3030
bool GetCheckAccidentals() const
Returns the accidental "refresh" flag.
Definition: finaleframework.cpp:17413
void SetLoadMirrors(bool state)
Sets if mirror frames should be loaded. The default is that they are loaded.
Definition: ff_noteframe.h:3444
bool SaveAll()
Saves all the layers for the full measure span.
Definition: ff_noteframe.h:3709
int GetCount() const
Returns the number of elements of the collection.
Definition: ff_basecollection.h:86
FCNoteEntryLayer * GetItemAt(int index)
Overloaded version of GetItemAt().
Definition: ff_noteframe.h:3727
bool GetStemDetailFlag() const
Gets the flag state for stem detail records.
Definition: ff_noteframe.h:1828
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:2633
twobyte GetStaff() const
Returns the entry's staff.
Definition: ff_noteframe.h:1866
bool DeleteAllNullEntries()
Deletes all entries from the layer (and TGFs) that are 0 in length.
Definition: finaleframework.cpp:18005
bool GetBitFlag(FLAG_32 flag, FLAG_32 flagbits) const
Gets a state from flag bits. Returns true if any bit in the mask is set.
Definition: ff_base.h:449
void SetLegality(bool state)
Sets the legality bit, marking that the note is valid.
Definition: ff_noteframe.h:356
twobyte GetRestDisplacement()
Returns the rest displacement.
Definition: finaleframework.cpp:15979
twobyte GetStaff() const
Returns the staff that the cell belongs to.
Definition: ff_noteframe.h:3059
twobyte CalcMIDIKey()
Returns the MIDI key number for the note.
Definition: finaleframework.cpp:15450
bool CalcFlippable()
Signals if the entry would flip when the up/down state is changed.
Definition: finaleframework.cpp:16799
bool GetStemUp() const
Returns the state of the "up" bit for the entry. This is NOT the same as the true direction for the s...
Definition: ff_noteframe.h:1502
void SetFlipTie(bool state)
Sets the "flip tie" of the note entry.
Definition: ff_noteframe.h:1116
bool IsOverlappedEntry(FCNoteEntry *pTestEntry)
Returns true if the test entry is at least partly overlapping the current entry.
Definition: finaleframework.cpp:17130
twobyte CalcOctave(FCKeySignature *pKey, int transposeinterval=0)
Returns the sounding octave for the note.
Definition: finaleframework.cpp:15753
bool GetTie() const
Gets the tie start state for the note.
Definition: ff_noteframe.h:175
twobyte CalcWrittenOctave(FCKeySignature *pKey, int transposevalue, bool simplifytranspose, bool chromatictranspose)
Returns the written octave for the note, taking a specific transposition into account.
Definition: finaleframework.cpp:15780
Collection class for FCTuplet class objects.
Definition: ff_entrydetailscollection.h:250
bool IsHigherPitchThan(FCNote *pPitchCompareNote)
Returns true if the pitch is higher than the pitch in the parameter's note.
Definition: finaleframework.cpp:15505
bool GetGraceNoteSlash() const
Gets the grace note slash state of the note entry.
Definition: ff_noteframe.h:1476
bool GetLegality() const
Gets the legality bit, that marks that the note is valid.
Definition: ff_noteframe.h:138
Encapsulates one note in a note entry (from the FCNoteEntry class).
Definition: ff_noteframe.h:27
void ClearFrames()
Clears the collection and frees all associated TGF frame data.
Definition: ff_noteframe.h:3314
void SetActualDuration(TimeEdu32 value)
Sets the actual duration for the entry.
Definition: ff_noteframe.h:1350
bool IsTiedBackwards()
Returns true if any of the notes in the chord is flagged to be tied from the previous entry...
Definition: finaleframework.cpp:17036
eClef GetClefIndex() const
Gets the clef that's used for the entry.
Definition: ff_noteframe.h:1594
void SetLegality(bool state)
Sets the legality bit, marking that the entry is valid.
Definition: ff_noteframe.h:1233
bool Save()
Saves the note entries for the layer. Mirrors frames are never saved.
Definition: finaleframework.cpp:18120
void MarkForErase()
Marks the note for erase when the entry is saved.
Definition: ff_noteframe.h:627
void SetLoadMirrors(bool state)
Sets if mirrors should be loaded as well. (The default is that mirrors are loaded.)
Definition: ff_noteframe.h:3085
FCNoteEntry * InsertEntriesAfter(FCNoteEntry *pPositionEntry, int count, bool nextmeasure=false)
Inserts empty entries to the TGF frame at the indicated point.
Definition: finaleframework.cpp:18344
bool GetFindNotes() const
Returns if note entries (=non-rests) should be searched in the 'Find' methods, or not...
Definition: ff_noteframe.h:2970
void SetDisplacement(twobyte disp)
Sets the note's vertical position on the staff. The displacement is relative to the key...
Definition: ff_noteframe.h:365
static TimeEdu32 CalcNondottedDurationForDuration(TimeEdu32 duration)
Static method that truncates duration to give only return the non-dotted duration value...
Definition: finaleframework.cpp:15882
static bool IsValidDuration(TimeEdu32 duration)
Static method that evaluates the validity of a duration value.
Definition: finaleframework.cpp:15910
bool IsLowerPitchThan(FCNote *pPitchCompareNote)
Returns true if the pitch is lower than the pitch in the parameter's note.
Definition: finaleframework.cpp:15516
bool IsTiedToPrevious()
Return true if the previous entry has a tie to this entry.
Definition: finaleframework.cpp:17015
bool GetLyricFlag() const
Returns the flag that marks that an entry has syllable attached to it.
Definition: ff_noteframe.h:1820
bool GetGraceNote()
Returns the grace note state, if CloneEntryPositionData has been used.
Definition: ff_noteframe.h:751
bool CalcRightsidePlacement()
Returns true if the notehead is on the right side of the stem.
Definition: finaleframework.cpp:15163
void AddFromEntry(FCNoteEntry *pEntry)
Adds all the note pitches from a note entry.
Definition: finaleframework.cpp:15843
twobyte GetMeasure() const
Returns the measure that the cell belongs to.
Definition: ff_noteframe.h:3051
bool GetFindVoice1() const
Returns if entries that marked as voice 1 should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3019
void ClearAllEntries()
Removes all the entries from the layer, but keeps all the TGFs. So it's possible to (for example) sav...
Definition: ff_noteframe.h:3369
void SetFindVoice1(bool state)
Sets if entries that marked as voice 1 should be searched in the 'Find' methods, or not...
Definition: ff_noteframe.h:3179
Base class for the Finale Framework classes.
Definition: ff_base.h:47
void SetLyricFlag(bool state)
Sets the flag that marks that an entry has syllable attached to it.
Definition: ff_noteframe.h:1325
bool GetFreezeStem() const
Gets the "Freeze Stem" state for the note entry.
Definition: ff_noteframe.h:1394
void SetRestDisplacement(twobyte value)
Sets the displacement for a rest entry.
Definition: finaleframework.cpp:15960
Class to load a layer on the same staff. This class is for example suitable when working with music l...
Definition: ff_noteframe.h:3230
void CopyEntryPercussionDetails(FCNoteEntry *pFromEntry)
Copies note-related data between percussion entries.
Definition: finaleframework.cpp:16543
bool GetLegality() const
Gets the legality bit, that marks that the entry is valid.
Definition: ff_noteframe.h:1403
bool IsNote()
Returns true if entry is a note.
Definition: ff_noteframe.h:1886
bool CalcSmallestNoteheadResize(FCNumber *pSmallestFontSize, FCNumber *pSmallestResize)
Calculates the smallest point size and the smallest notehead % resize for the entry.
Definition: finaleframework.cpp:16666
FCNoteEntry * AppendEntriesInLayer(int layerno, int noofentries)
Adds empty entries to the the end of a specific layer in the cell. The note entry cell must be loaded...
Definition: finaleframework.cpp:17505
int GetLayerNumber()
Returns the 1-based layer number, if CloneEntryPositionData has been used.
Definition: ff_noteframe.h:747
twobyte CalcBeamCount()
Returns the number of beams/flags for the entry, based on the duration.
Definition: ff_noteframe.h:1647
TimeEdu32 GetMeasurePos() const
Returns the elapsed duration position in the measure for the entry.
Definition: ff_noteframe.h:1781
bool GetPerformanceDataFlag() const
Returns true for existing performance data records.
Definition: ff_noteframe.h:1799
void SetFindVisible(bool state)
Sets if visible entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3098
void SetManualPosition(Evpu16 pos)
Sets the manual positioning of the entry.
Definition: ff_noteframe.h:1239
FCNoteEntry * PreviousInFrame()
Returns the previous note entry in the linked collection (layer or cell), but only within the frame...
Definition: ff_noteframe.h:990
static int CalcDotsForDuration(TimeEdu32 duration)
Static method that calculates the number of dots a specific duration would get.
Definition: finaleframework.cpp:15894
bool CalcBeamedGroupEnd()
Returns true if it's the end entry in a beamed group.
Definition: finaleframework.cpp:16867
bool IsDotted()
Returns true if it's a dotted entry.
Definition: finaleframework.cpp:17069
bool GetAccidental() const
Gets the accidental state bit for the note. This method should normally NOT be used (use CalcAccident...
Definition: ff_noteframe.h:96
bool GetVoice2Launch() const
Returns true if the entry launches voice 2.
Definition: ff_noteframe.h:1490
FCNote * AddNewNote()
Adds a new note to the chord.
Definition: finaleframework.cpp:16417
void CopyNotes(FCNoteEntry *pFrom)
Copies all pitches and other note information from another entry. The old notes for the entry will be...
Definition: finaleframework.cpp:16450
bool GetCombineRests() const
Returns the flag for if the rest should combine.
Definition: finaleframework.cpp:15973
FCNoteEntry * GetRegionItemAt(int index, FCMusicRegion *pRegion)
Returns the indexed item that appear in the region.
Definition: finaleframework.cpp:18216
void ClearPitches()
Clears all pitches from the entry, to prepare to add new notes.
Definition: finaleframework.cpp:17196
bool GetFindAlternateNotation() const
Returns if entries that are hidden by a staff definition or staff style should be searched in the 'Fi...
Definition: ff_noteframe.h:2995
void SetLoadLayerMode(int mode)
Sets the "layer mode" for the Load method. This must be called/st before any Load() call...
Definition: ff_noteframe.h:3078
twobyte GetRaiseLower() const
Returns the raised/lowered state of the note.
Definition: ff_noteframe.h:149
void SetUseVisibleLayer(bool value)
Sets the value to only load visible layers.
Definition: ff_noteframe.h:3426
FCNoteEntry * Previous()
Returns the previous note entry in the linked collection (layer or cell).
Definition: ff_noteframe.h:980
void SetNoteDetailFlag(bool state)
Sets the flag state for note detail records.
Definition: ff_noteframe.h:1281
static void DebugOutBool(const char *pszPrefixText, bool state)
Static method that outputs a line for debugging purposes. The boolean state appears afterwards as eit...
Definition: finaleframework.cpp:390
Encapsulates a note as a locally stored data, instead of a reference in a TGF.
Definition: ff_noteframe.h:662
FCNoteEntryLayer(twobyte layer, twobyte staff, twobyte startmeas=1, twobyte endmeas=-1)
The constructor.
Definition: finaleframework.cpp:17815
twobyte GetStaff() const
Returns the 1-based staff number where the layer is loaded/saved.
Definition: ff_noteframe.h:3388
Simple class to put numbers into collections.
Definition: ff_base.h:3840
static TimeEdu32 CalcValidDuration(TimeEdu32 duration)
Static method that calculates a valid note duration value by truncating the value if necessary...
Definition: finaleframework.cpp:15930
Collection class for FCArticulation class objects.
Definition: ff_entrydetailscollection.h:22
bool CalcLargestNoteheadResize(FCNumber *pLargestFontSize, FCNumber *pLargestResize)
Calculates the largest point size and the largest notehead % resize for the entry.
Definition: finaleframework.cpp:16633
void SetPlayback(bool state)
Sets the playback state of the note entry.
Definition: ff_noteframe.h:1102
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_noteframe.h:52
void SetMIDIKey(twobyte midikey)
Sets the MIDI key number for the note.
Definition: finaleframework.cpp:15469
FCPerformanceMods * CreatePerformanceMods()
Creates a collection for all the MIDI performance modifications attached to the note entry...
Definition: finaleframework.cpp:16018
bool GetSecondaryBeamFlag() const
Returns true for secondary beam detail records.
Definition: ff_noteframe.h:1836
void CopyEntryDetails(FCNoteEntry *pFromEntry, bool copytuplets)
Copies note-related data from another entry.
Definition: finaleframework.cpp:16481
void SetFreezeStem(bool state)
Sets the "Freeze Stem" state for the note entry.
Definition: ff_noteframe.h:1211
static void DebugOutHex(const char *pszPrefixText, int i)
Static method that outputs a line for debugging purposes. The text appears with the extra digit (in h...
Definition: finaleframework.cpp:343
void SetLayerIndex(twobyte layerno)
Sets the layer number. USE WITH EXTREME CARE!
Definition: finaleframework.cpp:17942
Evpu16 GetManualPosition() const
Gets the manual positioning of the entry.
Definition: ff_noteframe.h:1584
FCNoteEntry * GetItemAt(int index)
Overridden version of the GetItemAt() method.
Definition: ff_noteframe.h:3211
bool IsTied()
Returns true if any of the notes in the chord is tied to the next entry.
Definition: finaleframework.cpp:17025
int CalcRegionCount(FCMusicRegion *pRegion)
Calculates the number of entries that are within the region.
Definition: finaleframework.cpp:18206
bool DeleteEntry(FCNoteEntry *pEntry)
Deletes an entry from the cell (and TGF).
Definition: finaleframework.cpp:17537
Class for iterator handlers.
Definition: ff_iterator.h:25
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
bool GetVoice2() const
Returns true if it's a voice 2 entry.
Definition: ff_noteframe.h:1483
Encapsulates a note entry from an owner class (for example FCNoteEntryCell, FCNoteEntryLayer) class...
Definition: ff_noteframe.h:808
bool GetLoadMirrors() const
Returns if mirror frames should be loaded. The default is that they are loaded.
Definition: ff_noteframe.h:3408
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_noteframe.h:3637
void SetFindAlternateNotation(bool state)
Sets if entries that are hidden by a staff definition or staff style should be searched in the 'Find'...
Definition: ff_noteframe.h:3153
int CalcDisplacementMatchCount(FCNoteEntry *pCompareEntry)
Calculates the number of matching note displacements between the entries.
Definition: finaleframework.cpp:16126
FCNoteEntry * CalcBeamStartEntry()
Returns the start entry of the beamed group where the entry belongs. If the "Extend beams over rests"...
Definition: finaleframework.cpp:16883
FCNoteEntry * GetEntry() const
Returns the note entry object for the note.
Definition: ff_noteframe.h:83
bool GetFloatingRest() const
Gets the floating rest status of the entry.
Definition: ff_noteframe.h:1528
void MakeMovableRest()
Turns the entry into a movable rest.
Definition: finaleframework.cpp:17319
void CopyNote(FCNote *pFrom)
Copies all pitches and other note information from one single note. The old notes for the entry will ...
Definition: finaleframework.cpp:16462
bool IsAllTiedBackwards()
Returns true if all of the notes in the chord has a flagged to be tied from the previous entry...
Definition: finaleframework.cpp:17058
void SetGraceNoteSlash(bool state)
Sets the slashed state for a grace note entry.
Definition: ff_noteframe.h:1162
bool GetUseVisibleLayer() const
Gets the value that controls to only load visible layers.
Definition: ff_noteframe.h:3417
Class that encapsulates EREGION and provides additional functionality to region handling.
Definition: ff_region.h:24
int AddArticulations(FCNoteEntry *pSourceEntry, bool bNoDuplicates=true)
Adds (appends to the existing ones) all articulations from another entry.
Definition: finaleframework.cpp:17254
int CalcMeasureSpan()
Returns the total number of measures the layer spans.
Definition: ff_noteframe.h:3597
void SetNoteFlag(bool state)
Sets if the entry is a note or a rest.
Definition: ff_noteframe.h:1094
bool GetFindHidden() const
Returns if hidden entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:2959
void SetTieBackwards(bool value)
Sets the "tie end" state for the note.
Definition: ff_noteframe.h:406
void SetSmartShapeFlag(bool state)
Sets the flag that marks that a smart shape is attached to the entry.
Definition: ff_noteframe.h:1312
bool IsRest()
Returns true if entry is a rest.
Definition: ff_noteframe.h:1894
FCNote(int index, EXNOTE *pexnote, FCNoteEntry *pParent)
The constructor.
Definition: ff_noteframe.h:55
FCNote * CalcHighestPercussionNote()
For percussion notation, calculates the topmost percussion note.
Definition: finaleframework.cpp:16232
void TieAll(bool bTie)
Ties or unties all chord notes for the entry.
Definition: finaleframework.cpp:16430
bool IsIdenticalPitch(FCNote *pPitchNote)
Returns true if the pitch is identical to the supplied note.
Definition: finaleframework.cpp:15480
bool IsAllTied()
Returns true if all of the notes in the chord is tied to the next entry.
Definition: finaleframework.cpp:17047
void SetPerformanceDataFlag(bool state)
Sets the flag state for performance data records.
Definition: ff_noteframe.h:1289
void SetFindHidden(bool state)
Sets if hidden entries should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3111
Class that encapsulate a cell of note entries.
Definition: ff_noteframe.h:2574
Class for key signatures. Instances of this class is auto-created by FCMeasure:GetKeySignature and FC...
Definition: ff_keysig.h:22
int CalcGraceNoteIndex()
Returns the grace note index for the entry.
Definition: finaleframework.cpp:16052
void Add(__FCBase *pNewItem)
Adds an element to the end of the collection.
Definition: finaleframework.cpp:12756
bool LoadAll()
Load all the layers for the full measure span and assemble them into a collection. Each layer contains of the full music from a layer from that span.
Definition: ff_noteframe.h:3695
void SetArticulationFlag(bool state)
Sets the flag that marks that an articulation is attached to the entry.
Definition: ff_noteframe.h:1305
bool GetTupletStartFlag() const
Returns true if the entry is marked to start a tuplet.
Definition: ff_noteframe.h:1814
bool IsLayerContainingEntries(int layerno)
Returns true if the indicated layer contains currently loaded note entries.
Definition: ff_noteframe.h:2731
int AddPitch(FCNote *pNote)
Adds a note to a chord.
Definition: finaleframework.cpp:17242
void SetCheckAccidentals(bool state)
Marks the entry that the accidentals should be verified when the frame is saved.
Definition: finaleframework.cpp:17407
TimeEdu32 GetMeasurePos()
Returns the duration position within the measure, if CloneEntryPositionData has been used...
Definition: ff_noteframe.h:759
bool GetVisible() const
Gets the visibility state of the note entry.
Definition: ff_noteframe.h:1459
twobyte CalcWidestNoteheadWidth()
Returns the widest width of a notehead in the entry, as the non-printing width.
Definition: finaleframework.cpp:16701
bool GetFindVoice2() const
Returns if entries that marked as voice 2 should be searched in the 'Find' methods, or not.
Definition: ff_noteframe.h:3031
FCNotePitch()
The constructor.
Definition: ff_noteframe.h:669
bool GetSpacing() const
Returns if the note should be used in the spacing algorithm or not.
Definition: ff_noteframe.h:157
FCNoteEntry * GetItemAt(int index)
Overridden version of GetItemAt().
Definition: ff_noteframe.h:2541
void CloneEntryPositionData(FCNoteEntry *pEntry)
Copies the "important" entry data, so it can be used for analytical purpose, without the need of a TG...
Definition: finaleframework.cpp:15862
void SetNoteID(eNoteID noteid)
Sets the unique note ID. Use with extreme care!
Definition: ff_noteframe.h:386
bool CalcOnLedgerLine()
Returns true if the note appears on a ledger line.
Definition: finaleframework.cpp:15141
void ClearFrame()
Clears the collection and frees the associated TGF frame data.
Definition: ff_noteframe.h:2760
void SetSpecialAltsFlag(bool state)
Sets the flag state for special alteration records.
Definition: ff_noteframe.h:1297
void MakeRest()
Turns the entry into a rest (without any displacement).
Definition: finaleframework.cpp:17309
FCNoteEntry * FindEntryNumber(ENTNUM entnum)
Finds the entry item in the collection with the given note entry number.
Definition: ff_noteframe.h:2530
bool IsPartOfTuplet()
Returns true if the entry is part of a tuplet.
Definition: finaleframework.cpp:17125
FCNoteEntry * Next()
Returns the next entry in the loaded entry chain (within the same layer).
Definition: ff_noteframe.h:1878
bool DeleteAllRestFrames()
Deletes all full frames (measures) that only contains of rests in the note entry layer.
Definition: finaleframework.cpp:18036
void GetString(FCString *pString, FCKeySignature *pKey, bool simplifydoublesharp=false, bool writtenpitch=false)
Creates a string representation of the note.
Definition: finaleframework.cpp:15528
bool GetFlatBeam() const
Gets the "flat beam" state of the entry.
Definition: ff_noteframe.h:1420
int ForEachInRegion(FCIteratorHandler *pIterator, FCMusicRegion *pRegion)
Iterates through the layer's entries that fit in a region.
Definition: finaleframework.cpp:18231
void SetStemDetailFlag(bool state)
Sets the flag state for stem detail records.
Definition: ff_noteframe.h:1333
twobyte GetLayerIndex() const
Returns the 0-based layer number where the layer data is loaded/saved.
Definition: ff_noteframe.h:3382
void SetSecondaryBeamFlag(bool state)
Sets the flag state for secondary beam detail records.
Definition: ff_noteframe.h:1341
FCNoteEntry * FindNextEntryPos(TimeEdu32 pos)
Finds the first entry that appears after the indicated position. All loaded layers will be scanned...
Definition: finaleframework.cpp:17760
void SetFindVoice2(bool state)
Sets if entries that marked as voice 2 should be searched in the 'Find' methods, or not...
Definition: ff_noteframe.h:3191
void SetVoice2(bool state)
Sets the voice 2 status for the entry.
Definition: ff_noteframe.h:1147
void SetDuration(TimeEdu32 duration)
Sets the symbolic duration of the note. For tuplet entries, the symbolic duration would be different ...
Definition: ff_noteframe.h:1265
bool IsRestMovable()
Returns true if it's a movable rest.
Definition: finaleframework.cpp:17300
int GetGraceNoteIndex()
Returns the grace note index for grace notes, if CloneEntryPositionData has been used.
Definition: ff_noteframe.h:755
bool GetAccidentalParentheses() const
Returns the parentheses accidental state.
Definition: ff_noteframe.h:110
FCNote * FindPitch(FCNote *pPitchNote)
Tries to finds a note in the chord with the identical pitch as the suppied note.
Definition: finaleframework.cpp:17375
FCNotePitch * GetItemAt(int index)
Overloaded version of GetItemAt().
Definition: ff_noteframe.h:710
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition: ff_basecollection.h:24
void SetSpacing(bool state)
Sets if the note should be used in the spacing algorithm or not.
Definition: ff_noteframe.h:336
twobyte CalcHighestStaffPosition()
Calculates the highest staff position for a note in the entry's chord.
Definition: finaleframework.cpp:16066
bool GetCrossStaff() const
Returns the cross staff state for the entry.
Definition: ff_noteframe.h:1510
twobyte CalcStaffPosition()
Calculates the displacement from the top staffline. It takes the current score position into account ...
Definition: finaleframework.cpp:15205
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: finaleframework.cpp:547
bool DeleteAllNullEntries()
Deletes all entries from the cell (and TGF) that are 0 in duration.
Definition: finaleframework.cpp:17582