@@ -189,13 +189,14 @@ void CCTextField::onMouseDown(EventMouseDown &e) { | |||||
if (e.button == 1) { | if (e.button == 1) { | ||||
module->onFocus[num] = true; | module->onFocus[num] = true; | ||||
} | } | ||||
e.consumed = true; | |||||
} | } | ||||
void CCTextField::onMouseUp(EventMouseUp &e) { | void CCTextField::onMouseUp(EventMouseUp &e) { | ||||
if (e.button == 1) { | if (e.button == 1) { | ||||
module->onFocus[num] = false; | module->onFocus[num] = false; | ||||
} | } | ||||
e.consumed = true; | |||||
} | } | ||||
void CCTextField::onMouseLeave(EventMouseLeave &e) { | void CCTextField::onMouseLeave(EventMouseLeave &e) { | ||||
@@ -88,10 +88,10 @@ public: | |||||
void close(); | void close(); | ||||
/* called when midi port is set */ | /* called when midi port is set */ | ||||
virtual void resetMidi()=0; | |||||
virtual void resetMidi() {} | |||||
/* called if a user switches or sets the deivce (and after this device is initialised)*/ | /* called if a user switches or sets the deivce (and after this device is initialised)*/ | ||||
virtual void onDeviceChange(){}; | |||||
virtual void onDeviceChange() {} | |||||
}; | }; | ||||
////////////////////// | ////////////////////// | ||||
@@ -107,9 +107,8 @@ struct MidiItem : MenuItem { | |||||
struct MidiChoice : ChoiceButton { | struct MidiChoice : ChoiceButton { | ||||
MidiIO *midiModule; | MidiIO *midiModule; | ||||
void onAction(EventAction &e) override; | |||||
void step() override; | void step() override; | ||||
void onAction(EventAction &e) override; | |||||
}; | }; | ||||
struct ChannelItem : MenuItem { | struct ChannelItem : MenuItem { | ||||
@@ -122,38 +121,6 @@ struct ChannelItem : MenuItem { | |||||
struct ChannelChoice : ChoiceButton { | struct ChannelChoice : ChoiceButton { | ||||
MidiIO *midiModule; | MidiIO *midiModule; | ||||
void onAction(EventAction &e) override; | |||||
void step() override; | |||||
}; | |||||
struct MidiToCVWidget : ModuleWidget { | |||||
MidiToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDICCToCVWidget : ModuleWidget { | |||||
MIDICCToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDIClockToCVWidget : ModuleWidget { | |||||
MIDIClockToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDITriggerToCVWidget : ModuleWidget { | |||||
MIDITriggerToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct QuadMidiToCVWidget : ModuleWidget { | |||||
QuadMidiToCVWidget(); | |||||
void step() override; | void step() override; | ||||
void onAction(EventAction &e) override; | |||||
}; | }; |
@@ -189,13 +189,14 @@ void TriggerTextField::onMouseDown(EventMouseDown &e) { | |||||
if (e.button == 1) { | if (e.button == 1) { | ||||
*onFocus = true; | *onFocus = true; | ||||
} | } | ||||
e.consumed = true; | |||||
} | } | ||||
void TriggerTextField::onMouseUp(EventMouseUp &e) { | void TriggerTextField::onMouseUp(EventMouseUp &e) { | ||||
if (e.button == 1) { | if (e.button == 1) { | ||||
*onFocus = false; | *onFocus = false; | ||||
} | } | ||||
e.consumed = true; | |||||
} | } | ||||
void TriggerTextField::onMouseLeave(EventMouseLeave &e) { | void TriggerTextField::onMouseLeave(EventMouseLeave &e) { | ||||
@@ -280,6 +281,5 @@ MIDITriggerToCVWidget::MIDITriggerToCVWidget() { | |||||
} | } | ||||
void MIDITriggerToCVWidget::step() { | void MIDITriggerToCVWidget::step() { | ||||
ModuleWidget::step(); | ModuleWidget::step(); | ||||
} | } |
@@ -1,10 +1,11 @@ | |||||
#include "core.hpp" | #include "core.hpp" | ||||
#include "MidiIO.hpp" | |||||
void init(rack::Plugin *p) { | void init(rack::Plugin *p) { | ||||
p->slug = "Core"; | p->slug = "Core"; | ||||
p->addModel(createModel<AudioInterfaceWidget>("Core", "Core", "AudioInterface", "Audio Interface")); | p->addModel(createModel<AudioInterfaceWidget>("Core", "Core", "AudioInterface", "Audio Interface")); | ||||
p->addModel(createModel<MidiToCVWidget>("Core", "Core", "MIDIToCVInterface", "MIDI-to-CV Interface")); | p->addModel(createModel<MidiToCVWidget>("Core", "Core", "MIDIToCVInterface", "MIDI-to-CV Interface")); | ||||
p->addModel(createModel<MIDICCToCVWidget>("Core", "Core", "MIDICCToCVInterface", "MIDI CC-to-CV Interface")); | p->addModel(createModel<MIDICCToCVWidget>("Core", "Core", "MIDICCToCVInterface", "MIDI CC-to-CV Interface")); | ||||
p->addModel(createModel<MIDIClockToCVWidget>("Core", "Core", "MIDIClockToCVInterface", "MIDI Clock-to-CV Interface")); | p->addModel(createModel<MIDIClockToCVWidget>("Core", "Core", "MIDIClockToCVInterface", "MIDI Clock-to-CV Interface")); | ||||
p->addModel(createModel<MIDITriggerToCVWidget>("Core", "Core", "MIDITriggerToCVInterface", "MIDI Trigger-to-CV Interface")); | p->addModel(createModel<MIDITriggerToCVWidget>("Core", "Core", "MIDITriggerToCVInterface", "MIDI Trigger-to-CV Interface")); | ||||
@@ -12,6 +12,32 @@ struct AudioInterfaceWidget : ModuleWidget { | |||||
AudioInterfaceWidget(); | AudioInterfaceWidget(); | ||||
}; | }; | ||||
struct MidiToCVWidget : ModuleWidget { | |||||
MidiToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDICCToCVWidget : ModuleWidget { | |||||
MIDICCToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDIClockToCVWidget : ModuleWidget { | |||||
MIDIClockToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct MIDITriggerToCVWidget : ModuleWidget { | |||||
MIDITriggerToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct QuadMidiToCVWidget : ModuleWidget { | |||||
QuadMidiToCVWidget(); | |||||
void step() override; | |||||
}; | |||||
struct BridgeWidget : ModuleWidget { | struct BridgeWidget : ModuleWidget { | ||||
BridgeWidget(); | BridgeWidget(); | ||||
}; | }; | ||||