Browse Source

Implement all Core panel redesigns. Reorganize Core module class and SVG names.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
3abe6aa804
17 changed files with 215 additions and 216 deletions
  1. +0
    -0
      res/Core/CV_MIDI.svg
  2. +0
    -0
      res/Core/CV_MIDICC.svg
  3. +0
    -0
      res/Core/Gate_MIDI.svg
  4. +0
    -0
      res/Core/MIDICC_CV.svg
  5. +0
    -0
      res/Core/MIDIMap.svg
  6. +0
    -0
      res/Core/MIDI_CV.svg
  7. +0
    -0
      res/Core/MIDI_Gate.svg
  8. +102
    -103
      src/core/Audio.cpp
  9. +1
    -1
      src/core/CV_MIDI.cpp
  10. +26
    -26
      src/core/CV_MIDICC.cpp
  11. +27
    -27
      src/core/Gate_MIDI.cpp
  12. +25
    -25
      src/core/MIDICC_CV.cpp
  13. +18
    -18
      src/core/MIDIMap.cpp
  14. +1
    -1
      src/core/MIDI_CV.cpp
  15. +1
    -1
      src/core/MIDI_Gate.cpp
  16. +7
    -7
      src/core/plugin.cpp
  17. +7
    -7
      src/core/plugin.hpp

res/Core/CV-MIDI.svg → res/Core/CV_MIDI.svg View File


res/Core/CV-MIDI CC.svg → res/Core/CV_MIDICC.svg View File


res/Core/Gate-MIDI.svg → res/Core/Gate_MIDI.svg View File


res/Core/MIDI CC-CV.svg → res/Core/MIDICC_CV.svg View File


res/Core/MIDI Map.svg → res/Core/MIDIMap.svg View File


res/Core/MIDI-CV.svg → res/Core/MIDI_CV.svg View File


res/Core/MIDI-Gate.svg → res/Core/MIDI_Gate.svg View File


src/core/AudioInterface.cpp → src/core/Audio.cpp View File

@@ -13,7 +13,7 @@ namespace core {


template <int NUM_AUDIO_INPUTS, int NUM_AUDIO_OUTPUTS>
struct AudioInterfacePort : audio::Port {
struct AudioPort : audio::Port {
Module* module;

dsp::DoubleRingBuffer<dsp::Frame<NUM_AUDIO_INPUTS>, 32768> engineInputBuffer;
@@ -28,7 +28,7 @@ struct AudioInterfacePort : audio::Port {
float deviceSampleRate = 0.f;
int requestedEngineFrames = 0;

AudioInterfacePort(Module* module) {
AudioPort(Module* module) {
this->module = module;
maxOutputs = NUM_AUDIO_INPUTS;
maxInputs = NUM_AUDIO_OUTPUTS;
@@ -172,7 +172,7 @@ struct AudioInterfacePort : audio::Port {


template <int NUM_AUDIO_INPUTS, int NUM_AUDIO_OUTPUTS>
struct AudioInterface : Module {
struct Audio : Module {
static constexpr int NUM_INPUT_LIGHTS = (NUM_AUDIO_INPUTS > 2) ? (NUM_AUDIO_INPUTS / 2) : 0;
static constexpr int NUM_OUTPUT_LIGHTS = (NUM_AUDIO_OUTPUTS > 2) ? (NUM_AUDIO_OUTPUTS / 2) : 0;

@@ -195,7 +195,7 @@ struct AudioInterface : Module {
NUM_LIGHTS
};

AudioInterfacePort<NUM_AUDIO_INPUTS, NUM_AUDIO_OUTPUTS> port;
AudioPort<NUM_AUDIO_INPUTS, NUM_AUDIO_OUTPUTS> port;

dsp::RCFilter dcFilters[NUM_AUDIO_INPUTS];
bool dcFilterEnabled = false;
@@ -206,7 +206,7 @@ struct AudioInterface : Module {
float outputClipTimers[(NUM_AUDIO_INPUTS > 0) ? NUM_OUTPUT_LIGHTS : 0] = {};
dsp::VuMeter2 vuMeter[(NUM_AUDIO_INPUTS == 2) ? 2 : 0];

AudioInterface() : port(this) {
Audio() : port(this) {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
if (NUM_AUDIO_INPUTS == 2)
configParam(LEVEL_PARAM, 0.f, 2.f, 1.f, "Level", " dB", -10, 40);
@@ -229,8 +229,8 @@ struct AudioInterface : Module {
onReset();
}

~AudioInterface() {
// Close stream here before destructing AudioInterfacePort, so processBuffer() etc are not called on another thread while destructing.
~Audio() {
// Close stream here before destructing AudioPort, so processBuffer() etc are not called on another thread while destructing.
port.setDriverId(-1);
}

@@ -399,10 +399,10 @@ struct AudioInterface : Module {


template <int NUM_AUDIO_INPUTS, int NUM_AUDIO_OUTPUTS>
struct AudioInterfaceWidget : ModuleWidget {
typedef AudioInterface<NUM_AUDIO_INPUTS, NUM_AUDIO_OUTPUTS> TAudioInterface;
struct AudioWidget : ModuleWidget {
typedef Audio<NUM_AUDIO_INPUTS, NUM_AUDIO_OUTPUTS> TAudio;

AudioInterfaceWidget(TAudioInterface* module) {
AudioWidget(TAudio* module) {
setModule(module);

if (NUM_AUDIO_INPUTS == 8 && NUM_AUDIO_OUTPUTS == 8) {
@@ -413,35 +413,35 @@ struct AudioInterfaceWidget : ModuleWidget {
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.81, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.359, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.909, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.459, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.81, 74.286)), module, TAudioInterface::AUDIO_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.359, 74.286)), module, TAudioInterface::AUDIO_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.909, 74.286)), module, TAudioInterface::AUDIO_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.459, 74.286)), module, TAudioInterface::AUDIO_INPUTS + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.81, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.359, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.909, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.459, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.81, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.359, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.909, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.459, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 7));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.774, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.774, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.638, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.638, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 3));
AudioWidget* audioWidget = createWidget<AudioWidget>(mm2px(Vec(0.0, 13.039)));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.81, 57.929)), module, TAudio::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.359, 57.929)), module, TAudio::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.909, 57.929)), module, TAudio::AUDIO_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.459, 57.929)), module, TAudio::AUDIO_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.81, 74.286)), module, TAudio::AUDIO_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.359, 74.286)), module, TAudio::AUDIO_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.909, 74.286)), module, TAudio::AUDIO_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.459, 74.286)), module, TAudio::AUDIO_INPUTS + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.81, 96.859)), module, TAudio::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.359, 96.859)), module, TAudio::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.909, 96.859)), module, TAudio::AUDIO_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.459, 96.859)), module, TAudio::AUDIO_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.81, 113.115)), module, TAudio::AUDIO_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.359, 113.115)), module, TAudio::AUDIO_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.909, 113.115)), module, TAudio::AUDIO_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.459, 113.115)), module, TAudio::AUDIO_OUTPUTS + 7));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.774, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.774, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.638, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.54, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.638, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 3));
app::AudioWidget* audioWidget = createWidget<app::AudioWidget>(mm2px(Vec(0.0, 13.039)));
audioWidget->box.size = mm2px(Vec(50.8, 29.021));
audioWidget->setAudioPort(module ? &module->port : NULL);
addChild(audioWidget);
@@ -454,59 +454,59 @@ struct AudioInterfaceWidget : ModuleWidget {
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.815, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.364, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.914, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.464, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.015, 57.929)), module, TAudioInterface::AUDIO_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.565, 57.914)), module, TAudioInterface::AUDIO_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.114, 57.914)), module, TAudioInterface::AUDIO_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.664, 57.914)), module, TAudioInterface::AUDIO_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.815, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.364, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.914, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.464, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.015, 74.291)), module, TAudioInterface::AUDIO_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.565, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.114, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.664, 74.276)), module, TAudioInterface::AUDIO_INPUTS + 15));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.815, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.364, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.914, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.464, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.015, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.565, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.114, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.664, 96.859)), module, TAudioInterface::AUDIO_OUTPUTS + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.815, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 8));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.364, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 9));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.914, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 10));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.464, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 11));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.565, 112.962)), module, TAudioInterface::AUDIO_OUTPUTS + 12));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.015, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 13));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.664, 112.962)), module, TAudioInterface::AUDIO_OUTPUTS + 14));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.114, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 15));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.779, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.98, 52.168)), module, TAudioInterface::INPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 4));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.779, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 5));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 6));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.98, 68.53)), module, TAudioInterface::INPUT_LIGHTS + 2 * 7));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.644, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.844, 90.791)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 4));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.644, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 5));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 6));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.844, 107.097)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 7));
AudioWidget* audioWidget = createWidget<AudioWidget>(mm2px(Vec(0.0, 13.039)));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.815, 57.929)), module, TAudio::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.364, 57.929)), module, TAudio::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.914, 57.929)), module, TAudio::AUDIO_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.464, 57.929)), module, TAudio::AUDIO_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.015, 57.929)), module, TAudio::AUDIO_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.565, 57.914)), module, TAudio::AUDIO_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.114, 57.914)), module, TAudio::AUDIO_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.664, 57.914)), module, TAudio::AUDIO_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.815, 74.276)), module, TAudio::AUDIO_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.364, 74.276)), module, TAudio::AUDIO_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.914, 74.276)), module, TAudio::AUDIO_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.464, 74.276)), module, TAudio::AUDIO_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.015, 74.291)), module, TAudio::AUDIO_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.565, 74.276)), module, TAudio::AUDIO_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.114, 74.276)), module, TAudio::AUDIO_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.664, 74.276)), module, TAudio::AUDIO_INPUTS + 15));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.815, 96.859)), module, TAudio::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.364, 96.859)), module, TAudio::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.914, 96.859)), module, TAudio::AUDIO_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.464, 96.859)), module, TAudio::AUDIO_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.015, 96.859)), module, TAudio::AUDIO_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.565, 96.859)), module, TAudio::AUDIO_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.114, 96.859)), module, TAudio::AUDIO_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.664, 96.859)), module, TAudio::AUDIO_OUTPUTS + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.815, 113.115)), module, TAudio::AUDIO_OUTPUTS + 8));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.364, 113.115)), module, TAudio::AUDIO_OUTPUTS + 9));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.914, 113.115)), module, TAudio::AUDIO_OUTPUTS + 10));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.464, 113.115)), module, TAudio::AUDIO_OUTPUTS + 11));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.565, 112.962)), module, TAudio::AUDIO_OUTPUTS + 12));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.015, 113.115)), module, TAudio::AUDIO_OUTPUTS + 13));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.664, 112.962)), module, TAudio::AUDIO_OUTPUTS + 14));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.114, 113.115)), module, TAudio::AUDIO_OUTPUTS + 15));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.779, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.98, 52.168)), module, TAudio::INPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 4));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.779, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 5));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 6));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.98, 68.53)), module, TAudio::INPUT_LIGHTS + 2 * 7));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 0));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.644, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 1));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.844, 90.791)), module, TAudio::OUTPUT_LIGHTS + 2 * 3));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.545, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 4));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.644, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 5));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.745, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 6));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(82.844, 107.097)), module, TAudio::OUTPUT_LIGHTS + 2 * 7));
app::AudioWidget* audioWidget = createWidget<app::AudioWidget>(mm2px(Vec(0.0, 13.039)));
audioWidget->box.size = mm2px(Vec(96.52, 29.021));
audioWidget->setAudioPort(module ? &module->port : NULL);
addChild(audioWidget);
@@ -519,15 +519,15 @@ struct AudioInterfaceWidget : ModuleWidget {
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addParam(createParamCentered<RoundLargeBlackKnob>(mm2px(Vec(12.869, 77.362)), module, TAudioInterface::LEVEL_PARAM));
addParam(createParamCentered<RoundLargeBlackKnob>(mm2px(Vec(12.869, 77.362)), module, TAudio::LEVEL_PARAM));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.285, 96.859)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(18.122, 96.859)), module, TAudioInterface::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.285, 96.859)), module, TAudio::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(18.122, 96.859)), module, TAudio::AUDIO_INPUTS + 1));

addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.285, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(18.122, 113.115)), module, TAudioInterface::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.285, 113.115)), module, TAudio::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(18.122, 113.115)), module, TAudio::AUDIO_OUTPUTS + 1));

AudioDeviceWidget* audioWidget = createWidget<AudioDeviceWidget>(mm2px(Vec(0.0, 13.039)));
app::AudioDeviceWidget* audioWidget = createWidget<app::AudioDeviceWidget>(mm2px(Vec(0.0, 13.039)));
audioWidget->box.size = mm2px(Vec(25.4, 47.726));
audioWidget->setAudioPort(module ? &module->port : NULL);
// Adjust deviceChoice position
@@ -546,7 +546,7 @@ struct AudioInterfaceWidget : ModuleWidget {
}

void appendContextMenu(Menu* menu) override {
TAudioInterface* module = dynamic_cast<TAudioInterface*>(this->module);
TAudio* module = dynamic_cast<TAudio*>(this->module);

menu->addChild(new MenuSeparator);

@@ -560,10 +560,9 @@ struct AudioInterfaceWidget : ModuleWidget {
};


Model* modelAudioInterface2 = createModel<AudioInterface<2, 2>, AudioInterfaceWidget<2, 2>>("AudioInterface2");
// Legacy name for Audio-8
Model* modelAudioInterface = createModel<AudioInterface<8, 8>, AudioInterfaceWidget<8, 8>>("AudioInterface");
Model* modelAudioInterface16 = createModel<AudioInterface<16, 16>, AudioInterfaceWidget<16, 16>>("AudioInterface16");
Model* modelAudio2 = createModel<Audio<2, 2>, AudioWidget<2, 2>>("AudioInterface2");
Model* modelAudio8 = createModel<Audio<8, 8>, AudioWidget<8, 8>>("AudioInterface");
Model* modelAudio16 = createModel<Audio<16, 16>, AudioWidget<16, 16>>("AudioInterface16");


} // namespace core

