|
CFugue
|
Takes care of MIDI Events, Tracks and Sequencing More...
#include <MidiEventManager.h>
Inherited by CFugue::MIDIRenderer [private].
Public Member Functions | |
| jdkmidi::MIDISequencer * | GetSequencer () |
| Returns the Sequencer holding the collection of tracks | |
| jdkmidi::MIDIMultiTrack * | GetTracks () |
| Returns the Multitrack object | |
| void | Clear () |
| void | SetCurrentTrack (unsigned short nTrack) |
| void | SetCurrentLayer (unsigned short nLayer) |
| unsigned long | GetTrackTime () const |
| void | SetTrackTime (unsigned long lNewTime) |
| void | AdvanceTrackTime (unsigned long lDuration) |
| void | AddChannelPressureEvent (unsigned char uPressure) |
| void | AddControllerEvent (unsigned char uControlIndex, unsigned char uControlValue) |
| void | AddKeySignatureEvent (signed char nKeySig, unsigned char MajMin) |
| void | AddPitchBendEvent (unsigned char uLowByte, unsigned char uHighByte) |
| void | AddPolyphonicPressureEvent (unsigned char uKey, unsigned char uPressure) |
| void | AddProgramChangeEvent (unsigned char nInstrumentID) |
| void | AddTempoEvent (unsigned short nTempo) |
| void | AddNoteEvent (int noteValue, int attackVel, int decayVel, long lNoteDuration, bool addNoteOn, bool addNoteOff) |
Protected Types | |
| enum | { MAX_CHANNELS = 16, MAX_LAYERS = 16 } |
Takes care of MIDI Events, Tracks and Sequencing
Definition at line 21 of file MidiEventManager.h.
| void CFugue::MIDIEventManager::AddChannelPressureEvent | ( | unsigned char | uPressure | ) |
Adds a Channel Pressure event to the current track
| uPressure | the pressure value that should be applied to the notes on the current channel |
Definition at line 107 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddControllerEvent | ( | unsigned char | uControlIndex, |
| unsigned char | uControlValue | ||
| ) |
Adds a MIDI controller event to the current track.
| uControlIndex | the controller |
| uControlValue | value for the controller |
Definition at line 120 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddKeySignatureEvent | ( | signed char | nKeySig, |
| unsigned char | MajMin | ||
| ) |
Adds a short Key Singature event to the current track.
| nKeySig | a value in the range [-7, 7] |
| MajMin | indicates if this is Major (0) scale or Min (1) scale |
Definition at line 133 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddNoteEvent | ( | int | noteValue, |
| int | attackVel, | ||
| int | decayVel, | ||
| long | lNoteDuration, | ||
| bool | addNoteOn, | ||
| bool | addNoteOff | ||
| ) |
Adds a short NoteOn message event to the current track using attack/decay velocities. Automatically adds a NoteOff message using the specified duration. These NoteOn and NoteOff can be suppressed (useful when notes are tied).
| noteValue | the MIDI note value. For example, Mid-C = 60 |
| attackVel | the attack Velocity of the note |
| decayVel | the decay Velocity of the note |
| lNoteDuration | duration of the MIDI note |
| addNoteOn | indicates if NoteOn event should be created automatically. For the end of a tied note, this should be false; otherwise true; |
| addNoteOff | indicates if NoteOff event should be created automatically. For the start of a tied note, this should be false; otherwise true; |
Definition at line 202 of file MidiEventManager.h.
References AdvanceTrackTime(), and GetTrackTime().
| void CFugue::MIDIEventManager::AddPitchBendEvent | ( | unsigned char | uLowByte, |
| unsigned char | uHighByte | ||
| ) |
Adds a PitchBend event to the current track.
| uLowByte | the low byte value of the pitch bend |
| uHighByte | the high byte value of the pitch bend |
Definition at line 146 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddPolyphonicPressureEvent | ( | unsigned char | uKey, |
| unsigned char | uPressure | ||
| ) |
Adds a key pressure event to the current track.
| uKey | the note the pressure should be applied to |
| uPressure | the Pressure value that should be applied to the key |
Definition at line 159 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddProgramChangeEvent | ( | unsigned char | nInstrumentID | ) |
Adds a short ProgramChange message event to the current track.
| nInstrumentID | indicates the selected instrument that should be used for playing further notes; |
Definition at line 171 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AddTempoEvent | ( | unsigned short | nTempo | ) |
Adds a short Tempo message event to the current track.
| nTempo | indicates the selected Tempo value in BPM that should be used for playing further notes; |
Definition at line 183 of file MidiEventManager.h.
References GetTrackTime().
| void CFugue::MIDIEventManager::AdvanceTrackTime | ( | unsigned long | lDuration | ) |
Advances the timer for the current Track by the duration (specified in Pulses Per Quarter)
Definition at line 98 of file MidiEventManager.h.
Referenced by AddNoteEvent().
| void CFugue::MIDIEventManager::Clear | ( | ) |
Clears all the Events stored in the tracks and Resets the Track Timers
Definition at line 57 of file MidiEventManager.h.
| unsigned long CFugue::MIDIEventManager::GetTrackTime | ( | ) | const |
Returns the Timer value for the current track (in Pulses Per Quarter)
Definition at line 82 of file MidiEventManager.h.
Referenced by AddChannelPressureEvent(), AddControllerEvent(), AddKeySignatureEvent(), AddNoteEvent(), AddPitchBendEvent(), AddPolyphonicPressureEvent(), AddProgramChangeEvent(), and AddTempoEvent().
| void CFugue::MIDIEventManager::SetCurrentTrack | ( | unsigned short | nTrack | ) |
Sets the current Track/Channel to which new Events will be added
Definition at line 69 of file MidiEventManager.h.
| void CFugue::MIDIEventManager::SetTrackTime | ( | unsigned long | lNewTime | ) |
Sets the current Track's time to the supplied new time (specified in Pulses Per Quarter)
Definition at line 90 of file MidiEventManager.h.
| CFugue, the C++ Music Programming Library | © Copyright 2009 Cenacle Research India Private Limited | Gopalakrishna Palem |