![]() |
MIDI2LR 6.1.0.0
MIDI2LR is an application that interfaces MIDI controllers with Lightroom 6+/CC Classic. It processes MIDI input into develop parameter updates and photo actions, and sends MIDI output when parameters are changed for motorized feedback (on controllers that have motorized faders). A listing of available LightRoom commands is in the Wiki. Assistance on the code and design is welcome.
|
#include <ControlsModel.h>
Public Member Functions | |
ChannelModel () | |
double | ControllerToPlugin (rsj::MessageType controltype, int controlnumber, int value, bool wrap) |
int | GetCcMax (int controlnumber) const |
rsj::CCmethod | GetCcMethod (int controlnumber) const |
int | GetCcMin (int controlnumber) const |
int | GetPwMax () const noexcept |
int | GetPwMin () const noexcept |
int | MeasureChange (rsj::MessageType controltype, int controlnumber, int value) |
int | PluginToController (rsj::MessageType controltype, int controlnumber, double value) |
void | SetCc (int controlnumber, int min, int max, rsj::CCmethod controltype) |
void | SetCcAll (int controlnumber, int min, int max, rsj::CCmethod controltype) |
void | SetCcMax (int controlnumber, int value) |
void | SetCcMethod (int controlnumber, rsj::CCmethod value) |
void | SetCcMin (int controlnumber, int value) |
void | SetPwMax (int value) noexcept |
void | SetPwMin (int value) noexcept |
int | SetToCenter (rsj::MessageType controltype, int controlnumber) |
Private Member Functions | |
void | ActiveToSaved () const |
void | CcDefaults () |
int | CenterCc (int controlnumber) const noexcept |
int | CenterPw () const noexcept |
bool | IsNrpn (int controlnumber) const |
template<class Archive > | |
void | load (Archive &archive, const uint32_t version) |
double | OffsetResult (int diff, int controlnumber, bool wrap) |
template<class Archive > | |
void | save (Archive &archive, const uint32_t version) const |
void | SavedToActive () |
void | SaveSettings (int start, int end, int maxVal) const |
Private Attributes | |
std::array< int, kMaxControls > | cc_high_ {} |
std::array< int, kMaxControls > | cc_low_ {} |
std::array< rsj::CCmethod, kMaxControls > | cc_method_ {} |
std::array< std::atomic< int >, kMaxControls > | current_v_ {} |
std::atomic< int > | pitch_wheel_current_ {kMaxNrpnHalf} |
int | pitch_wheel_max_ {kMaxNrpn} |
int | pitch_wheel_min_ {0} |
std::vector< rsj::SettingsStruct > | settings_to_save_ {} |
Static Private Attributes | |
static constexpr int | kBit14 {0x2000} |
static constexpr int | kBit7 {0x40} |
static constexpr int | kLow13Bits {0x1FFF} |
static constexpr int | kLow6Bits {0x3F} |
static constexpr size_t | kMaxControls {0x4000} |
static constexpr int | kMaxMidi {0x7F} |
static constexpr int | kMaxMidiHalf {kMaxMidi / 2} |
static constexpr int | kMaxNrpn {0x3FFF} |
static constexpr int | kMaxNrpnHalf {kMaxNrpn / 2} |
Friends | |
class | cereal::access |
ChannelModel::ChannelModel | ( | ) |
|
private |
|
private |
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
double ChannelModel::ControllerToPlugin | ( | rsj::MessageType | controltype, |
int | controlnumber, | ||
int | value, | ||
bool | wrap | ||
) |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprivate |
|
private |
int ChannelModel::MeasureChange | ( | rsj::MessageType | controltype, |
int | controlnumber, | ||
int | value | ||
) |
|
private |
int ChannelModel::PluginToController | ( | rsj::MessageType | controltype, |
int | controlnumber, | ||
double | value | ||
) |
|
private |
|
private |
|
private |
void ChannelModel::SetCc | ( | int | controlnumber, |
int | min, | ||
int | max, | ||
rsj::CCmethod | controltype | ||
) |
void ChannelModel::SetCcAll | ( | int | controlnumber, |
int | min, | ||
int | max, | ||
rsj::CCmethod | controltype | ||
) |
void ChannelModel::SetCcMax | ( | int | controlnumber, |
int | value | ||
) |
|
inline |
void ChannelModel::SetCcMin | ( | int | controlnumber, |
int | value | ||
) |
|
noexcept |
|
noexcept |
int ChannelModel::SetToCenter | ( | rsj::MessageType | controltype, |
int | controlnumber | ||
) |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
mutableprivate |