![]() |
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 <LR_IPC_Out.h>
Public Member Functions | |
LrIpcOut (const CommandSet &command_set, ControlsModel &c_model, const Profile &profile, const MidiSender &midi_sender, MidiReceiver &midi_receiver, asio::io_context &io_context) | |
LrIpcOut (const LrIpcOut &other)=delete | |
LrIpcOut (LrIpcOut &&other)=delete | |
~LrIpcOut ()=default | |
template<class T > | |
void | AddCallback (_In_ T *const object, _In_ void(T::*const mf)(bool, bool)) |
LrIpcOut & | operator= (const LrIpcOut &other)=delete |
LrIpcOut & | operator= (LrIpcOut &&other)=delete |
void | SendCommand (const std::string &command) const |
void | SendCommand (std::string &&command) const |
void | SendingRestart () |
void | SendingStop () |
void | Start () |
void | Stop () |
Private Types | |
using | RepeatCmdIterator = const std::unordered_map< std::string, std::pair< std::string, std::string > >::const_iterator |
Private Member Functions | |
void | Connect (std::shared_ptr< LrIpcOutShared > lr_ipc_out_shared) |
void | ConnectionMade () |
void | MidiCmdCallback (rsj::MidiMessage mm) |
void | ProcessChange (const RepeatCmdIterator &repeats, const rsj::MidiMessage &mm) const |
void | ProcessMessage (const rsj::MidiMessageId &message, const rsj::MidiMessage &mm) |
void | ProcessNonRepeatedCommand (const std::string &command_to_send, const rsj::MidiMessage &mm) const |
void | ProcessRepeatedCommand (const RepeatCmdIterator &repeats, const rsj::MidiMessage &mm, const rsj::MidiMessageId &message) |
void | SetRecenter (rsj::MidiMessageId mm) |
bool | ShouldSetRecenter (const rsj::MidiMessage &mm) const |
Private Attributes | |
std::mutex | callback_mtx_ |
std::vector< std::function< void(bool, bool)> > | callbacks_ {} |
bool | connected_ {false} |
ControlsModel & | controls_model_ |
std::shared_ptr< LrIpcOutShared > | lr_ipc_out_shared_ |
const MidiSender & | midi_sender_ |
const Profile & | profile_ |
asio::steady_timer | recenter_timer_ |
const std::unordered_map< std::string, std::pair< std::string, std::string > > & | repeat_cmd_ |
bool | sending_stopped_ {false} |
std::atomic< bool > | thread_should_exit_ {false} |
const std::vector< std::string > & | wrap_ |
|
private |
LrIpcOut::LrIpcOut | ( | const CommandSet & | command_set, |
ControlsModel & | c_model, | ||
const Profile & | profile, | ||
const MidiSender & | midi_sender, | ||
MidiReceiver & | midi_receiver, | ||
asio::io_context & | io_context | ||
) |
|
default |
|
delete |
|
delete |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
void LrIpcOut::SendCommand | ( | const std::string & | command | ) | const |
void LrIpcOut::SendCommand | ( | std::string && | command | ) | const |
void LrIpcOut::SendingRestart | ( | ) |
void LrIpcOut::SendingStop | ( | ) |
|
private |
|
private |
|
inline |
void LrIpcOut::Stop | ( | ) |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |