30#ifndef _NICMIDI_NOTIFIER_H
31#define _NICMIDI_NOTIFIER_H
61 bits = ((group&0xff)<<24) | ((subgroup&0xfff)<<12) | (item&0xfff); }
66 operator unsigned long ()
const {
return bits; }
68 int GetGroup()
const {
return (
int)((bits>>24)&0xff); }
73 int GetItem()
const {
return (
int)((bits>>0)&0xfff); }
75 void SetEvent(
int group,
int subgroup = 0,
int item = 0 ) {
76 bits = ((group&0xff)<<24) | ((subgroup&0xfff)<<12) | (item&0xfff); }
167 sequencer(seq), en(true) {}
212 unsigned char start_from;
249 static UINT GetSafeSystemMsgId() {
static UINT base = WM_APP;
return base++; }
Holds data for a message that the sequencer can send to the GUI to warn it when something happens.
Definition: notifier.h:53
@ GROUP_TRACK_VOLUME
Volume change.
Definition: notifier.h:112
@ GROUP_TRACK_NAME
Track got its name.
Definition: notifier.h:109
@ GROUP_TRACK_CHR
Chorus change.
Definition: notifier.h:114
@ GROUP_TRACK_USER
User defined item.
Definition: notifier.h:116
@ GROUP_TRACK_PAN
Pan change.
Definition: notifier.h:113
@ GROUP_TRACK_REV
Reverb change.
Definition: notifier.h:115
@ GROUP_TRACK_NOTE
Note.
Definition: notifier.h:111
@ GROUP_TRACK_PROGRAM
Program change.
Definition: notifier.h:110
MIDISequencerGUIEvent()
Default constructor: creates a generic event with all attributes set to 0.
Definition: notifier.h:56
int GetGroup() const
Returns the event group.
Definition: notifier.h:68
int GetItem() const
Returns the event item (i.e. the kind of the event).
Definition: notifier.h:73
@ GROUP_TRANSPORT_START
Sequencer start.
Definition: notifier.h:99
@ GROUP_TRANSPORT_STOP
Sequencer stop.
Definition: notifier.h:100
@ GROUP_TRANSPORT_MEASURE
Start of a measure.
Definition: notifier.h:101
@ GROUP_TRANSPORT_COUNTIN
Countin start.
Definition: notifier.h:103
@ GROUP_TRANSPORT_BEAT
Beat marker.
Definition: notifier.h:102
@ GROUP_TRANSPORT_USER
User defined item.
Definition: notifier.h:104
static const char transport_items_names[][10]
An array of strings with readable transport group items names.
Definition: notifier.h:137
@ GROUP_RECORDER_USER
User defined item.
Definition: notifier.h:124
@ GROUP_RECORDER_START
Recording start.
Definition: notifier.h:122
@ GROUP_RECORDER_RESET
Recorder reset.
Definition: notifier.h:121
@ GROUP_RECORDER_STOP
Recording stop.
Definition: notifier.h:123
int GetSubGroup() const
Returns the event subgroup (only effective for GROUP_TRACK events, where it is the track of the event...
Definition: notifier.h:71
@ GROUP_CONDUCTOR_TEMPO
Tempo change.
Definition: notifier.h:90
@ GROUP_CONDUCTOR_KEYSIG
Keysig change.
Definition: notifier.h:92
@ GROUP_CONDUCTOR_TIMESIG
Timesig change.
Definition: notifier.h:91
@ GROUP_CONDUCTOR_USER
User defined item.
Definition: notifier.h:94
@ GROUP_CONDUCTOR_MARKER
Marker.
Definition: notifier.h:93
static const char group_names[][10]
An array of strings with readable group names.
Definition: notifier.h:133
void SetEvent(int group, int subgroup=0, int item=0)
Sets the event group, subgroup and item.
Definition: notifier.h:75
MIDISequencerGUIEvent(int group, int subgroup, int item)
This constructor creates the object starting from its group, subgroup, item.
Definition: notifier.h:60
@ GROUP_RECORDER
Recorder events.
Definition: notifier.h:84
@ GROUP_USER
User defined group.
Definition: notifier.h:85
@ GROUP_TRANSPORT
Transport events (start, stop, etc)
Definition: notifier.h:82
@ GROUP_ALL
Generic group: used by the MIDISequencer to request a full GUI reset.
Definition: notifier.h:80
@ GROUP_TRACK
Track events (the subgroup is the track of the event)
Definition: notifier.h:83
@ GROUP_CONDUCTOR
Conductor events (time, tempo, etc)
Definition: notifier.h:81
static const char user_items_names[][10]
An array of strings with readable user group item names.
Definition: notifier.h:143
@ GROUP_USER_USER
User defined item.
Definition: notifier.h:129
MIDISequencerGUIEvent(unsigned long bits_)
This constructor creates the object directly from its parameters, packed into an unsigned long.
Definition: notifier.h:58
static const char conductor_items_names[][10]
An array of strings with readable conductor group items names.
Definition: notifier.h:135
static const char recording_items_names[][10]
An array of strings with readable recording group items names.
Definition: notifier.h:141
static const char track_items_names[][10]
An array of strings with readable track group items names.
Definition: notifier.h:139
A pure virtual class implementing a device that can send MIDISequencerGUIEvent messages to a GUI.
Definition: notifier.h:162
virtual void SetEnable(bool f)
Sets message sending on/off.
Definition: notifier.h:179
virtual void Notify(const MIDISequencerGUIEvent &ev)=0
Notifies the MIDISequencerGUIEvent ev.
MIDISequencerGUINotifier(const MIDISequencer *seq=0)
The constructor.
Definition: notifier.h:166
virtual void SetSequencer(const MIDISequencer *seq)
This sets the sequencer which generates messages sent to the GUI.
Definition: notifier.h:173
virtual bool GetEnable() const
Returns the enable/disable status.
Definition: notifier.h:177
A MIDISequencerGUINotifier which sends text messages to a std::ostream (std::cout as default).
Definition: notifier.h:191
virtual void Notify(const MIDISequencerGUIEvent &ev)
Notifies the event ev, printing to it a readable event description.
bool SetStartFrom(unsigned char c)
Sets the numbering of measures and beats (starting from 0 or from 1)
MIDISequencerGUINotifierText(const MIDISequencer *seq=0, std::ostream &os=std::cout)
The constructor.
Definition: notifier.h:196
unsigned char GetStartFrom() const
Gets the numbering of measures and beats.
Definition: notifier.h:201
A MIDISequencerGUINotifier which sends messages to a Win32 window using the Windows PostMessage() fun...
Definition: notifier.h:226
virtual ~MIDISequencerGUINotifierWin32()
The destructor.
Definition: notifier.h:238
DWORD GetMsgId() const
Returns the Window message id.
Definition: notifier.h:241
MIDISequencerGUINotifierWin32(HWND w, DWORD msg, WPARAM param_value=0)
In this form of the constructor you must give the Windows parameters to the notifier.
MIDISequencerGUINotifierWin32(HWND w)
This form auto sets the Windows message id and wparam_value, so you don't have to worry about them.
virtual void Notify(const MIDISequencerGUIEvent &ev)
Sends the MIDISequencerGUIEvent ev to the window.
A MIDITickComponent which implements a basic sequencer, able to play the MIDI events contained in a M...
Definition: sequencer.h:193
Contains the definition of the pure virtual MIDIProcessor class and its specializations MIDIMultiProc...