+ 1
- 1
src/core/CV_MIDI.cpp View File

@@ -149,7 +149,7 @@ struct CV_MIDIPanicItem : MenuItem {
struct CV_MIDIWidget : ModuleWidget {
CV_MIDIWidget(CV_MIDI* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/CV-MIDI.svg")));
setPanel(Svg::load(asset::system("res/Core/CV_MIDI.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));


src/core/CV_CC.cpp → src/core/CV_MIDICC.cpp View File

@@ -39,7 +39,7 @@ struct CCMidiOutput : midi::Output {
};


struct CV_CC : Module {
struct CV_MIDICC : Module {
enum ParamIds {
NUM_PARAMS
};
@@ -59,7 +59,7 @@ struct CV_CC : Module {
int learningId = -1;
int learnedCcs[16] = {};

CV_CC() {
CV_MIDICC() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
for (int i = 0; i < 16; i++)
configInput(CC_INPUTS + i, string::f("Cell %d", i + 1));
@@ -122,36 +122,36 @@ struct CV_CC : Module {
};


struct CV_CCWidget : ModuleWidget {
CV_CCWidget(CV_CC* module) {
struct CV_MIDICCWidget : ModuleWidget {
CV_MIDICCWidget(CV_MIDICC* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/CV-CC.svg")));
setPanel(Svg::load(asset::system("res/Core/CV_MIDICC.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 77)), module, CV_CC::CC_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 77)), module, CV_CC::CC_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 77)), module, CV_CC::CC_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 77)), module, CV_CC::CC_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 89)), module, CV_CC::CC_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 89)), module, CV_CC::CC_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 89)), module, CV_CC::CC_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 89)), module, CV_CC::CC_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 101)), module, CV_CC::CC_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 101)), module, CV_CC::CC_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 101)), module, CV_CC::CC_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 101)), module, CV_CC::CC_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 112)), module, CV_CC::CC_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 112)), module, CV_CC::CC_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 112)), module, CV_CC::CC_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 112)), module, CV_CC::CC_INPUTS + 15));
typedef Grid16MidiWidget<CcChoice<CV_CC>> TMidiWidget;
TMidiWidget* midiWidget = createWidget<TMidiWidget>(mm2px(Vec(3.399621, 14.837339)));
midiWidget->box.size = mm2px(Vec(44, 54.667));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8.189, 78.431)), module, CV_MIDICC::CC_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.739, 78.431)), module, CV_MIDICC::CC_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31.289, 78.431)), module, CV_MIDICC::CC_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.838, 78.431)), module, CV_MIDICC::CC_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8.189, 89.946)), module, CV_MIDICC::CC_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.739, 89.946)), module, CV_MIDICC::CC_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31.289, 89.946)), module, CV_MIDICC::CC_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.838, 89.946)), module, CV_MIDICC::CC_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8.189, 101.466)), module, CV_MIDICC::CC_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.739, 101.466)), module, CV_MIDICC::CC_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31.289, 101.466)), module, CV_MIDICC::CC_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.838, 101.466)), module, CV_MIDICC::CC_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8.189, 112.998)), module, CV_MIDICC::CC_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.739, 112.984)), module, CV_MIDICC::CC_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31.289, 112.984)), module, CV_MIDICC::CC_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.838, 112.984)), module, CV_MIDICC::CC_INPUTS + 15));
typedef Grid16MidiWidget<CcChoice<CV_MIDICC>> TMidiWidget;
TMidiWidget* midiWidget = createWidget<TMidiWidget>(mm2px(Vec(0.0, 13.039)));
midiWidget->box.size = mm2px(Vec(50.8, 55.88));
midiWidget->setMidiPort(module ? &module->midiOutput : NULL);
midiWidget->setModule(module);
addChild(midiWidget);
@@ -159,7 +159,7 @@ struct CV_CCWidget : ModuleWidget {
};


