30#ifndef _NICMIDI_MANAGER_H
31#define _NICMIDI_MANAGER_H
139 static std::vector<MIDIOutDriver*>* MIDI_outs;
141 static std::vector<std::string>* MIDI_out_names;
142 static std::vector<MIDIInDriver*>* MIDI_ins;
144 static std::vector<std::string>* MIDI_in_names;
146 static std::vector<MIDITickComponent*>*
150 static std::mutex* proc_lock;
Receives MIDI messages from an hardware MIDI in port.
Definition: driver.h:224
A static class that manages computer hardware resources (in and out MIDI ports) and timing.
Definition: manager.h:56
static bool IsValidOutPortNumber(unsigned int n)
Returns true if n is a valid MIDI out port number.
static void OpenOutPorts()
Opens all the system MIDI Out ports.
static MIDISequencer * GetSequencer()
Returns the pointer to the (unique) MIDITickComponent in the queue with tPriority PR_SEQ (0 if not fo...
static unsigned int GetNumMIDIOuts()
Returns the number of MIDI out ports in the system.
static bool RemoveMIDITick(MIDITickComponent *tick)
Removes the given MIDITickComponent pointer from the queue.
static void TickProc(tMsecs sys_time_, void *p)
This is the main callback, called at every tick of the MIDITimer.
static MIDIOutDriver * GetOutDriver(unsigned int n)
Returns a pointer to the MIDIOutDriver with given port id.
static void Init()
This is the initialization function, called the first time a class method is accessed.
static void CloseInPorts()
Closes all the system MIDI In ports.
static void AllNotesOff()
Sends a MIDI AllNotesOff message to all open out ports.
MIDIManager()=delete
The constructor is deleted.
static const std::string & GetMIDIInName(unsigned int n)
Returns the system name of the given MIDI in port.
static MIDIInDriver * GetInDriver(unsigned int n)
Returns a pointer to the MIDIInDriver with given port id.
static void OpenInPorts()
Opens all the system MIDI In ports.
static bool IsValidInPortNumber(unsigned int n)
Returns true if n is a valid MIDI in port number.
static void AddMIDITick(MIDITickComponent *tick)
Inserts a MIDITickComponent object into the queue.
static void Reset()
Stops the timer if it is running, resets all the MIDI in and out ports and flushes the MIDITickCompon...
static unsigned int GetNumMIDIIns()
Returns the number of MIDI in ports in the system.
static void CloseOutPorts()
Closes all the system MIDI Out ports.
static const std::string & GetMIDIOutName(unsigned int n)
Returns the system name of the given MIDI out port.
Sends MIDI messages to an hardware MIDI out port.
Definition: driver.h:130
A MIDITickComponent which implements a basic sequencer, able to play the MIDI events contained in a M...
Definition: sequencer.h:193
A pure virtual class implementing an object which has a callback procedure to be called at every tick...
Definition: tick.h:65
Contains the definition of the classes MIDIOutDriver and MIDIInDriver, used by the library to communi...
unsigned long long tMsecs
The type of a variable which can hold the elapsed time in milliseconds.
Definition: timer.h:44
Contains the definition of the classes MIDIMessage and MIDITimedMessage.
Contains the definition of the classes MIDISequencerGUIEvent, MIDISequencerGUINotifier (abstract),...
Contains the definition of the pure virtual class MIDITickComponent.
Contains the definition of the MIDITimer class and some other typedef related to MIDI timing.