drumstick 1.1.3
rtmidiinput.h
Go to the documentation of this file.
1/*
2 Drumstick MIDI realtime input-output
3 Copyright (C) 2009-2019 Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef MIDIINPUT_H
20#define MIDIINPUT_H
21
22#include <QObject>
23#include <QString>
24#include <QStringList>
25#include <QtPlugin>
26#include <QSettings>
27
28#include "rtmidioutput.h"
29
37namespace drumstick {
38namespace rt {
39
43 class MIDIInput : public QObject
44 {
45 Q_OBJECT
46
47 public:
52 explicit MIDIInput(QObject *parent = 0) : QObject(parent) {}
56 virtual ~MIDIInput() {}
61 virtual void initialize(QSettings* settings) = 0;
66 virtual QString backendName() = 0;
71 virtual QString publicName() = 0;
76 virtual void setPublicName(QString name) = 0;
81 virtual QStringList connections(bool advanced = false) = 0;
86 virtual void setExcludedConnections(QStringList conns) = 0;
91 virtual void open(QString name) = 0;
95 virtual void close() = 0;
100 virtual QString currentConnection() = 0;
105 virtual void setMIDIThruDevice(MIDIOutput* device) = 0;
110 virtual void enableMIDIThru(bool enable) = 0;
115 virtual bool isEnabledMIDIThru() = 0;
116
117 Q_SIGNALS:
124 void midiNoteOff(const int chan, const int note, const int vel);
125
132 void midiNoteOn(const int chan, const int note, const int vel);
133
140 void midiKeyPressure(const int chan, const int note, const int value);
141
148 void midiController(const int chan, const int control, const int value);
149
155 void midiProgram(const int chan, const int program);
156
162 void midiChannelPressure(const int chan, const int value);
163
169 void midiPitchBend(const int chan, const int value);
170
175 void midiSysex(const QByteArray &data);
176
181 void midiSystemCommon(const int status);
182
187 void midiSystemRealtime(const int status);
188 };
189}}
190
191Q_DECLARE_INTERFACE(drumstick::rt::MIDIInput, "net.sourceforge.drumstick.rt.MIDIInput/1.0")
192
193
195#endif // MIDIINPUT_H
The QObject class is the base class of all Qt objects.
MIDI IN interface.
Definition rtmidiinput.h:44
void midiProgram(const int chan, const int program)
midiProgram 0xC
void midiController(const int chan, const int control, const int value)
midiController 0xB
virtual QStringList connections(bool advanced=false)=0
connections
void midiNoteOn(const int chan, const int note, const int vel)
midiNoteOn 0x9
virtual void setExcludedConnections(QStringList conns)=0
setExcludedConnections
virtual ~MIDIInput()
~MIDIInput destructor
Definition rtmidiinput.h:56
void midiChannelPressure(const int chan, const int value)
midiChannelPressure 0xD
virtual void initialize(QSettings *settings)=0
initialize
virtual QString backendName()=0
backendName
virtual QString currentConnection()=0
currentConnection
virtual void enableMIDIThru(bool enable)=0
enableMIDIThru
virtual void open(QString name)=0
open the MIDI port by name
void midiPitchBend(const int chan, const int value)
midiPitchBend 0xE
void midiSystemRealtime(const int status)
midiSystemRealtime
virtual QString publicName()=0
publicName
void midiKeyPressure(const int chan, const int note, const int value)
midiKeyPressure 0xA
virtual void setMIDIThruDevice(MIDIOutput *device)=0
setMIDIThruDevice
virtual bool isEnabledMIDIThru()=0
isEnabledMIDIThru
void midiNoteOff(const int chan, const int note, const int vel)
midiNoteOff 0x8
void midiSystemCommon(const int status)
midiSystemCommon
virtual void close()=0
close the MIDI port
MIDIInput(QObject *parent=0)
MIDIInput constructor.
Definition rtmidiinput.h:52
void midiSysex(const QByteArray &data)
midiSysex
virtual void setPublicName(QString name)=0
setPublicName
MIDI OUT interface.
Realtime MIDI output interface.