NiCMidi 1.1.0
A MIDI library derived from J.D.Koftinoff jdksmidi
MIDISequencerGUINotifier Class Referenceabstract

A pure virtual class implementing a device that can send MIDISequencerGUIEvent messages to a GUI. More...

#include <notifier.h>

Inheritance diagram for MIDISequencerGUINotifier:
MIDISequencerGUINotifierText MIDISequencerGUINotifierWin32

Public Member Functions

 MIDISequencerGUINotifier (const MIDISequencer *seq=0)
 The constructor. More...
 
virtual void SetSequencer (const MIDISequencer *seq)
 This sets the sequencer which generates messages sent to the GUI. More...
 
virtual void Notify (const MIDISequencerGUIEvent &ev)=0
 Notifies the MIDISequencerGUIEvent ev. More...
 
virtual bool GetEnable () const
 Returns the enable/disable status. More...
 
virtual void SetEnable (bool f)
 Sets message sending on/off. More...
 

Detailed Description

A pure virtual class implementing a device that can send MIDISequencerGUIEvent messages to a GUI.

It is pure virtual because we need GUI details for really sending messages; currently there are two implementations: a text notifier which prints text messages to a std::ostream and a WIN32 specific GUI notifier, (see MIDISequencerGUINotifierText, MIDISequencerGUINotifierWin32). If we want to notify our GUI about events happening while the sequencer is playing we must create an instance of the derived class and give its pointer to the MIDISequencer (or AdvancedSequencer) constructor. When the sequencer is playing, its MIDISequencerState examines all MIDI messages output by the sequencer and uses this to send appropriate MIDISequencerGUIEvent messages to the GUI.

Constructor & Destructor Documentation

◆ MIDISequencerGUINotifier()

MIDISequencerGUINotifier::MIDISequencerGUINotifier ( const MIDISequencer seq = 0)
inline

The constructor.

To actually send messages, the notifier must know the sequencer which sends them; you can set it in the constructor or later.

Member Function Documentation

◆ SetSequencer()

virtual void MIDISequencerGUINotifier::SetSequencer ( const MIDISequencer seq)
inlinevirtual

This sets the sequencer which generates messages sent to the GUI.

Warning
If you use the notifier in conjunction with an AdvancedSequencer class, this is automatically set by the class
Examples
test_recorder.cpp.

◆ Notify()

virtual void MIDISequencerGUINotifier::Notify ( const MIDISequencerGUIEvent ev)
pure virtual

◆ GetEnable()

virtual bool MIDISequencerGUINotifier::GetEnable ( ) const
inlinevirtual

Returns the enable/disable status.

◆ SetEnable()

virtual void MIDISequencerGUINotifier::SetEnable ( bool  f)
inlinevirtual

Sets message sending on/off.

Examples
test_sequencer.cpp, and test_stepsequencer.cpp.

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