![]() |
MIDI2LR 6.3.0.1
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 <Profile.h>
Public Member Functions | |
| Profile (const CommandSet &command_set) noexcept | |
| bool | CommandHasAssociatedMessage (const std::string &command) const |
| void | FromXml (const juce::XmlElement *root) |
| const std::string & | GetCommandForMessage (rsj::MidiMessageId message) const |
| rsj::MidiMessageId | GetMessageForNumber (size_t num) const |
| std::vector< rsj::MidiMessageId > | GetMessagesForCommand (const std::string &command) const |
| int | GetRowForMessage (rsj::MidiMessageId message) const |
| void | InsertOrAssign (const std::string &command, rsj::MidiMessageId message) |
| void | InsertOrAssign (size_t command, rsj::MidiMessageId message) |
| void | InsertUnassigned (rsj::MidiMessageId message) |
| bool | MessageExistsInMap (rsj::MidiMessageId message) const |
| bool | ProfileUnsaved () const |
| void | RemoveAllRows () |
| void | RemoveMessage (rsj::MidiMessageId message) |
| void | RemoveRow (size_t row) |
| void | RemoveUnassignedMessages () |
| void | Resort (std::pair< int, bool > new_order) |
| size_t | Size () const |
| void | ToXmlFile (const juce::File &file) |
Private Types | |
| using | mm_abbrv_lmnt_t = std::pair<rsj::MidiMessageId, std::string> |
Private Member Functions | |
| void | InsertOrAssignI (const std::string &command, const rsj::MidiMessageId &message) |
| bool | MessageExistsInMapI (rsj::MidiMessageId message) const |
| void | SortI () |
Private Attributes | |
| const CommandSet & | command_set_ |
| std::pair< int, bool > | current_sort_ {2, true} |
| std::vector< mm_abbrv_lmnt_t > | mm_abbrv_table_ {} |
| std::shared_mutex | mutex_ |
| bool | profile_unsaved_ {false} |
| std::vector< mm_abbrv_lmnt_t > | saved_mm_abbrv_table_ {} |
| std::mutex | saved_table_mtx_ |
|
private |
|
inlineexplicitnoexcept |
References command_set_.
|
inlinenodiscard |
Referenced by CommandMenu::AddSubMenuItems().
| void Profile::FromXml | ( | const juce::XmlElement * | root | ) |
References profile_unsaved_, RemoveAllRows(), and SortI().
|
inlinenodiscard |
Referenced by CommandTableModel::CreateNewCommandMenu(), LrIpcOut::ProcessMessage(), and CommandTableModel::UpdateCommandMenu().
|
inlinenodiscard |
|
nodiscard |
|
inlinenodiscard |
Referenced by MainContentComponent::MidiCmdCallback().
|
inline |
References InsertOrAssignI().
|
inline |
References command_set_, CommandSet::CommandAbbrevSize(), and InsertOrAssignI().
Referenced by CommandMenu::ProcessUserSelection().
|
private |
References profile_unsaved_, and SortI().
Referenced by InsertOrAssign(), and InsertOrAssign().
| void Profile::InsertUnassigned | ( | rsj::MidiMessageId | message | ) |
References MessageExistsInMapI(), profile_unsaved_, and SortI().
Referenced by MainContentComponent::MidiCmdCallback().
|
inlinenodiscard |
References MessageExistsInMapI().
Referenced by LrIpcOut::MidiCmdCallback(), and ProfileManager::MidiCmdCallback().
|
inlinenodiscardprivate |
Referenced by InsertUnassigned(), and MessageExistsInMap().
|
inlinenodiscard |
Referenced by MainContentComponent::LoadClicked().
| void Profile::RemoveAllRows | ( | ) |
References profile_unsaved_.
Referenced by FromXml(), and MainContentComponent::RemoveAllRowsClicked().
| void Profile::RemoveMessage | ( | rsj::MidiMessageId | message | ) |
References profile_unsaved_.
| void Profile::RemoveRow | ( | size_t | row | ) |
References profile_unsaved_.
Referenced by CommandTableModel::RemoveRow().
| void Profile::RemoveUnassignedMessages | ( | ) |
References profile_unsaved_.
Referenced by MainContentComponent::RemoveUnassignedClicked().
| void Profile::Resort | ( | std::pair< int, bool > | new_order | ) |
References SortI().
Referenced by CommandTableModel::sortOrderChanged().
|
inlinenodiscard |
|
private |
References command_set_, and CommandSet::CommandTextIndex().
Referenced by FromXml(), InsertOrAssignI(), InsertUnassigned(), and Resort().
| void Profile::ToXmlFile | ( | const juce::File & | file | ) |
References profile_unsaved_.
|
private |
Referenced by Profile(), InsertOrAssign(), and SortI().
|
private |
|
private |
|
mutableprivate |
|
private |
Referenced by FromXml(), InsertOrAssignI(), InsertUnassigned(), RemoveAllRows(), RemoveMessage(), RemoveRow(), RemoveUnassignedMessages(), and ToXmlFile().
|
private |
|
mutableprivate |