Model* modelCV_CC = createModel<CV_CC, CV_CCWidget>("CV-CC");
Model* modelCV_MIDICC = createModel<CV_MIDICC, CV_MIDICCWidget>("CV-CC");


} // namespace core

src/core/CV_Gate.cpp → src/core/Gate_MIDI.cpp View File

@@ -68,7 +68,7 @@ struct GateMidiOutput : midi::Output {
};


struct CV_Gate : Module {
struct Gate_MIDI : Module {
enum ParamIds {
NUM_PARAMS
};
@@ -88,7 +88,7 @@ struct CV_Gate : Module {
int learningId = -1;
uint8_t learnedNotes[16] = {};

CV_Gate() {
Gate_MIDI() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
for (int i = 0; i < 16; i++)
configInput(GATE_INPUTS + i, string::f("Cell %d", i + 1));
@@ -162,43 +162,43 @@ struct CV_Gate : Module {
};


struct CV_GateWidget : ModuleWidget {
CV_GateWidget(CV_Gate* module) {
struct Gate_MIDIWidget : ModuleWidget {
Gate_MIDIWidget(Gate_MIDI* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/CV-Gate.svg")));
setPanel(Svg::load(asset::system("res/Core/Gate_MIDI.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 77)), module, CV_Gate::GATE_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 77)), module, CV_Gate::GATE_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 77)), module, CV_Gate::GATE_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 77)), module, CV_Gate::GATE_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 89)), module, CV_Gate::GATE_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 89)), module, CV_Gate::GATE_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 89)), module, CV_Gate::GATE_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 89)), module, CV_Gate::GATE_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 101)), module, CV_Gate::GATE_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 101)), module, CV_Gate::GATE_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 101)), module, CV_Gate::GATE_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 101)), module, CV_Gate::GATE_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(8, 112)), module, CV_Gate::GATE_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20, 112)), module, CV_Gate::GATE_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(31, 112)), module, CV_Gate::GATE_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43, 112)), module, CV_Gate::GATE_INPUTS + 15));
typedef Grid16MidiWidget<NoteChoice<CV_Gate>> TMidiWidget;
TMidiWidget* midiWidget = createWidget<TMidiWidget>(mm2px(Vec(3.399621, 14.837339)));
midiWidget->box.size = mm2px(Vec(44, 54.667));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9.137, 78.431)), module, Gate_MIDI::GATE_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20.686, 78.431)), module, Gate_MIDI::GATE_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32.236, 78.431)), module, Gate_MIDI::GATE_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43.786, 78.431)), module, Gate_MIDI::GATE_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9.137, 89.946)), module, Gate_MIDI::GATE_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20.686, 89.946)), module, Gate_MIDI::GATE_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32.236, 89.946)), module, Gate_MIDI::GATE_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43.786, 89.946)), module, Gate_MIDI::GATE_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9.137, 101.466)), module, Gate_MIDI::GATE_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20.686, 101.466)), module, Gate_MIDI::GATE_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32.236, 101.466)), module, Gate_MIDI::GATE_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43.786, 101.466)), module, Gate_MIDI::GATE_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(9.137, 112.998)), module, Gate_MIDI::GATE_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(20.686, 112.984)), module, Gate_MIDI::GATE_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(32.236, 112.984)), module, Gate_MIDI::GATE_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(43.786, 112.984)), module, Gate_MIDI::GATE_INPUTS + 15));
typedef Grid16MidiWidget<NoteChoice<Gate_MIDI>> TMidiWidget;
TMidiWidget* midiWidget = createWidget<TMidiWidget>(mm2px(Vec(0.0, 13.039)));
midiWidget->box.size = mm2px(Vec(50.8, 55.88));
midiWidget->setMidiPort(module ? &module->midiOutput : NULL);
midiWidget->setModule(module);
addChild(midiWidget);
}

