drumstick
1.0.2
|
00001 /* 00002 Drumstick RT (realtime MIDI In/Out) 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 #include "synthoutput.h" 00021 00022 namespace drumstick { 00023 namespace rt { 00024 00025 SynthOutput::SynthOutput(QObject *parent) : MIDIOutput(parent), 00026 m_synth(new SynthEngine(this)) 00027 { } 00028 00029 SynthOutput::~SynthOutput() 00030 { } 00031 00032 void SynthOutput::initialize(QSettings *settings) 00033 { 00034 m_synth->readSettings(settings); 00035 m_synth->initialize(settings); 00036 } 00037 00038 QString SynthOutput::backendName() 00039 { 00040 return QSTR_FLUIDSYNTH; 00041 } 00042 00043 QString SynthOutput::publicName() 00044 { 00045 return QSTR_FLUIDSYNTH; 00046 } 00047 00048 void SynthOutput::setPublicName(QString name) 00049 { 00050 Q_UNUSED(name) 00051 } 00052 00053 QStringList SynthOutput::connections(bool advanced) 00054 { 00055 Q_UNUSED(advanced) 00056 return QStringList(QSTR_FLUIDSYNTH); 00057 } 00058 00059 void SynthOutput::setExcludedConnections(QStringList conns) 00060 { 00061 Q_UNUSED(conns) 00062 } 00063 00064 void SynthOutput::open(QString name) 00065 { 00066 Q_UNUSED(name) 00067 m_synth->open(); 00068 } 00069 00070 void SynthOutput::close() 00071 { 00072 m_synth->close(); 00073 } 00074 00075 QString SynthOutput::currentConnection() 00076 { 00077 return m_synth->currentConnection(); 00078 } 00079 00080 void SynthOutput::sendNoteOff(int chan, int note, int vel) 00081 { 00082 m_synth->noteOff(chan, note, vel); 00083 } 00084 00085 void SynthOutput::sendNoteOn(int chan, int note, int vel) 00086 { 00087 m_synth->noteOn(chan, note, vel); 00088 } 00089 00090 void SynthOutput::sendKeyPressure(int chan, int note, int value) 00091 { 00092 Q_UNUSED(chan) 00093 Q_UNUSED(note) 00094 Q_UNUSED(value) 00095 } 00096 00097 void SynthOutput::sendController(int chan, int control, int value) 00098 { 00099 m_synth->controlChange(chan, control, value); 00100 } 00101 00102 void SynthOutput::sendProgram(int chan, int program) 00103 { 00104 m_synth->setInstrument(chan, program); 00105 } 00106 00107 void SynthOutput::sendChannelPressure(int chan, int value) 00108 { 00109 Q_UNUSED(chan) 00110 Q_UNUSED(value) 00111 } 00112 00113 void SynthOutput::sendPitchBend(int chan, int value) 00114 { 00115 m_synth->bender(chan, value); 00116 } 00117 00118 void SynthOutput::sendSysex(const QByteArray &data) 00119 { 00120 Q_UNUSED(data) 00121 } 00122 00123 void SynthOutput::sendSystemMsg(const int status) 00124 { 00125 Q_UNUSED(status) 00126 } 00127 00128 }}