NiCMidi 1.1.0
A MIDI library derived from J.D.Koftinoff jdksmidi
MIDIProcessorPrinter Class Reference

A MIDIProcessor which prints a human-readable description of the processed messages to a std::ostream. More...

#include <processor.h>

Inheritance diagram for MIDIProcessorPrinter:
MIDIProcessor

Public Member Functions

 MIDIProcessorPrinter (std::ostream &stream=std::cout, unsigned char from_1=0)
 The constructor sets the std::ostream that will print the messages (default: std::cout). More...
 
virtual void Reset ()
 Same of SetPrint(true) More...
 
int GetChanFrom () const
 Returns the numbering of the first MIDI channel in message printing (0 or 1). More...
 
bool GetPrint () const
 Returns the printing status. More...
 
void SetChanFrom (unsigned char c)
 Sets the numbering of MIDI channels in message printing. More...
 
void SetPrint (bool on_off)
 Sets the printing on and off (default is on). More...
 
virtual bool Process (MIDITimedMessage *msg)
 The Process method. More...
 
- Public Member Functions inherited from MIDIProcessor
 MIDIProcessor ()
 The constructor. More...
 
virtual ~MIDIProcessor ()
 The destructor. More...
 

Detailed Description

A MIDIProcessor which prints a human-readable description of the processed messages to a std::ostream.

Useful for debugging purposes (you could want to see, for example, all messages passing through a driver). You can turn the printing on/off.

Examples
test_thru.cpp.

Constructor & Destructor Documentation

◆ MIDIProcessorPrinter()

MIDIProcessorPrinter::MIDIProcessorPrinter ( std::ostream &  stream = std::cout,
unsigned char  from_1 = 0 
)
inline

The constructor sets the std::ostream that will print the messages (default: std::cout).

Member Function Documentation

◆ Reset()

virtual void MIDIProcessorPrinter::Reset ( )
inlinevirtual

Same of SetPrint(true)

Implements MIDIProcessor.

◆ GetChanFrom()

int MIDIProcessorPrinter::GetChanFrom ( ) const
inline

Returns the numbering of the first MIDI channel in message printing (0 or 1).

See Numbering conventions.

◆ GetPrint()

bool MIDIProcessorPrinter::GetPrint ( ) const
inline

Returns the printing status.

Examples
test_thru.cpp.

◆ SetChanFrom()

void MIDIProcessorPrinter::SetChanFrom ( unsigned char  c)
inline

Sets the numbering of MIDI channels in message printing.

If c == 0 they will be numbered 0 ... 15, else 1 ... 16. See Numbering conventions.

◆ SetPrint()

void MIDIProcessorPrinter::SetPrint ( bool  on_off)
inline

Sets the printing on and off (default is on).

Examples
test_thru.cpp.

◆ Process()

virtual bool MIDIProcessorPrinter::Process ( MIDITimedMessage msg)
virtual

The Process method.

It prints a human-readable description of the message to the std::ostream given in the constructor. The message is left unchanged and always returns true.

Implements MIDIProcessor.


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