void appendContextMenu(Menu* menu) override {
CV_Gate* module = dynamic_cast<CV_Gate*>(this->module);
Gate_MIDI* module = dynamic_cast<Gate_MIDI*>(this->module);

menu->addChild(new MenuSeparator);

@@ -211,7 +211,7 @@ struct CV_GateWidget : ModuleWidget {
};


Model* modelCV_Gate = createModel<CV_Gate, CV_GateWidget>("CV-Gate");
Model* modelGate_MIDI = createModel<Gate_MIDI, Gate_MIDIWidget>("CV-Gate");


} // namespace core

src/core/MIDI_CC.cpp → src/core/MIDICC_CV.cpp View File

@@ -5,7 +5,7 @@ namespace rack {
namespace core {


struct MIDI_CC : Module {
struct MIDICC_CV : Module {
enum ParamIds {
NUM_PARAMS
};
@@ -36,7 +36,7 @@ struct MIDI_CC : Module {
bool mpeMode;
bool lsbMode;

MIDI_CC() {
MIDICC_CV() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
for (int i = 0; i < 16; i++)
configOutput(CC_OUTPUT + i, string::f("Cell %d", i + 1));
@@ -211,34 +211,34 @@ struct MIDI_CC : Module {
};


struct MIDI_CCWidget : ModuleWidget {
MIDI_CCWidget(MIDI_CC* module) {
struct MIDICC_CVWidget : ModuleWidget {
MIDICC_CVWidget(MIDICC_CV* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/MIDI CC-CV.svg")));
setPanel(Svg::load(asset::system("res/Core/MIDICC_CV.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 78.431)), module, MIDI_CC::CC_OUTPUT + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 78.431)), module, MIDI_CC::CC_OUTPUT + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 78.431)), module, MIDI_CC::CC_OUTPUT + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 78.431)), module, MIDI_CC::CC_OUTPUT + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 89.946)), module, MIDI_CC::CC_OUTPUT + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 89.946)), module, MIDI_CC::CC_OUTPUT + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 89.946)), module, MIDI_CC::CC_OUTPUT + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 89.946)), module, MIDI_CC::CC_OUTPUT + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 101.466)), module, MIDI_CC::CC_OUTPUT + 8));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 101.466)), module, MIDI_CC::CC_OUTPUT + 9));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 101.466)), module, MIDI_CC::CC_OUTPUT + 10));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 101.466)), module, MIDI_CC::CC_OUTPUT + 11));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.19, 112.998)), module, MIDI_CC::CC_OUTPUT + 12));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 112.984)), module, MIDI_CC::CC_OUTPUT + 13));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 112.984)), module, MIDI_CC::CC_OUTPUT + 14));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.839, 112.984)), module, MIDI_CC::CC_OUTPUT + 15));
typedef Grid16MidiWidget<CcChoice<MIDI_CC>> TMidiWidget;
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 78.431)), module, MIDICC_CV::CC_OUTPUT + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 78.431)), module, MIDICC_CV::CC_OUTPUT + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 78.431)), module, MIDICC_CV::CC_OUTPUT + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 78.431)), module, MIDICC_CV::CC_OUTPUT + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 89.946)), module, MIDICC_CV::CC_OUTPUT + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 89.946)), module, MIDICC_CV::CC_OUTPUT + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 89.946)), module, MIDICC_CV::CC_OUTPUT + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 89.946)), module, MIDICC_CV::CC_OUTPUT + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.189, 101.466)), module, MIDICC_CV::CC_OUTPUT + 8));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 101.466)), module, MIDICC_CV::CC_OUTPUT + 9));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 101.466)), module, MIDICC_CV::CC_OUTPUT + 10));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.838, 101.466)), module, MIDICC_CV::CC_OUTPUT + 11));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(8.19, 112.998)), module, MIDICC_CV::CC_OUTPUT + 12));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.739, 112.984)), module, MIDICC_CV::CC_OUTPUT + 13));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(31.289, 112.984)), module, MIDICC_CV::CC_OUTPUT + 14));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.839, 112.984)), module, MIDICC_CV::CC_OUTPUT + 15));
typedef Grid16MidiWidget<CcChoice<MIDICC_CV>> TMidiWidget;
TMidiWidget* midiWidget = createWidget<TMidiWidget>(mm2px(Vec(0.0, 13.039)));
midiWidget->box.size = mm2px(Vec(50.8, 55.88));
midiWidget->setMidiPort(module ? &module->midiInput : NULL);
@@ -247,7 +247,7 @@ struct MIDI_CCWidget : ModuleWidget {
}

