Ardour
9.0-pre0-384-ga76afae0e9
midifunction.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2009-2015 Paul Davis <paul@linuxaudiosystems.com>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#ifndef __gm_midifunction_h__
20
#define __gm_midifunction_h__
21
22
#include <string>
23
24
#include "
midi++/types.h
"
25
26
#include "
pbd/signals.h
"
27
#include "
pbd/stateful.h
"
28
29
#include "
ardour/types.h
"
30
31
#include "
midiinvokable.h
"
32
33
namespace
MIDI
{
34
class
Channel;
35
class
Parser;
36
}
37
38
class
GenericMidiControlProtocol
;
39
40
class
MIDIFunction
:
public
MIDIInvokable
41
{
42
public
:
43
enum
Function
{
44
NextBank
,
45
PrevBank
,
46
TransportRoll
,
47
TransportStop
,
48
TransportZero
,
49
TransportStart
,
50
TransportEnd
,
51
TransportLoopToggle
,
52
TransportRecordToggle
,
53
TransportRecordEnable
,
54
TransportRecordDisable
,
55
/* 1 argument functions: RID, bank relative */
56
SelectAdd
,
57
SelectRemove
,
58
SelectToggle
,
59
SelectSet
,
60
SetBank
,
61
/* 2 argument functions: RID, value */
62
TrackSetSolo
,
63
TrackSetMute
,
64
TrackSetGain
,
65
TrackSetRecordEnable
,
66
TrackSetSoloIsolate
,
67
};
68
69
MIDIFunction
(
MIDI::Parser
&);
70
virtual
~MIDIFunction
();
71
72
int
setup
(
GenericMidiControlProtocol
&,
const
std::string&
function_name
,
const
std::string& argument,
MIDI::byte
*
sysex
= 0,
size_t
ssize = 0);
73
74
const
std::string&
function_name
()
const
{
return
_invokable_name
; }
75
76
XMLNode
&
get_state
()
const
;
77
int
set_state
(
const
XMLNode
&,
int
version);
78
79
private
:
80
Function
_function
;
81
std::string
_argument
;
82
void
execute
();
83
};
84
85
#endif
// __gm_midicontrollable_h__
86
types.h
GenericMidiControlProtocol
Definition:
generic_midi_control_protocol.h:61
MIDIFunction
Definition:
midifunction.h:41
MIDIFunction::setup
int setup(GenericMidiControlProtocol &, const std::string &function_name, const std::string &argument, MIDI::byte *sysex=0, size_t ssize=0)
MIDIFunction::_function
Function _function
Definition:
midifunction.h:80
MIDIFunction::set_state
int set_state(const XMLNode &, int version)
MIDIFunction::MIDIFunction
MIDIFunction(MIDI::Parser &)
MIDIFunction::Function
Function
Definition:
midifunction.h:43
MIDIFunction::NextBank
@ NextBank
Definition:
midifunction.h:44
MIDIFunction::TrackSetRecordEnable
@ TrackSetRecordEnable
Definition:
midifunction.h:65
MIDIFunction::SelectSet
@ SelectSet
Definition:
midifunction.h:59
MIDIFunction::TransportRecordToggle
@ TransportRecordToggle
Definition:
midifunction.h:52
MIDIFunction::TrackSetGain
@ TrackSetGain
Definition:
midifunction.h:64
MIDIFunction::TransportRecordDisable
@ TransportRecordDisable
Definition:
midifunction.h:54
MIDIFunction::SetBank
@ SetBank
Definition:
midifunction.h:60
MIDIFunction::TrackSetSoloIsolate
@ TrackSetSoloIsolate
Definition:
midifunction.h:66
MIDIFunction::TrackSetSolo
@ TrackSetSolo
Definition:
midifunction.h:62
MIDIFunction::SelectAdd
@ SelectAdd
Definition:
midifunction.h:56
MIDIFunction::SelectRemove
@ SelectRemove
Definition:
midifunction.h:57
MIDIFunction::TransportRoll
@ TransportRoll
Definition:
midifunction.h:46
MIDIFunction::TransportEnd
@ TransportEnd
Definition:
midifunction.h:50
MIDIFunction::PrevBank
@ PrevBank
Definition:
midifunction.h:45
MIDIFunction::TransportZero
@ TransportZero
Definition:
midifunction.h:48
MIDIFunction::TransportStop
@ TransportStop
Definition:
midifunction.h:47
MIDIFunction::TransportStart
@ TransportStart
Definition:
midifunction.h:49
MIDIFunction::TransportLoopToggle
@ TransportLoopToggle
Definition:
midifunction.h:51
MIDIFunction::SelectToggle
@ SelectToggle
Definition:
midifunction.h:58
MIDIFunction::TransportRecordEnable
@ TransportRecordEnable
Definition:
midifunction.h:53
MIDIFunction::TrackSetMute
@ TrackSetMute
Definition:
midifunction.h:63
MIDIFunction::get_state
XMLNode & get_state() const
MIDIFunction::execute
void execute()
MIDIFunction::_argument
std::string _argument
Definition:
midifunction.h:81
MIDIFunction::function_name
const std::string & function_name() const
Definition:
midifunction.h:74
MIDIFunction::~MIDIFunction
virtual ~MIDIFunction()
MIDIInvokable
Definition:
midiinvokable.h:39
MIDIInvokable::_invokable_name
std::string _invokable_name
Definition:
midiinvokable.h:55
MIDI::Parser
Definition:
parser.h:48
XMLNode
Definition:
xml++.h:114
types.h
midiinvokable.h
MIDI
Definition:
midi_region_view.h:50
MIDI::byte
unsigned char byte
Definition:
ctrl-interface/midi_surface/midi_surface/midi_byte_array.h:26
MIDI::sysex
@ sysex
Definition:
midi++2/midi++/types.h:49
signals.h
stateful.h
libs
surfaces
generic_midi
midifunction.h
Generated on Sat Nov 9 2024 06:31:46 for Ardour by
1.9.1