Planeshift
musicutil.h File Reference
#include <cssysdef.h>
#include <csutil/refarr.h>
#include <csutil/csstring.h>
#include <iutil/document.h>

Go to the source code of this file.

Classes

struct  ScoreStatistics
 This struct keeps general information about a score. More...
 

Namespaces

 psMusic
 This namespace contains a set of functions that are usefull for the processing of music and musical scores.
 

Macros

#define DURATION_QUARTER_DIVISIONS   16
 Unit measure for duration in in terms of divisions per quarter. More...
 

Functions

bool psMusic::CheckDuration (int duration)
 Check wheather the given number of DURATION_QUARTER_DIVISIONS correspond to a specific duration taken into account by the enum Duration. More...
 
bool psMusic::CheckValidity (iDocument *musicalScore, csRef< iDocumentNode > &partNode)
 Checks if the given document is a valid musical score and provide the <part> node. More...
 
void psMusic::EnharmonicPitch (char &pitch, int &accidental)
 Turns the given pitch into the enharmonic equivalent. More...
 
bool psMusic::GetAttributes (iDocument *musicalScore, int &quarterDivisions, int &fifths, int &beats, int &beatType, int &tempo)
 Gets the attributes in the first measure of the given score. More...
 
Duration psMusic::GetBiggestDuration (int duration)
 Returns the biggest duration that can be represented on the score which is less or equal to the given one. More...
 
bool psMusic::GetMeasures (iDocument *score, csRefArray< iDocumentNode > &measures)
 Gets the XML nodes representing the measures contained in the musical score. More...
 
bool psMusic::GetStatistics (iDocument *musicalScore, ScoreStatistics &stats)
 Returns the statistics of the score. More...
 
void psMusic::NextPitch (char &pitch, uint &octave)
 Turns the given pitch into the next one in the scale. More...
 
void psMusic::PreviousPitch (char &pitch, uint &octave)
 Turns the given pitch into the previous one in the scale. More...
 
bool psMusic::ZCompressSong (const csString &inputScore, csString &outputScore)
 Compress a song with the zlib compression algorithm. More...
 
bool psMusic::ZDecompressSong (const csString &inputScore, csString &outputScore)
 Decompress a song with the zlib compression algorithm. More...
 

Macro Definition Documentation

#define DURATION_QUARTER_DIVISIONS   16

Unit measure for duration in in terms of divisions per quarter.

Definition at line 234 of file musicutil.h.