void appendContextMenu(Menu* menu) override {
MIDI_CC* module = dynamic_cast<MIDI_CC*>(this->module);
MIDICC_CV* module = dynamic_cast<MIDICC_CV*>(this->module);

menu->addChild(new MenuSeparator);

@@ -261,7 +261,7 @@ struct MIDI_CCWidget : ModuleWidget {


// Use legacy slug for compatibility
Model* modelMIDI_CC = createModel<MIDI_CC, MIDI_CCWidget>("MIDICCToCVInterface");
Model* modelMIDICC_CV = createModel<MIDICC_CV, MIDICC_CVWidget>("MIDICCToCVInterface");


} // namespace core

src/core/MIDI_Map.cpp → src/core/MIDIMap.cpp View File

@@ -8,7 +8,7 @@ namespace core {
static const int MAX_CHANNELS = 128;


struct MIDI_Map : Module {
struct MIDIMap : Module {
enum ParamIds {
NUM_PARAMS
};
@@ -46,7 +46,7 @@ struct MIDI_Map : Module {
bool filterInitialized[MAX_CHANNELS] = {};
dsp::ClockDivider divider;

MIDI_Map() {
MIDIMap() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
for (int id = 0; id < MAX_CHANNELS; id++) {
paramHandles[id].color = nvgRGB(0xff, 0xff, 0x40);
@@ -59,7 +59,7 @@ struct MIDI_Map : Module {
onReset();
}

~MIDI_Map() {
~MIDIMap() {
for (int id = 0; id < MAX_CHANNELS; id++) {
APP->engine->removeParamHandle(&paramHandles[id]);
}
@@ -288,12 +288,12 @@ struct MIDI_Map : Module {
};


struct MIDI_MapChoice : LedDisplayChoice {
MIDI_Map* module;
struct MIDIMapChoice : LedDisplayChoice {
MIDIMap* module;
int id;
int disableLearnFrames = -1;

void setModule(MIDI_Map* module) {
void setModule(MIDIMap* module) {
this->module = module;
}

@@ -416,13 +416,13 @@ struct MIDI_MapChoice : LedDisplayChoice {
};


struct MIDI_MapDisplay : MidiWidget {
MIDI_Map* module;
struct MIDIMapDisplay : MidiWidget {
MIDIMap* module;
ScrollWidget* scroll;
MIDI_MapChoice* choices[MAX_CHANNELS];
MIDIMapChoice* choices[MAX_CHANNELS];
LedDisplaySeparator* separators[MAX_CHANNELS];

void setModule(MIDI_Map* module) {
void setModule(MIDIMap* module) {
this->module = module;

scroll = new ScrollWidget;
@@ -445,7 +445,7 @@ struct MIDI_MapDisplay : MidiWidget {
separators[id] = separator;
}

MIDI_MapChoice* choice = createWidget<MIDI_MapChoice>(pos);
MIDIMapChoice* choice = createWidget<MIDIMapChoice>(pos);
choice->box.size.x = box.size.x;
choice->id = id;
choice->setModule(module);
@@ -470,25 +470,25 @@ struct MIDI_MapDisplay : MidiWidget {
};


struct MIDI_MapWidget : ModuleWidget {
MIDI_MapWidget(MIDI_Map* module) {
struct MIDIMapWidget : ModuleWidget {
MIDIMapWidget(MIDIMap* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/MIDI-Map.svg")));
setPanel(Svg::load(asset::system("res/Core/MIDIMap.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

MIDI_MapDisplay* midiWidget = createWidget<MIDI_MapDisplay>(mm2px(Vec(3.41891, 14.8373)));
midiWidget->box.size = mm2px(Vec(43.999, 102.664));
MIDIMapDisplay* midiWidget = createWidget<MIDIMapDisplay>(mm2px(Vec(0.0, 12.869)));
midiWidget->box.size = mm2px(Vec(50.8, 105.567));
midiWidget->setMidiPort(module ? &module->midiInput : NULL);
midiWidget->setModule(module);
addChild(midiWidget);
}

void appendContextMenu(Menu* menu) override {
MIDI_Map* module = dynamic_cast<MIDI_Map*>(this->module);
MIDIMap* module = dynamic_cast<MIDIMap*>(this->module);

menu->addChild(new MenuSeparator);

@@ -497,7 +497,7 @@ struct MIDI_MapWidget : ModuleWidget {
};


Model* modelMIDI_Map = createModel<MIDI_Map, MIDI_MapWidget>("MIDI-Map");
Model* modelMIDIMap = createModel<MIDIMap, MIDIMapWidget>("MIDI-Map");


} // namespace core

+ 1
- 1
src/core/MIDI_CV.cpp View File

@@ -470,7 +470,7 @@ struct MIDI_CV : Module {
struct MIDI_CVWidget : ModuleWidget {
MIDI_CVWidget(MIDI_CV* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/MIDI-CV.svg")));
setPanel(Svg::load(asset::system("res/Core/MIDI_CV.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));


+ 1
- 1
src/core/MIDI_Gate.cpp View File

@@ -182,7 +182,7 @@ struct MIDI_Gate : Module {
struct MIDI_GateWidget : ModuleWidget {
MIDI_GateWidget(MIDI_Gate* module) {
setModule(module);
setPanel(Svg::load(asset::system("res/Core/MIDI-Gate.svg")));
setPanel(Svg::load(asset::system("res/Core/MIDI_Gate.svg")));

addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));


+ 7
- 7
src/core/plugin.cpp View File

@@ -6,16 +6,16 @@ namespace core {


void init(rack::Plugin* p) {
p->addModel(modelAudioInterface2);
p->addModel(modelAudioInterface);
p->addModel(modelAudioInterface16);
p->addModel(modelAudio2);
p->addModel(modelAudio8);
p->addModel(modelAudio16);
p->addModel(modelMIDI_CV);
p->addModel(modelMIDI_CC);
p->addModel(modelMIDICC_CV);
p->addModel(modelMIDI_Gate);
p->addModel(modelMIDI_Map);
p->addModel(modelMIDIMap);
p->addModel(modelCV_MIDI);
p->addModel(modelCV_CC);
p->addModel(modelCV_Gate);
p->addModel(modelCV_MIDICC);
p->addModel(modelGate_MIDI);
p->addModel(modelBlank);
p->addModel(modelNotes);
}


+ 7
- 7
src/core/plugin.hpp View File

@@ -5,16 +5,16 @@ namespace rack {
namespace core {


extern Model* modelAudioInterface2;
extern Model* modelAudioInterface;
extern Model* modelAudioInterface16;
extern Model* modelAudio2;
extern Model* modelAudio8;
extern Model* modelAudio16;
extern Model* modelMIDI_CV;
extern Model* modelMIDI_CC;
extern Model* modelMIDICC_CV;
extern Model* modelMIDI_Gate;
extern Model* modelMIDI_Map;
extern Model* modelMIDIMap;
extern Model* modelCV_MIDI;
extern Model* modelCV_CC;
extern Model* modelCV_Gate;
extern Model* modelCV_MIDICC;
extern Model* modelGate_MIDI;
extern Model* modelBlank;
extern Model* modelNotes;



Loading…
Cancel
Save