24 twobyte _transposealteration;
28 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
34 virtual EXTAG
Tag() {
return 0; }
36 virtual void*
Allocate() {
return (
void*) &_key; }
45 _transposealteration = ((
FCKeySignature*)pSource)->GetTransposeAlteration();
64 _transposealteration = 0;
68 virtual const char*
ClassName() {
return "FCKeySignature"; }
76 void SetID(eKey newkey) { _key = newkey; }
87 _transposealteration = value;
105 if (accidentalnumber < -7)
return;
106 if (accidentalnumber > 7)
return;
107 _key = MakeLinearKey( accidentalnumber, KEYMODE_MAJOR);
118 if (accidentalnumber < -7)
return;
119 if (accidentalnumber > 7)
return;
120 _key = MakeLinearKey( accidentalnumber, KEYMODE_MINOR);
157 twobyte keyalteration = GetKeyAlteration(_key);
161 keyalteration += _transposealteration;
164 if (keyalteration < -7)
168 if (keyalteration > 7)
175 if (IsMinorKey(_key))
176 return MAKE_TWOBYTE( keyalteration, KEYMODE_MINOR );
177 else if (IsMajorKey(_key))
178 return MAKE_TWOBYTE( keyalteration, KEYMODE_MAJOR );
191 return _transposealteration;
308 #ifdef PDK_FRAMEWORK_DEBUG
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_base.h:918
void * _datablock
Pointer to the object's data block, the meaning is implementation-specific for each derived subclass...
Definition: ff_base.h:640
bool IsFlatNote(int letterindex)
Returns true if the key is adding a flat to the note.
Definition: finaleframework.cpp:15073
int CalcScaleRootIndex()
Returns the scale's "letter root", as a 0-base index starting from 'A'.
Definition: finaleframework.cpp:14984
bool IsIdentical(FCKeySignature *pCompareSig)
Returns true if the key is identical to the compared key signature.
Definition: finaleframework.cpp:15032
void SetID(eKey newkey)
Sets the key signature ID.
Definition: ff_keysig.h:76
bool IsMajor()
Returns true if the key is a major key signature.
Definition: ff_keysig.h:266
twobyte GetAlteration() const
Returns the alteration for the key. Negative if the key signatures contains flats, positive if the signature contains sharps.
Definition: ff_keysig.h:141
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_keysig.h:68
void SetTransposeSimplify(bool state)
Sets if a transposed key should be simplified.
Definition: ff_keysig.h:92
int CalcRootRelationIndex()
Returns the scale's root relation to C major in the circle of fifths.
Definition: finaleframework.cpp:15002
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition: ff_base.h:60
virtual void CloneMemoryFrom(__FCBaseData *pSource)
Definition: finaleframework.cpp:753
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
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_keysig.h:309
bool GetTransposeSimplify() const
Returns true if the transposed key should be simplified.
Definition: ff_keysig.h:196
virtual const PDKFRAMEWORK_CLASSID GetClassID()
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition: ff_keysig.h:69
twobyte GetTransposeAlteration() const
Returns the current transposition alteration index.
Definition: ff_keysig.h:189
void MakeString(FCString *pString)
Creates a string representation of the key.
Definition: finaleframework.cpp:15043
virtual void * Allocate()=0
void SetMinorKey(int accidentalnumber)
Sets the key signature to a minor key.
Definition: ff_keysig.h:116
eKey GetID() const
Gets the key signature ID.
Definition: ff_keysig.h:130
twobyte CalcSharps()
Returns the number of sharps in the key signature.
Definition: finaleframework.cpp:14976
bool IsMinor()
Returns true if the key is a minor key signature.
Definition: ff_keysig.h:272
twobyte CalcFlats()
Returns the number of flats in the key signature.
Definition: finaleframework.cpp:14968
int _loadedsize
Loaded size of the data block for a loaded object, in bytes. Since the datablock is implementation-sp...
Definition: ff_base.h:653
bool GetTransposeChromatic() const
Returns true if the transposed key is chromatic.
Definition: ff_keysig.h:203
Base class for all data-related classes (that handles Finale data).
Definition: ff_base.h:628
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
virtual __FCBaseData * CreateObject()=0
Creates a new instance of the object.
void SetMajorKey(int accidentalnumber)
Sets the key signature to a major key.
Definition: ff_keysig.h:103
bool IsSharpNote(int letterindex)
Returns true if the key is raising the note.
Definition: finaleframework.cpp:15061
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
FCKeySignature()
The constructor. Sets the default key signature to C major.
Definition: ff_keysig.h:61
virtual EXTAG Tag()=0
The Enigma tag for the derived class.
eKey GetIDWithTransposition() const
Returns the key signature ID with the transposition (and transposition simplification) added...
Definition: ff_keysig.h:152
Class for key signatures. Instances of this class is auto-created by FCMeasure:GetKeySignature and FC...
Definition: ff_keysig.h:22
bool IsPredefined() const
Returns true if the key is a predefined key signature (major or minor).
Definition: ff_keysig.h:260
int CalcRootRelationAbsoluteIndex()
Returns the scale's root relation to C in the circle of fifths, based on the root's note...
Definition: finaleframework.cpp:15014
virtual int DataSizeLoad()=0
Returns the data size for the data structure that should be loaded.
virtual bool LoadFirst()
Finding first key sig recs currently not supported.
Definition: ff_keysig.h:57
void SetTransposeAlteration(twobyte value)
Sets the transpose alteration offset, if the key should be calculated based on a transposition of an ...
Definition: ff_keysig.h:85