Definition at line 35 of file CMusicMath.hpp.
Enumeration of tempo divisions.
Definition at line 52 of file CMusicMath.hpp.
enum Exponent::Music::CMusicMath::ETempoDivisionType [private] |
| static double Exponent::Music::CMusicMath::convertValueToTempoDivisionType | ( | const double | value, | |
| const ETempoDivisionType | type | |||
| ) | [static, private] |
Convert a value to dotted or triplet time
| value | The value to convert | |
| type | The type of division to compute |
| double | The converted value |
| static void Exponent::Music::CMusicMath::getADivisionString | ( | CString & | theString, | |
| const ETempoDivision | tempoDivision | |||
| ) | [static] |
Get a division string
| theString | The string that will be filled with the tempo division | |
| tempoDivision | The tempo division |
| static ETempoDivision Exponent::Music::CMusicMath::getAdjustedTempoDivision | ( | const ETempoDivision | division, | |
| ETempoDivisionType & | type | |||
| ) | [static, private] |
Get an adjusted tempo division -> in the range of stright time
| division | The division to convert | |
| type | The type of division to compute |
| ETempoDivision | The adjusted tempo division in the range of stright time |
| static double Exponent::Music::CMusicMath::getBpmFromTime | ( | const double | length, | |
| const CTimeSignature & | timeSignature, | |||
| const long | numberOfBeats = 4 | |||
| ) | [static] |
Given a length (seconds) and time sig information what is the bpm
| length | The length in seconds | |
| timeSignature | The time signature | |
| numberOfBeats | The number of beats in the section of music |
| double | The bpm |
| static long Exponent::Music::CMusicMath::getClosestMidiNote | ( | const double | frequency | ) | [static] |
Given a frequency what is the closest midi note
| frequency | The frequency to convert |
| long | The closest midi note to the frequency |
| static ETempoDivision Exponent::Music::CMusicMath::getClosestTempoDivisionToRateInHertz | ( | const double | bpm, | |
| const double | frequency | |||
| ) | [static] |
Get the closest division for a given frequency and bpm
| bpm | The beats per minute of the song | |
| frequency | The frequency to convert to a division |
| ETempoDivision | The closest tempo division |
| static double Exponent::Music::CMusicMath::getNewTempoPitchShift | ( | const double | shift, | |
| const double | bpm | |||
| ) | [static] |
Given an original bpm and the amount shifted by, what is the new bpm
| shift | The shift amount in semi tones | |
| bpm | The original bpm |
| double | The new bpm |
| static double Exponent::Music::CMusicMath::getNoteFrequency | ( | const long | note, | |
| const long | octaveDetune, | |||
| const long | semiDetune, | |||
| const long | fineDetune | |||
| ) | [static] |
Get a detailed frequency
| note | The midi note | |
| octaveDetune | The number of octaves the note is detuned by | |
| semiDetune | The number of semi tones the note is detuned by | |
| fineDetune | The number of cents the note is detuned by |
| double | The frequency, or 0.0 if error |
| static double Exponent::Music::CMusicMath::getNoteFrequency | ( | const long | note | ) | [static] |
Get a frequency for a midi note
| note | The midi note to get the frequency for |
| double | The frequency, or 0.0 if index out of range |
| static double Exponent::Music::CMusicMath::getNumberOfSamples | ( | const double | sampleRate, | |
| const double | lengthInSeconds | |||
| ) | [static] |
Get number of samples in a specified length (length in seconds
| sampleRate | The number of samples per second | |
| lengthInSeconds | The length of the buffer in seconds |
| double | The number of samples in the specified length of time |
| static double Exponent::Music::CMusicMath::getPhase | ( | const ETempoDivision | tempoDivision | ) | [static] |
Get a phase position for a given tempo division
| tempoDivision | The tempo division |
| double | The phase reset position |
| static double Exponent::Music::CMusicMath::getRateInHertz | ( | const double | bpm, | |
| const ETempoDivision | tempoDivision | |||
| ) | [static] |
Get a rate in hertz for a given tempo division of the bpm
| bpm | The beats per minute | |
| tempoDivision | The requested tempo division |
| The | rate in hertz required |
| static double Exponent::Music::CMusicMath::getRateInMilliseconds | ( | const double | bpm, | |
| const ETempoDivision | tempoDivision, | |||
| const CTimeSignature & | timeSignature | |||
| ) | [static] |
Get a rate in milliseconds for a given tempo division of the bpm
| bpm | The beats per minute | |
| tempoDivision | The requested tempo division | |
| timeSignature | The time signature of the tune |
| The | rate in milliseconds required |
| static double Exponent::Music::CMusicMath::getSongPhasePosition | ( | const ETempoDivision | tempoDivision | ) | [static] |
Get a song phase postion for a given tempo division
| tempoDivision | The tempo division |
| double | The phase position |
| static double Exponent::Music::CMusicMath::getTempoNoteShift | ( | const double | originalBpm, | |
| const double | newBpm | |||
| ) | [static] |
Given an original bpm and a desired bpm how much do you have to shift it by in semitones
| originalBpm | The original Bpm | |
| newBpm | The destination Bpm |
| double | The shift in semi tones |
| static double Exponent::Music::CMusicMath::getTimeFromBpm | ( | const double | bpm, | |
| const CTimeSignature & | timeSignature, | |||
| const long | numberOfBeats = 4 | |||
| ) | [static] |
Given a bpm and time sig information what is the length
| bpm | The bpm | |
| timeSignature | The time signature | |
| numberOfBeats | The number of beats in the section of music |
| double | The length in seconds |
| static double Exponent::Music::CMusicMath::getTimeStretch | ( | const double | originalBpm, | |
| const double | newBpm | |||
| ) | [static] |
To go from one bpm to antoher what is the timestretch required (%)
| originalBpm | The original Bpm | |
| newBpm | The destination Bpm |
| double | The amount of time stretch required in % |
const double Exponent::Music::CMusicMath::CMUSIC_MATH_DOTTED_TIME [static, private] |
Dotted time multiplier
Definition at line 348 of file CMusicMath.hpp.
const double Exponent::Music::CMusicMath::CMUSIC_MATH_FREQUENCY[] [static] |
Frequencies for tempo divisions
Definition at line 41 of file CMusicMath.hpp.
const CFrequencyTable Exponent::Music::CMusicMath::CMUSIC_MATH_FREQUENCY_TABLE [static, private] |
The frequency table
Definition at line 345 of file CMusicMath.hpp.
const double Exponent::Music::CMusicMath::CMUSIC_MATH_SONG_PHASE[] [static] |
Song phase for computing offset
Definition at line 43 of file CMusicMath.hpp.
const double Exponent::Music::CMusicMath::CMUSIC_MATH_SONG_POSITION[] [static] |
Position modifier for song phase
Definition at line 44 of file CMusicMath.hpp.
const double Exponent::Music::CMusicMath::CMUSIC_MATH_TIME[] [static] |
Timing information for tempo divisions
Definition at line 42 of file CMusicMath.hpp.
const double Exponent::Music::CMusicMath::CMUSIC_MATH_TRIPLET_TIME [static, private] |
Triplet time multiplier
Definition at line 347 of file CMusicMath.hpp.