Classes | Typedefs | Functions | Variables
MusicNoteLib Namespace Reference

Music Programming Library. More...

Classes

class  MIDIDriverAlsa
 MIDI Driver for Linux Alsa based machines More...
class  ChannelPressure
struct  ChordDef
 Definition of a Chord entry. More...
class  Chords
 Maniuplates Chord definitions for Western Music More...
class  MString
 Helper class for simple string manipulations More...
class  ControllerEvent
 Takes care of defining the MIDI Controller Events used in MusicStrings. More...
struct  StringLess
 Implements the less operator for Maps with string case-insensitive comparisions More...
class  Instrument
class  KeySignature
 Class representing the Key Signature. More...
class  Layer
class  MIDIEventManager
 Takes care of MIDI Events, Tracks and Sequencing More...
class  MIDIRenderer
 Takes care of Rendering MIDI Output either to a file or to a MIDI out Port More...
class  MidiTimer
 Plays the role of a pseudo MIDI Timer for MIDI Sequencer More...
class  MusicStringParser
 Implements a MusicString Parsing functionality More...
struct  Note
 Class representing a Musical Note More...
class  CParser
 Base class that represents a Parser Object. More...
class  CParserListener
 Base class that represents a Renderer Object More...
class  PitchBend
class  Player
 MIDI Player for Music Strings More...
class  PolyphonicPressure
class  Talam
 Class representing Carnatic Music Talam More...
class  Tempo
class  Time
class  Voice
struct  PARSETRACEARGS

Typedefs

typedef std::map< MString,
MString, StringLess< const
TCHAR * > > 
DICTIONARY
typedef std::vector< std::string > StringList
typedef void(STDCALL * LPFNTRACEPROC )(void *pUserData, const TCHAR *szTraceMsg)
typedef void(STDCALL * LPFNERRORPROC )(void *pUserData, long lErrCode, const TCHAR *szErrorMsg, const TCHAR *szToken)

Functions

void PopulateStandardDefinitions (DICTIONARY &dictionaryObj)
 Accessor method to Populate standard macro definitions
unsigned int GetMidiOutPortCount ()
 Returns the number of Output Midi Ports.
unsigned int GetMidiInPortCount ()
 Returns the number of Input Midi Ports.
std::string GetMidiInPortName (unsigned int nPortIndex)
 Returns the name of the given Midi Input Port.
std::string GetMidiOutPortName (unsigned int nPortIndex)
 Returns the name of the given Midi Output Port.
StringList GetMidiInPortNames ()
 Returns the names of all Midi Input Ports available.
StringList GetMidiOutPortNames ()
 Returns the names of all Midi Output Ports available.
MUSICNOTELIB_API void * GetCarnaticMusicNoteReader ()
MUSICNOTELIB_API MStringPlayer * CreateMusicStringPlayer ()
MUSICNOTELIB_API bool PlayMusicString (const TCHAR *szMusicNotes)
MUSICNOTELIB_API bool PlayMusicStringCB (const TCHAR *szMusicNotes, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void *pUserData)
MUSICNOTELIB_API bool PlayMusicStringWithOpts (const TCHAR *szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS)
MUSICNOTELIB_API bool PlayMusicStringWithOptsCB (const TCHAR *szMusicNotes, int nMidiOutPortID, unsigned int nTimerResMS, LPFNTRACEPROC traceCallbackProc, LPFNERRORPROC errorCallbackProc, void *pUserData)
MUSICNOTELIB_API bool SaveAsMidiFile (const TCHAR *szMusicNotes, const char *szOutputFilePath)
MUSICNOTELIB_API void Parse (const TCHAR *szNotes, LPFNTRACEPROC traceCallbackProc, void *pUserData)
template<typename T >
bool phRepComparator (const T *input1, const T *input2)
template<typename T >
void LoadVector (std::map< TCHAR, std::vector< const T * > > &vecArray, const T *inputArr, int nInputSize)
unsigned int IsPrefixMatching (const TCHAR *sz, const TCHAR *pfx)
template<typename T >
unsigned int ExtractMatchingObject (const std::map< TCHAR, std::vector< const T * > > &vecArray, const TCHAR *sz, T *retVal)
bool AlsaDriverThreadProc (MIDIDriverAlsa *pAlsaDriver, int nTimerResMS)
template<typename T >
int LoadValueFromString (const TCHAR *sz, T *pRetVal)
template<typename T >
int LoadIntegralValueFromString (const TCHAR *sz, T *pRetVal)
template<>
int LoadValueFromString (const TCHAR *sz, unsigned char *pRetVal)
template<>
int LoadValueFromString (const TCHAR *sz, unsigned short *pRetVal)
template<>
int LoadValueFromString (const TCHAR *sz, unsigned long *pRetVal)
template<>
int LoadValueFromString (const TCHAR *sz, double *pRetVal)

