-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBCRDefinition.h
53 lines (38 loc) · 1.2 KB
/
BCRDefinition.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
Copyright (c) 2019 Christof Ruch. All rights reserved.
Dual licensed: Distributed under Affero GPL license by default, an MIT license is available for purchase
*/
#pragma once
#include "SynthParameterDefinition.h"
namespace midikraft {
enum BCRtype { ENCODER, BUTTON };
enum BCRledMode {
OFF, ONE_DOT, ONE_DOT_OFF, ONETWO_DOT, ONETWO_DOT_OFF, BAR, BAR_OFF, SPREAD, PAN, QUAL, CUT, DAMP
};
// Hmm, the language is actually called BCL. But the device is the BCR.
class BCRdefinition {
public:
BCRdefinition(BCRtype type, int encoderNumber);
virtual ~BCRdefinition() = default;
BCRtype type() const { return type_; }
int encoderNumber() const { return number_; }
static std::string ledMode(BCRledMode ledmode);
protected:
BCRtype type_;
int number_;
};
class BCRStandardDefinition : public BCRdefinition {
public:
BCRStandardDefinition(BCRtype type, int encoderNumber) : BCRdefinition(type, encoderNumber) {
}
virtual std::string generateBCR(int channel) const = 0;
};
class BCRNamedParameterCapability {
public:
virtual std::string name() = 0;
};
class BCRGetParameterCapability {
public:
virtual std::shared_ptr<SynthParameterDefinition> parameter() = 0;
};
}