Ardour
9.0-pre0-582-g084a23a80d
us2400/pot.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 Ben Loftis <ben@harrisonconsoles.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 __ardour_us2400_control_protocol_pot_h__
20
#define __ardour_us2400_control_protocol_pot_h__
21
22
#include "
controls.h
"
23
24
namespace
ArdourSurface
{
25
26
namespace
US2400
{
27
28
class
Pot
:
public
Control
29
{
30
public
:
31
static
int
const
External
;
32
static
int
const
ID
;
33
34
enum
Mode
{
35
dot
= 0,
36
boost_cut
= 1,
37
wrap
= 2,
38
spread
= 3
39
};
40
41
Pot
(
int
id
, std::string
name
,
Group
&
group
)
42
:
Control
(
id
,
name
,
group
),
43
last_update_position
(-1),
44
llast_update_position
(-1) {}
45
46
void
set_mode
(
Mode
m) {
_mode
= m;
last_update_position
= -1; }
47
48
MidiByteArray
set
(
float
,
bool
);
49
MidiByteArray
zero
() {
return
set
(0.0,
false
); }
50
51
static
Control
*
factory
(
Surface
&,
int
id
,
const
char
*,
Group
&);
52
53
void
mark_dirty
() {
last_update_position
=
llast_update_position
= -1; }
54
55
int
last_update_position
;
56
int
llast_update_position
;
57
58
Mode
_mode
;
59
60
};
61
62
}
63
}
64
65
#endif
/* __ardour_us2400_control_protocol_pot_h__ */
ArdourSurface::US2400::Control
Definition:
us2400/controls.h:49
ArdourSurface::US2400::Control::id
int id() const
Definition:
us2400/controls.h:54
ArdourSurface::US2400::Control::name
const std::string & name() const
Definition:
us2400/controls.h:55
ArdourSurface::US2400::Control::group
Group & group() const
Definition:
us2400/controls.h:56
ArdourSurface::US2400::Group
Definition:
surfaces/us2400/control_group.h:35
ArdourSurface::US2400::Pot
Definition:
us2400/pot.h:29
ArdourSurface::US2400::Pot::last_update_position
int last_update_position
Definition:
us2400/pot.h:55
ArdourSurface::US2400::Pot::factory
static Control * factory(Surface &, int id, const char *, Group &)
ArdourSurface::US2400::Pot::set_mode
void set_mode(Mode m)
Definition:
us2400/pot.h:46
ArdourSurface::US2400::Pot::Mode
Mode
Definition:
us2400/pot.h:34
ArdourSurface::US2400::Pot::boost_cut
@ boost_cut
Definition:
us2400/pot.h:36
ArdourSurface::US2400::Pot::dot
@ dot
Definition:
us2400/pot.h:35
ArdourSurface::US2400::Pot::wrap
@ wrap
Definition:
us2400/pot.h:37
ArdourSurface::US2400::Pot::spread
@ spread
Definition:
us2400/pot.h:38
ArdourSurface::US2400::Pot::mark_dirty
void mark_dirty()
Definition:
us2400/pot.h:53
ArdourSurface::US2400::Pot::External
static int const External
Definition:
us2400/pot.h:31
ArdourSurface::US2400::Pot::set
MidiByteArray set(float, bool)
ArdourSurface::US2400::Pot::ID
static int const ID
Definition:
us2400/pot.h:32
ArdourSurface::US2400::Pot::Pot
Pot(int id, std::string name, Group &group)
Definition:
us2400/pot.h:41
ArdourSurface::US2400::Pot::_mode
Mode _mode
Definition:
us2400/pot.h:58
ArdourSurface::US2400::Pot::zero
MidiByteArray zero()
Definition:
us2400/pot.h:49
ArdourSurface::US2400::Pot::llast_update_position
int llast_update_position
Definition:
us2400/pot.h:56
ArdourSurface::US2400::Surface
Definition:
us2400/surface.h:67
MidiByteArray
Definition:
ctrl-interface/midi_surface/midi_surface/midi_byte_array.h:47
ArdourSurface
Definition:
cc121.h:71
PBD::DEBUG::US2400
DebugBits US2400
controls.h
libs
surfaces
us2400
pot.h
Generated on Wed Dec 25 2024 05:44:45 for Ardour by
1.9.1