drumstick  1.0.2
alsamidioutput.h
00001 /*
00002     Drumstick RT Backend using the ALSA Sequencer
00003     Copyright (C) 2009-2015 Pedro Lopez-Cabanillas <plcl@users.sf.net>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License along
00016     with this program; if not, write to the Free Software Foundation, Inc.,
00017     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 */
00019 
00020 #ifndef ALSAMIDIOUTPUT_H
00021 #define ALSAMIDIOUTPUT_H
00022 
00023 #include <QObject>
00024 #include "rtmidioutput.h"
00025 
00026 namespace drumstick {
00027 namespace rt {
00028 
00029     class ALSAMIDIOutput : public MIDIOutput
00030     {
00031         Q_OBJECT
00032 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
00033         Q_PLUGIN_METADATA(IID "net.sourceforge.drumstick.rt.MIDIOutput")
00034 #endif
00035         Q_INTERFACES(drumstick::rt::MIDIOutput)
00036 
00037     public:
00038         ALSAMIDIOutput(QObject *parent = 0);
00039         virtual ~ALSAMIDIOutput();
00040 
00041         virtual void initialize(QSettings* settings);
00042         virtual QString backendName();
00043         virtual QString publicName();
00044         virtual void setPublicName(QString name);
00045         virtual QStringList connections(bool advanced);
00046         virtual void setExcludedConnections(QStringList conns);
00047         virtual void open(QString name);
00048         virtual void close();
00049         virtual QString currentConnection();
00050 
00051     public slots:
00052         virtual void sendNoteOn(int chan, int note, int vel);
00053         virtual void sendNoteOff(int chan, int note, int vel);
00054         virtual void sendController(int chan, int control, int value);
00055         virtual void sendKeyPressure(int chan, int note, int value);
00056         virtual void sendProgram(int chan, int program);
00057         virtual void sendChannelPressure(int chan, int value);
00058         virtual void sendPitchBend(int chan, int value);
00059         virtual void sendSysex(const QByteArray& data);
00060         virtual void sendSystemMsg(const int status);
00061 
00062     private:
00063         class ALSAMIDIOutputPrivate;
00064         ALSAMIDIOutputPrivate *d;
00065     };
00066 
00067 }}
00068 
00069 #endif /* ALSAMIDIOUTPUT_H */