1
Fork 0

rewire keyboard playthrough for correct channel as well

This commit is contained in:
Leonard Ritter 2010-09-06 20:36:15 +02:00
parent 4681bbda70
commit 24c8540ef1
4 changed files with 5 additions and 0 deletions

View File

@ -237,6 +237,7 @@ public:
for (Jack::NFrames i = 0; i < midi_inp->get_event_count(); ++i) {
MIDI::Message ctrl_msg;
if (midi_inp->get_event(ctrl_msg, NULL, i)) {
ctrl_msg.channel = model->midi_control_channel;
midi_omni_out->write_event(0, ctrl_msg);
midi_ports[model->midi_control_port]->write_event(0, ctrl_msg);
}

View File

@ -428,6 +428,7 @@ Model::Model() {
void Model::reset() {
end_cue = 0;
midi_control_port = 0;
midi_control_channel = 0;
beats_per_minute = 120;
frames_per_beat = 4;
beats_per_bar = 4;

View File

@ -276,6 +276,8 @@ public:
// what port to use for the midi control
int midi_control_port;
// what channel to use for the midi control
int midi_control_channel;
void reset();

View File

@ -110,6 +110,7 @@ bool TrackBar::on_name_button_press_event(GdkEventButton *event) {
(event->button == 1)) {
Track &track = model->tracks[index];
model->midi_control_port = track.midi_port;
model->midi_control_channel = track.midi_channel;
return true;
} else if ((event->type == GDK_2BUTTON_PRESS) &&
(event->button == 1)) {