Skip to content

Commit

Permalink
Add input-only MIDI activity widget to Group channels
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Oct 11, 2024
1 parent f7814b0 commit 610164b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/gui/elems/mainWindow/keyboard/groupChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ geGroupChannel::geGroupChannel(c::channel::Data d)
playButton = new geImageButton(graphics::channelPlayOff, graphics::channelPlayOn);
arm = new geImageButton(graphics::armOff, graphics::armOn);
mainButton = new geGroupChannelButton(m_channel);
midiActivity = new geMidiActivity();
midiActivity = new geMidiActivity(/*hasOut=*/false);
mute = new geImageButton(graphics::muteOff, graphics::muteOn);
solo = new geImageButton(graphics::soloOff, graphics::soloOn);
fx = new geImageButton(graphics::fxOff, graphics::fxOn);
Expand All @@ -84,7 +84,7 @@ geGroupChannel::geGroupChannel(c::channel::Data d)
end();

playButton->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_PLAY));
midiActivity->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MIDIACTIVITY));
midiActivity->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY));
mute->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MUTE));
solo->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_SOLO));
fx->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_FX));
Expand Down
5 changes: 3 additions & 2 deletions src/gui/elems/midiActivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ void geMidiLed::lit()
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

geMidiActivity::geMidiActivity()
geMidiActivity::geMidiActivity(bool hasOut)
: geFlex(Direction::VERTICAL, G_GUI_INNER_MARGIN)
{
out = new geMidiLed();
in = new geMidiLed();
addWidget(out);
if (hasOut)
addWidget(out);
addWidget(in);
end();
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/elems/midiActivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class geMidiLed : public Fl_Button
class geMidiActivity : public geFlex
{
public:
geMidiActivity();
geMidiActivity(bool hasOut = true);

geMidiLed* out;
geMidiLed* in;
Expand Down
29 changes: 15 additions & 14 deletions src/gui/langMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,21 @@ LangMap::LangMap()
m_data[MAIN_TRACK_BUTTON_REMOVE_TRACK] = "Remove track";
m_data[MAIN_TRACK_BUTTON_ADD_TRACK] = "Add track";

m_data[MAIN_CHANNEL_NOSAMPLE] = "-- no sample --";
m_data[MAIN_CHANNEL_SAMPLENOTFOUND] = "* file not found! *";
m_data[MAIN_CHANNEL_LABEL_PLAY] = "Play/stop";
m_data[MAIN_CHANNEL_LABEL_ARM] = "Arm for recording";
m_data[MAIN_CHANNEL_LABEL_STATUS] = "Progress bar";
m_data[MAIN_CHANNEL_LABEL_READACTIONS] = "Read actions\n\nToggles playback of pre-recorded "
"actions (key press, key release, ...).";
m_data[MAIN_CHANNEL_LABEL_MODEBOX] = "Mode";
m_data[MAIN_CHANNEL_LABEL_MUTE] = "Mute";
m_data[MAIN_CHANNEL_LABEL_SOLO] = "Solo";
m_data[MAIN_CHANNEL_LABEL_FX] = "Plug-ins";
m_data[MAIN_CHANNEL_LABEL_VOLUME] = "Volume";
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY] = "MIDI I/O activity\n\nNotifies MIDI messages sent (top) or "
"received (bottom) by this channel.";
m_data[MAIN_CHANNEL_NOSAMPLE] = "-- no sample --";
m_data[MAIN_CHANNEL_SAMPLENOTFOUND] = "* file not found! *";
m_data[MAIN_CHANNEL_LABEL_PLAY] = "Play/stop";
m_data[MAIN_CHANNEL_LABEL_ARM] = "Arm for recording";
m_data[MAIN_CHANNEL_LABEL_STATUS] = "Progress bar";
m_data[MAIN_CHANNEL_LABEL_READACTIONS] = "Read actions\n\nToggles playback of pre-recorded "
"actions (key press, key release, ...).";
m_data[MAIN_CHANNEL_LABEL_MODEBOX] = "Mode";
m_data[MAIN_CHANNEL_LABEL_MUTE] = "Mute";
m_data[MAIN_CHANNEL_LABEL_SOLO] = "Solo";
m_data[MAIN_CHANNEL_LABEL_FX] = "Plug-ins";
m_data[MAIN_CHANNEL_LABEL_VOLUME] = "Volume";
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY] = "MIDI I/O activity\n\nNotifies MIDI messages sent (top) or "
"received (bottom) by this channel.";
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY] = "MIDI I/O activity\n\nNotifies MIDI messages received by this channel.";

m_data[MAIN_CHANNEL_MENU_INPUTMONITOR] = "Input monitor";
m_data[MAIN_CHANNEL_MENU_OVERDUBPROTECTION] = "Overdub protection";
Expand Down
25 changes: 13 additions & 12 deletions src/gui/langMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,19 @@ class LangMap
static constexpr auto MAIN_TRACK_BUTTON_REMOVE_TRACK = "main_track_button_removeTrack";
static constexpr auto MAIN_TRACK_BUTTON_ADD_TRACK = "main_track_button_addTrack";

static constexpr auto MAIN_CHANNEL_NOSAMPLE = "main_channel_noSample";
static constexpr auto MAIN_CHANNEL_SAMPLENOTFOUND = "main_channel_sampleNotFound";
static constexpr auto MAIN_CHANNEL_LABEL_PLAY = "main_channel_label_play";
static constexpr auto MAIN_CHANNEL_LABEL_ARM = "main_channel_label_arm";
static constexpr auto MAIN_CHANNEL_LABEL_STATUS = "main_channel_label_status";
static constexpr auto MAIN_CHANNEL_LABEL_READACTIONS = "main_channel_label_readActions";
static constexpr auto MAIN_CHANNEL_LABEL_MODEBOX = "main_channel_label_modeBox";
static constexpr auto MAIN_CHANNEL_LABEL_MUTE = "main_channel_label_mute";
static constexpr auto MAIN_CHANNEL_LABEL_SOLO = "main_channel_label_solo";
static constexpr auto MAIN_CHANNEL_LABEL_FX = "main_channel_label_fx";
static constexpr auto MAIN_CHANNEL_LABEL_VOLUME = "main_channel_label_volume";
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY = "main_channel_label_midiActivity";
static constexpr auto MAIN_CHANNEL_NOSAMPLE = "main_channel_noSample";
static constexpr auto MAIN_CHANNEL_SAMPLENOTFOUND = "main_channel_sampleNotFound";
static constexpr auto MAIN_CHANNEL_LABEL_PLAY = "main_channel_label_play";
static constexpr auto MAIN_CHANNEL_LABEL_ARM = "main_channel_label_arm";
static constexpr auto MAIN_CHANNEL_LABEL_STATUS = "main_channel_label_status";
static constexpr auto MAIN_CHANNEL_LABEL_READACTIONS = "main_channel_label_readActions";
static constexpr auto MAIN_CHANNEL_LABEL_MODEBOX = "main_channel_label_modeBox";
static constexpr auto MAIN_CHANNEL_LABEL_MUTE = "main_channel_label_mute";
static constexpr auto MAIN_CHANNEL_LABEL_SOLO = "main_channel_label_solo";
static constexpr auto MAIN_CHANNEL_LABEL_FX = "main_channel_label_fx";
static constexpr auto MAIN_CHANNEL_LABEL_VOLUME = "main_channel_label_volume";
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY = "main_channel_label_midiActivity";
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY = "main_channel_label_midiActivity_inOnly";

static constexpr auto MAIN_CHANNEL_MENU_INPUTMONITOR = "main_channel_menu_inputMonitor";
static constexpr auto MAIN_CHANNEL_MENU_OVERDUBPROTECTION = "main_channel_menu_overdubProtection";
Expand Down

0 comments on commit 610164b

Please sign in to comment.