|
version 1.20, 2008/04/21 22:44:42
|
version 1.21, 2008/04/23 20:32:40
|
|
|
|
| | |
| void EventRouter::updateSteps(){ | void EventRouter::updateSteps(){ |
| const ScopedLock lock(threadlock); | const ScopedLock lock(threadlock); |
| updateControlRow(0); // row of rotary push encoders (step pitch) |
updateControlRow(1); // row of rotary push encoders (step pitch) |
| updateControlRow(73); // second row of buttons (step on/off) | updateControlRow(73); // second row of buttons (step on/off) |
| updateControlRow(row1cc); | updateControlRow(row1cc); |
| updateControlRow(row2cc); | updateControlRow(row2cc); |
|
|
|
| case ControlChange: { | case ControlChange: { |
| Control* ctrl = ccControls[mode][command]; | Control* ctrl = ccControls[mode][command]; |
| if(ctrl != NULL){ | if(ctrl != NULL){ |
| DBG(String("receive cc ") << command << ": " << value); |
// DBG(String("receive cc ") << command << ": " << value); |
| ctrl->updateValueFromEventRouter(value); | ctrl->updateValueFromEventRouter(value); |
| }else{ | }else{ |
| DBG(String("unsupported cc received: ") << command); | DBG(String("unsupported cc received: ") << command); |
|
|
|
| return; | return; |
| switch(type){ | switch(type){ |
| case ControlChange: { | case ControlChange: { |
| std::cout << " send cc" << command << ":" << value; |
// DBG(String(" send cc") << command << ":" << value); |
| jassert(value >= 0 && value < 128); | jassert(value >= 0 && value < 128); |
| jassert(command >= 0 && command < 128); | jassert(command >= 0 && command < 128); |
| controloutput->sendMessageNow(MidiMessage::controllerEvent(channel, command, value)); | controloutput->sendMessageNow(MidiMessage::controllerEvent(channel, command, value)); |
| break; | break; |
| } | } |
| case NoteOn: { | case NoteOn: { |
| std::cout << " send noteon" << command << ":" << value; |
DBG(String(" send noteon") << command << ":" << value); |
| jassert(value >= 0 && value < 128); | jassert(value >= 0 && value < 128); |
| jassert(command >= 0 && command < 128); | jassert(command >= 0 && command < 128); |
| controloutput->sendMessageNow(MidiMessage::noteOn(channel, command, (juce::uint8)value)); | controloutput->sendMessageNow(MidiMessage::noteOn(channel, command, (juce::uint8)value)); |
| break; | break; |
| } | } |
| case NoteOff: { | case NoteOff: { |
| std::cout << " send noteoff" << command; |
DBG(String(" send noteoff") << command); |
| jassert(command >= 0 && command < 128); | jassert(command >= 0 && command < 128); |
| controloutput->sendMessageNow(MidiMessage::noteOff(channel, command)); | controloutput->sendMessageNow(MidiMessage::noteOff(channel, command)); |
| break; | break; |