Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
NoMidiImplementation Class Reference

Inactive Midi interface. More...

#include <NoMidiimplementation.h>

+ Inheritance diagram for NoMidiImplementation:
+ Collaboration diagram for NoMidiImplementation:

Public Member Functions

 NoMidiImplementation ()
 
void init () overridefinal
 Initialisation of the implementation. More...
 
void exit () overridefinal
 Shut down the implementation. More...
 
int GetNumberOfPorts () overridefinal
 Get the number of available input devices. More...
 
std::string GetPortName (int i) overridefinal
 Get the name of device i (starting with zero) More...
 
bool OpenPort (int i, std::string AppName="") overridefinal
 Open Midi input device number i. More...
 
bool OpenPort (std::string AppName="") overridefinal
 Open Midi device with the highest port number. More...
 
int getCurrentPort () const overridefinal
 Get the current port number. More...
 
- Public Member Functions inherited from MidiAdapter
 MidiAdapter ()
 Constructor without function. More...
 
 ~MidiAdapter ()
 Destructor without function. More...
 
virtual std::string GetPortNames ()
 Get a list of all available input devices. More...
 
void send (Data &data)
 Send new MIDI data to the messaging system. More...
 

Additional Inherited Members

- Public Types inherited from MidiAdapter
enum  MidiEvent { MIDI_UNDEFINED = 0, MIDI_KEY_PRESS, MIDI_KEY_RELEASE, MIDI_CONTROL_CHANGE }
 Enumeration of the possible MIDI events. More...
 
- Static Public Member Functions inherited from MidiAdapter
static MidiEvent byteToEvent (int byte)
 Convert MIDI code to MidiEvent. More...
 

Detailed Description

Inactive Midi interface.

Some devices, e.g. smartphones, do not have a Midi interface. To avoid complicated Macro switches in the code, this class provides an inactive dummy interface. By creating an instance of this interface, the Midi system can be disabled without chaning the main code.

Definition at line 35 of file NoMidiimplementation.h.

Constructor & Destructor Documentation

NoMidiImplementation::NoMidiImplementation ( )

Definition at line 22 of file NoMidiimplementation.cpp.

Member Function Documentation

void NoMidiImplementation::exit ( )
finaloverridevirtual

Shut down the implementation.

Implements MidiAdapter.

Definition at line 27 of file NoMidiimplementation.cpp.

int NoMidiImplementation::getCurrentPort ( ) const
finaloverridevirtual

Get the current port number.

Implements MidiAdapter.

Definition at line 76 of file NoMidiimplementation.cpp.

int NoMidiImplementation::GetNumberOfPorts ( )
finaloverridevirtual

Get the number of available input devices.

Returns
Always return that no Midi ports are available

Implements MidiAdapter.

Definition at line 32 of file NoMidiimplementation.cpp.

std::string NoMidiImplementation::GetPortName ( int  i)
finaloverridevirtual

Get the name of device i (starting with zero)

Parameters
i: Number of the port, ignored here
Returns
Returns a string saying that no devices are available

Implements MidiAdapter.

Definition at line 42 of file NoMidiimplementation.cpp.

void NoMidiImplementation::init ( )
finaloverridevirtual

Initialisation of the implementation.

Implements MidiAdapter.

Definition at line 26 of file NoMidiimplementation.cpp.

bool NoMidiImplementation::OpenPort ( int  i,
std::string  AppName = "" 
)
finaloverridevirtual

Open Midi input device number i.

Parameters
i: Number of the Midi port to be opened, ignored here
AppName: Name of the application, ignored here
Returns
always false since there is no port to be opened

Implements MidiAdapter.

Definition at line 56 of file NoMidiimplementation.cpp.

bool NoMidiImplementation::OpenPort ( std::string  AppName = "")
finaloverridevirtual

Open Midi device with the highest port number.

Parameters
AppName: Name of the application, ignored here
Returns
always false since there is no port to be opened

Implements MidiAdapter.

Definition at line 70 of file NoMidiimplementation.cpp.


The documentation for this class was generated from the following files: