Just Intonation  Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
midihandler.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2016-2017 Karolin Stange, Christoph Wick, and Haye Hinrichsen
3  *
4  * This file is part of JustIntonation.
5  *
6  * JustIntonation is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * JustIntonation is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with JustIntonation. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 //=============================================================================
21 // Midi handler
22 //=============================================================================
23 
24 #ifndef MIDIHANDLER_H
25 #define MIDIHANDLER_H
26 
27 #include <QObject>
28 #include <QMidiMessage>
29 
30 #include "sampler/soundgenerator.h"
31 #include "audio/audiooutput.h"
33 
37 
38 class MidiHandler : public ThreadBase
39 {
40  Q_OBJECT
41 public:
42  MidiHandler(SoundGenerator &soundgenerator, AudioOutput &audiooutput);
43 
44 public slots:
45  void receiveMidiEvent(const QMidiMessage &event);
46 
47 signals:
48  void setQmlTemperamentIndex(QVariant index);
49  void changeTargetFrequency (QVariant df);
50  void signalSustainPedal (bool pressed);
51  void signalSostenutoPedal (bool pressed);
52  void signalSoftPedal (bool pressed);
53 
54 private:
57  QVector<quint8> mDrumChannels;
61 };
62 
63 #endif // MIDIHANDLER_H
Class handling Midi events.
Definition: midihandler.h:38
Universal base class for threaded modules.
Definition: threadbase.h:60
Class managing the generation of sound.
int mPitchBendWheel
Definition: midihandler.h:59
void signalSostenutoPedal(bool pressed)
int mTemperamentIndex
Definition: midihandler.h:60
void changeTargetFrequency(QVariant df)
void signalSoftPedal(bool pressed)
int mModulationWheel
Definition: midihandler.h:58
void receiveMidiEvent(const QMidiMessage &event)
Definition: midihandler.cpp:56
MidiHandler(SoundGenerator &soundgenerator, AudioOutput &audiooutput)
Definition: midihandler.cpp:28
Class for audio output.
Definition: audiooutput.h:45
void setQmlTemperamentIndex(QVariant index)
AudioOutput * pAudioOutput
Definition: midihandler.h:56
SoundGenerator * pSoundGenerator
Definition: midihandler.h:55
QVector< quint8 > mDrumChannels
Definition: midihandler.h:57
void signalSustainPedal(bool pressed)