Variables

MUSICNOTELIB_API typedef void MStringPlayer

Detailed Description

Music Programming Library.


Typedef Documentation

typedef std::map<MString, MString, StringLess<const TCHAR*> > MusicNoteLib::DICTIONARY

Dictionary type maps a string key to a string value. The string value can be an integer or double (in text form), or a string


Function Documentation

Creates a MusicString Player object.

MUSICNOTELIB_API bool MusicNoteLib::PlayMusicString ( const TCHAR *  szMusicNotes)

Plays Music string notes on the default MIDI Output device with the default Timer Resolution. Use PlayMusicStringWithOpts() to use custom values.

Parameters:
szMusicNotesthe Music string to be played on the MIDI output device
Returns:
True if the notes were played successfully, False otherwise

References MusicNoteLib::Player::Play().

MUSICNOTELIB_API bool MusicNoteLib::PlayMusicStringCB ( const TCHAR *  szMusicNotes,
LPFNTRACEPROC  traceCallbackProc,
LPFNERRORPROC  errorCallbackProc,
void *  pUserData 
)

Same as PlayMusicString() except that this method accepts Callbacks. The Trace and Error callbacks will be used during the Parse of the Music Notes.

Parameters:
szMusicNotesthe Music string to be played on the MIDI output device
traceCallbackProcthe Callback to used to report Trace messages
errorCallbackProcthe Callback to used to report Error messages
pUserDataany user supplied data that should be sent to the Callback
Returns:
True if the notes were played successfully, False otherwise

References MusicNoteLib::CParser::evError, MusicNoteLib::CParser::evTrace, MusicNoteLib::Player::Parser(), and MusicNoteLib::Player::Play().

MUSICNOTELIB_API bool MusicNoteLib::PlayMusicStringWithOpts ( const TCHAR *  szMusicNotes,
int  nMidiOutPortID,
unsigned int  nTimerResMS 
)

Plays Music string notes on the given MIDI Output device using the given Timer Resolution. Use PlayMusicString() to use default values.

Parameters:
szMusicNotesthe Music notes to be played
nMidiOutPortIDthe device ID of the MIDI output port to be used for the play
nTimerResMSpreferred MIDI timer resolution, in MilliSeconds
Returns:
True if Play was successful, False otherwise

References MusicNoteLib::Player::Play().

MUSICNOTELIB_API bool MusicNoteLib::PlayMusicStringWithOptsCB ( const TCHAR *  szMusicNotes,
int  nMidiOutPortID,
unsigned int  nTimerResMS,
LPFNTRACEPROC  traceCallbackProc,
LPFNERRORPROC  errorCallbackProc,
void *  pUserData 
)

Same as PlayMusicStringWithOpts() except that this method accepts Callbacks. The Trace and Error callbacks will be used during the Parse of the Music Notes.

Parameters:
szMusicNotesthe Music notes to be played
nMidiOutPortIDthe device ID of the MIDI output port to be used for the play
nTimerResMSpreferred MIDI timer resolution, in MilliSeconds
traceCallbackProcthe Callback to used to report Trace messages
errorCallbackProcthe Callback to used to report Error messages
pUserDataany user supplied data that should be sent to the Callback
Returns:
True if Play was successful, False otherwise

References MusicNoteLib::CParser::evError, MusicNoteLib::CParser::evTrace, MusicNoteLib::Player::Parser(), and MusicNoteLib::Player::Play().

MUSICNOTELIB_API bool MusicNoteLib::SaveAsMidiFile ( const TCHAR *  szMusicNotes,
const char *  szOutputFilePath 
)

Save the given MusicString content into a MIDI output file

Parameters:
szMusicNotesMusic Notes to be converted to MIDI output
szOutputFilePathpath of the MIDI output file
Returns:
True if the the content was saved successfully, False otherwise

References MusicNoteLib::Player::SaveAsMidiFile().


CFugue, the C++ Music Programming Library © Copyright 2009 CineFx Digital Media Pvt Ltd. Gopalakrishna Palem