hydrogen
1.2.3
MidiInput.h
Go to the documentation of this file.
1
/*
2
* Hydrogen
3
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4
* Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5
*
6
* http://www.hydrogen-music.org
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY, without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see https://www.gnu.org/licenses
20
*
21
*/
22
23
#ifndef H2_MIDI_INPUT_H
24
#define H2_MIDI_INPUT_H
25
26
#include <
core/Object.h
>
27
#include <string>
28
#include <vector>
29
#include "
MidiCommon.h
"
30
31
namespace
H2Core
32
{
33
38
class
MidiInput
:
public
virtual
Object
<MidiInput>
39
{
40
H2_OBJECT
(
MidiInput
);
41
public
:
42
MidiInput
();
43
virtual
~MidiInput
();
44
45
virtual
void
open
() = 0;
46
virtual
void
close
() = 0;
47
virtual
std::vector<QString>
getOutputPortList
() = 0;
48
49
void
setActive
(
bool
isActive ) {
50
m_bActive
= isActive;
51
}
52
void
handleMidiMessage
(
const
MidiMessage
& msg );
53
void
handleSysexMessage
(
const
MidiMessage
& msg );
54
void
handleControlChangeMessage
(
const
MidiMessage
& msg );
55
void
handleProgramChangeMessage
(
const
MidiMessage
& msg );
56
void
handlePolyphonicKeyPressureMessage
(
const
MidiMessage
& msg );
57
58
protected
:
59
bool
m_bActive
;
60
61
void
handleNoteOnMessage
(
const
MidiMessage
& msg );
62
void
handleNoteOffMessage
(
const
MidiMessage
& msg,
bool
CymbalChoke );
63
64
65
private
:
66
int
__hihat_cc_openess
;
67
};
68
69
};
70
71
#endif
72
MidiCommon.h
Object.h
H2Core::MidiInput
MIDI input base class.
Definition
MidiInput.h:39
H2Core::MidiInput::open
virtual void open()=0
H2Core::MidiInput::handleNoteOnMessage
void handleNoteOnMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:203
H2Core::MidiInput::handleSysexMessage
void handleSysexMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:345
H2Core::MidiInput::getOutputPortList
virtual std::vector< QString > getOutputPortList()=0
H2Core::MidiInput::handleControlChangeMessage
void handleControlChangeMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:162
H2Core::MidiInput::handleNoteOffMessage
void handleNoteOffMessage(const MidiMessage &msg, bool CymbalChoke)
Definition
MidiInput.cpp:305
H2Core::MidiInput::handleProgramChangeMessage
void handleProgramChangeMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:185
H2Core::MidiInput::__hihat_cc_openess
int __hihat_cc_openess
Definition
MidiInput.h:66
H2Core::MidiInput::H2_OBJECT
H2_OBJECT(MidiInput)
H2Core::MidiInput::~MidiInput
virtual ~MidiInput()
Definition
MidiInput.cpp:47
H2Core::MidiInput::setActive
void setActive(bool isActive)
Definition
MidiInput.h:49
H2Core::MidiInput::m_bActive
bool m_bActive
Definition
MidiInput.h:59
H2Core::MidiInput::MidiInput
MidiInput()
Definition
MidiInput.cpp:38
H2Core::MidiInput::handleMidiMessage
void handleMidiMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:52
H2Core::MidiInput::handlePolyphonicKeyPressureMessage
void handlePolyphonicKeyPressureMessage(const MidiMessage &msg)
Definition
MidiInput.cpp:298
H2Core::MidiInput::close
virtual void close()=0
H2Core::MidiMessage
Definition
MidiCommon.h:38
H2Core::Object
Definition
Object.h:178
H2Core
Definition
ExportMidiDialog.h:31
src
core
IO
MidiInput.h
Generated by
1.10.0