28 twobyte _transposealteration;
37 eHarmLev _CalcKeyStepsInNormalizedDiatonicInterval(eHarmLev normalizedInterval)
const;
43 eHarmLev _CalcKeyStepsBetweenScaleDegrees(eHarmLev first, eHarmLev second)
const;
49 eHarmAlt _CalcStepsInAlteration(eHarmLev diatonicInterval, eHarmLev alteration)
const;
57 _transposealteration = 0;
61 const char*
ClassName()
const override {
return "FCKeySignature"; }
70 if (
IsLinear())
return GetLinearKeyMode(_key);
79 void SetID(eKey newkey) { _key = newkey; }
90 _transposealteration = value;
110 if (accidentalnumber < -7)
return;
111 if (accidentalnumber > 7)
return;
112 _key = MakeLinearKey( accidentalnumber, KEYMODE_MAJOR);
123 if (accidentalnumber < -7)
return;
124 if (accidentalnumber > 7)
return;
125 _key = MakeLinearKey( accidentalnumber, KEYMODE_MINOR);
160 twobyte keyalteration = GetKeyAlteration(_key);
164 keyalteration += _transposealteration;
167 if (keyalteration < -6)
171 if (keyalteration > 6)
178 return MakeLinearKey( keyalteration, GetLinearKeyMode(_key) );
191 return _transposealteration;
366#ifdef PDK_FRAMEWORK_DEBUG
Base class for the Finale Framework classes.
Definition ff_base.h:71
PDKFRAMEWORK_CLASSID
Constants for the GetClassID method.
Definition ff_base.h:84
static void DebugOutInt(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:335
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition finaleframework.cpp:609
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:451
Class for key signatures. Instances of this class are auto-created by FCMeasure:GetKeySignature and F...
Definition ff_keysig.h:25
eHarmLev CalcScaleNumber(eHarmLev displacement) const
Calculate the scale number of the input displacement value.
Definition finaleframework.cpp:16146
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_keysig.h:61
FCKeySignature(eKey key=KEY_C_MAJOR)
The constructor. Sets the default key signature to C major is no key is supplied.
Definition ff_keysig.h:54
int CalcScaleRootIndex() const
Returns the scale's "letter root", as a 0-base index starting from 'A'. Only predefined major and min...
Definition finaleframework.cpp:16176
bool IsMinor() const
Returns true if the key is a minor key signature, using the predefined minor key mode.
Definition ff_keysig.h:311
bool IsLinear() const
Returns true if the key mode can transpose its key signature. This includes standard major and minor ...
Definition ff_keysig.h:299
eKey GetID() const
Gets the key signature ID.
Definition ff_keysig.h:134
int CalcRootRelationAbsoluteIndex() const
Returns the scale's root relation to C in the circle of fifths, based on the root's note....
Definition finaleframework.cpp:16207
twobyte CalcSharps() const
Returns the number of sharps in the key signature. Only predefined major and minor keys are supported...
Definition finaleframework.cpp:16051
bool IsFlatNote(int letterindex) const
Returns true if the key is adding a flat to the note. Only predefined major and minor keys are suppor...
Definition finaleframework.cpp:16276
int CalcRootRelationIndex() const
Returns the scale's root relation to C major in the circle of fifths. Only predefined major and minor...
Definition finaleframework.cpp:16194
void SetMajorKey(int accidentalnumber)
Sets the key signature to a major key.
Definition ff_keysig.h:108
void SetTransposeSimplify(bool state)
Sets if a transposed key should be simplified.
Definition ff_keysig.h:97
void MakeString(FCString *pString) const
Creates a string representation of the key. Only predefined major and minor keys are supported.
Definition finaleframework.cpp:16241
twobyte GetKeyMode() const
Returns the key mode that can be used to load the associated FCCustomKeyModeDef.
Definition ff_keysig.h:68
bool IsPredefined() const
Returns true if the key is a predefined key signature (major or minor).
Definition ff_keysig.h:289
eKey GetIDWithTransposition() const
Returns the key signature ID with the transposition (and transposition simplification) added.
Definition ff_keysig.h:155
twobyte CalcFlats() const
Returns the number of flats in the key signature.
Definition finaleframework.cpp:16043
twobyte GetTransposeAlteration() const
Returns the current transposition alteration index.
Definition ff_keysig.h:189
bool IsIdentical(const __FCBase *pCompareObject) const override
Returns true if the key is identical to the compared key signature.
Definition finaleframework.cpp:16226
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:88
twobyte CalcTotalChromaticSteps() const
Returns the number of chromatic steps in the key mode. For predefined keys this is always 12....
Definition finaleframework.cpp:16059
bool GetTransposeSimplify() const
Returns true if the transposed key should be simplified.
Definition ff_keysig.h:198
bool IsMajor() const
Returns true if the key is a major key signature, using the predefined major key mode.
Definition ff_keysig.h:305
void SetMinorKey(int accidentalnumber)
Sets the key signature to a minor key.
Definition ff_keysig.h:121
std::vector< eHarmLev > CalcDiatonicStepsMap() const
Returns an array (or table in Lua) specifiying the chromatic step where each diatonic step occurs....
Definition finaleframework.cpp:16074
void SetID(eKey newkey)
Sets the key signature ID.
Definition ff_keysig.h:79
bool GetTransposeChromatic() const
Returns true if the transposed key is chromatic.
Definition ff_keysig.h:205
bool IsSharpNote(int letterindex) const
Returns true if the key is raising the note.
Definition finaleframework.cpp:16263
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_keysig.h:367
twobyte GetAlteration() const
Returns the alteration for the key. Negative if the key signatures contains flats,...
Definition ff_keysig.h:144
const PDKFRAMEWORK_CLASSID GetClassID() const override
Returns the internal class ID for the PDK Framework class. This is implemented mostly because Lua has...
Definition ff_keysig.h:62
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
This is a utility class to facilitate transposition. It supports:
Definition ff_celldetails.h:2766