Browse Source

Rename Core panels. Implement Audio and MIDI-CV redesigns.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
ce7469d102
10 changed files with 125 additions and 136 deletions
  1. +10
    -10
      Core.json
  2. +0
    -0
      res/Core/Audio16.svg
  3. +0
    -0
      res/Core/Audio2.svg
  4. +0
    -0
      res/Core/Audio8.svg
  5. +0
    -0
      res/Core/CV-MIDI CC.svg
  6. +0
    -0
      res/Core/Gate-MIDI.svg
  7. +0
    -0
      res/Core/MIDI CC-CV.svg
  8. +0
    -0
      res/Core/MIDI Map.svg
  9. +100
    -111
      src/core/AudioInterface.cpp
  10. +15
    -15
      src/core/MIDI_CV.cpp

+ 10
- 10
Core.json View File

@@ -16,7 +16,7 @@
"modules": [ "modules": [
{ {
"slug": "AudioInterface2", "slug": "AudioInterface2",
"name": "Audio-2",
"name": "Audio 2",
"description": "Sends audio and CV to/from an audio device", "description": "Sends audio and CV to/from an audio device",
"manualUrl": "https://vcvrack.com/manual/Core#Audio", "manualUrl": "https://vcvrack.com/manual/Core#Audio",
"tags": [ "tags": [
@@ -25,7 +25,7 @@
}, },
{ {
"slug": "AudioInterface", "slug": "AudioInterface",
"name": "Audio-8",
"name": "Audio 8",
"description": "Sends audio and CV to/from an audio device", "description": "Sends audio and CV to/from an audio device",
"manualUrl": "https://vcvrack.com/manual/Core#Audio", "manualUrl": "https://vcvrack.com/manual/Core#Audio",
"tags": [ "tags": [
@@ -34,7 +34,7 @@
}, },
{ {
"slug": "AudioInterface16", "slug": "AudioInterface16",
"name": "Audio-16",
"name": "Audio 16",
"description": "Sends audio and CV to/from an audio device", "description": "Sends audio and CV to/from an audio device",
"manualUrl": "https://vcvrack.com/manual/Core#Audio", "manualUrl": "https://vcvrack.com/manual/Core#Audio",
"tags": [ "tags": [
@@ -43,7 +43,7 @@
}, },
{ {
"slug": "MIDIToCVInterface", "slug": "MIDIToCVInterface",
"name": "MIDI-CV",
"name": "MIDI to CV",
"description": "Converts MIDI from an external device to CV and gates", "description": "Converts MIDI from an external device to CV and gates",
"manualUrl": "https://vcvrack.com/manual/Core#MIDI-CV", "manualUrl": "https://vcvrack.com/manual/Core#MIDI-CV",
"tags": [ "tags": [
@@ -54,7 +54,7 @@
}, },
{ {
"slug": "MIDICCToCVInterface", "slug": "MIDICCToCVInterface",
"name": "MIDI-CC",
"name": "MIDI CC to CV",
"description": "Converts MIDI CC from an external device to CV", "description": "Converts MIDI CC from an external device to CV",
"manualUrl": "https://vcvrack.com/manual/Core#MIDI-CC", "manualUrl": "https://vcvrack.com/manual/Core#MIDI-CC",
"tags": [ "tags": [
@@ -64,7 +64,7 @@
}, },
{ {
"slug": "MIDITriggerToCVInterface", "slug": "MIDITriggerToCVInterface",
"name": "MIDI-Gate",
"name": "MIDI to Gate",
"description": "Converts MIDI notes from an external device to gates", "description": "Converts MIDI notes from an external device to gates",
"manualUrl": "https://vcvrack.com/manual/Core#MIDI-Gate", "manualUrl": "https://vcvrack.com/manual/Core#MIDI-Gate",
"tags": [ "tags": [
@@ -74,7 +74,7 @@
}, },
{ {
"slug": "MIDI-Map", "slug": "MIDI-Map",
"name": "MIDI-Map",
"name": "MIDI Map",
"description": "Controls parameters (knobs, sliders, switches) directly with MIDI CC", "description": "Controls parameters (knobs, sliders, switches) directly with MIDI CC",
"manualUrl": "https://vcvrack.com/manual/Core#MIDI-Map", "manualUrl": "https://vcvrack.com/manual/Core#MIDI-Map",
"tags": [ "tags": [
@@ -84,7 +84,7 @@
}, },
{ {
"slug": "CV-MIDI", "slug": "CV-MIDI",
"name": "CV-MIDI",
"name": "CV to MIDI",
"description": "Converts CV to MIDI and sends to an external device", "description": "Converts CV to MIDI and sends to an external device",
"manualUrl": "https://vcvrack.com/manual/Core#CV-MIDI", "manualUrl": "https://vcvrack.com/manual/Core#CV-MIDI",
"tags": [ "tags": [
@@ -95,7 +95,7 @@
}, },
{ {
"slug": "CV-CC", "slug": "CV-CC",
"name": "CV-CC",
"name": "CV to MIDI CC",
"description": "Converts CV to MIDI CC and sends to an external device", "description": "Converts CV to MIDI CC and sends to an external device",
"manualUrl": "https://vcvrack.com/manual/Core#CV-CC", "manualUrl": "https://vcvrack.com/manual/Core#CV-CC",
"tags": [ "tags": [
@@ -105,7 +105,7 @@
}, },
{ {
"slug": "CV-Gate", "slug": "CV-Gate",
"name": "CV-Gate",
"name": "Gate to MIDI",
"description": "Converts gates to MIDI notes and sends to an external device", "description": "Converts gates to MIDI notes and sends to an external device",
"manualUrl": "https://vcvrack.com/manual/Core#CV-Gate", "manualUrl": "https://vcvrack.com/manual/Core#CV-Gate",
"tags": [ "tags": [


res/Core/AudioInterface16.svg → res/Core/Audio16.svg View File


res/Core/AudioInterface2.svg → res/Core/Audio2.svg View File


res/Core/AudioInterface.svg → res/Core/Audio8.svg View File


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


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


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


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


+ 100
- 111
src/core/AudioInterface.cpp View File

@@ -177,7 +177,7 @@ struct AudioInterface : Module {
static constexpr int NUM_OUTPUT_LIGHTS = (NUM_AUDIO_OUTPUTS > 2) ? (NUM_AUDIO_OUTPUTS / 2) : 0; static constexpr int NUM_OUTPUT_LIGHTS = (NUM_AUDIO_OUTPUTS > 2) ? (NUM_AUDIO_OUTPUTS / 2) : 0;


enum ParamIds { enum ParamIds {
ENUMS(GAIN_PARAM, NUM_AUDIO_INPUTS == 2),
ENUMS(LEVEL_PARAM, NUM_AUDIO_INPUTS == 2),
NUM_PARAMS NUM_PARAMS
}; };
enum InputIds { enum InputIds {
@@ -209,7 +209,7 @@ struct AudioInterface : Module {
AudioInterface() : port(this) { AudioInterface() : port(this) {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
if (NUM_AUDIO_INPUTS == 2) if (NUM_AUDIO_INPUTS == 2)
configParam(GAIN_PARAM, 0.f, 2.f, 1.f, "Level", " dB", -10, 40);
configParam(LEVEL_PARAM, 0.f, 2.f, 1.f, "Level", " dB", -10, 40);
for (int i = 0; i < NUM_AUDIO_INPUTS; i++) for (int i = 0; i < NUM_AUDIO_INPUTS; i++)
configInput(AUDIO_INPUTS + i, string::f("To \"device output %d\"", i + 1)); configInput(AUDIO_INPUTS + i, string::f("To \"device output %d\"", i + 1));
for (int i = 0; i < NUM_AUDIO_OUTPUTS; i++) for (int i = 0; i < NUM_AUDIO_OUTPUTS; i++)
@@ -283,7 +283,7 @@ struct AudioInterface : Module {


// Audio-2: Apply gain from knob // Audio-2: Apply gain from knob
if (NUM_AUDIO_INPUTS == 2) { if (NUM_AUDIO_INPUTS == 2) {
float gain = std::pow(params[GAIN_PARAM].getValue(), 2.f);
float gain = std::pow(params[LEVEL_PARAM].getValue(), 2.f);
for (int i = 0; i < NUM_AUDIO_INPUTS; i++) { for (int i = 0; i < NUM_AUDIO_INPUTS; i++) {
inputFrame.samples[i] *= gain; inputFrame.samples[i] *= gain;
} }
@@ -406,140 +406,129 @@ struct AudioInterfaceWidget : ModuleWidget {
setModule(module); setModule(module);


if (NUM_AUDIO_INPUTS == 8 && NUM_AUDIO_OUTPUTS == 8) { if (NUM_AUDIO_INPUTS == 8 && NUM_AUDIO_OUTPUTS == 8) {
setPanel(Svg::load(asset::system("res/Core/AudioInterface.svg")));
setPanel(Svg::load(asset::system("res/Core/Audio8.svg")));


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


addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069211, 55.530807)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 55.530807)), module, TAudioInterface::AUDIO_INPUTS + 1));
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 55.530807)), module, TAudioInterface::AUDIO_INPUTS + 2));
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 55.530807)), module, TAudioInterface::AUDIO_INPUTS + 3));
addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069209, 70.144905)), module, TAudioInterface::AUDIO_INPUTS + 4));
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 70.144905)), module, TAudioInterface::AUDIO_INPUTS + 5));
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 70.144905)), module, TAudioInterface::AUDIO_INPUTS + 6));
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 70.144905)), module, TAudioInterface::AUDIO_INPUTS + 7));

addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 92.143906)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 92.143906)), module, TAudioInterface::AUDIO_OUTPUTS + 1));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 92.143906)), module, TAudioInterface::AUDIO_OUTPUTS + 2));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506519, 92.143906)), module, TAudioInterface::AUDIO_OUTPUTS + 3));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 108.1443)), module, TAudioInterface::AUDIO_OUTPUTS + 4));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 108.1443)), module, TAudioInterface::AUDIO_OUTPUTS + 5));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 108.1443)), module, TAudioInterface::AUDIO_OUTPUTS + 6));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506523, 108.1443)), module, TAudioInterface::AUDIO_OUTPUTS + 7));

addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(12.524985, 54.577202)), module, TAudioInterface::INPUT_LIGHTS + 0 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(35.725647, 54.577202)), module, TAudioInterface::INPUT_LIGHTS + 1 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(12.524985, 69.158226)), module, TAudioInterface::INPUT_LIGHTS + 2 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(35.725647, 69.158226)), module, TAudioInterface::INPUT_LIGHTS + 3 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(12.524985, 91.147583)), module, TAudioInterface::OUTPUT_LIGHTS + 0 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(35.725647, 91.147583)), module, TAudioInterface::OUTPUT_LIGHTS + 1 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(12.524985, 107.17003)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 2));
addChild(createLight<SmallLight<GreenRedLight>>(mm2px(Vec(35.725647, 107.17003)), module, TAudioInterface::OUTPUT_LIGHTS + 3 * 2));

AudioWidget* audioWidget = createWidget<AudioWidget>(mm2px(Vec(3.2122073, 14.837339)));
audioWidget->box.size = mm2px(Vec(44, 28));
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)));
audioWidget->box.size = mm2px(Vec(50.8, 29.021));
audioWidget->setAudioPort(module ? &module->port : NULL); audioWidget->setAudioPort(module ? &module->port : NULL);
addChild(audioWidget); addChild(audioWidget);
} }
else if (NUM_AUDIO_INPUTS == 16 && NUM_AUDIO_OUTPUTS == 16) { else if (NUM_AUDIO_INPUTS == 16 && NUM_AUDIO_OUTPUTS == 16) {
setPanel(Svg::load(asset::system("res/Core/AudioInterface16.svg")));
setPanel(Svg::load(asset::system("res/Core/Audio16.svg")));


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


addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.661, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.26, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 1));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.86, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 2));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.461, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 3));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.06, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 4));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.661, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 5));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.26, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 6));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.86, 59.638)), module, TAudioInterface::AUDIO_INPUTS + 7));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.661, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 8));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.26, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 9));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.86, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 10));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.461, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 11));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.06, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 12));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.661, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 13));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.26, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 14));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.86, 74.251)), module, TAudioInterface::AUDIO_INPUTS + 15));

addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.661, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.26, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.86, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.461, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.06, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.661, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.26, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.86, 96.251)), module, TAudioInterface::AUDIO_OUTPUTS + 7));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.661, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 8));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.26, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 9));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.86, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 10));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.461, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 11));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.06, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 12));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.661, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 13));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.26, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 14));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.86, 112.252)), module, TAudioInterface::AUDIO_OUTPUTS + 15));

addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.46, 55.667)), module, TAudioInterface::INPUT_LIGHTS + 0 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.661, 55.667)), module, TAudioInterface::INPUT_LIGHTS + 1 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.861, 55.667)), module, TAudioInterface::INPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(83.061, 55.667)), module, TAudioInterface::INPUT_LIGHTS + 3 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.46, 70.248)), module, TAudioInterface::INPUT_LIGHTS + 4 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.661, 70.248)), module, TAudioInterface::INPUT_LIGHTS + 5 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.861, 70.248)), module, TAudioInterface::INPUT_LIGHTS + 6 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(83.061, 70.248)), module, TAudioInterface::INPUT_LIGHTS + 7 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.46, 92.238)), module, TAudioInterface::OUTPUT_LIGHTS + 0 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.661, 92.238)), module, TAudioInterface::OUTPUT_LIGHTS + 1 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.861, 92.238)), module, TAudioInterface::OUTPUT_LIGHTS + 2 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(83.061, 92.238)), module, TAudioInterface::OUTPUT_LIGHTS + 3 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(13.46, 108.259)), module, TAudioInterface::OUTPUT_LIGHTS + 4 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(36.661, 108.259)), module, TAudioInterface::OUTPUT_LIGHTS + 5 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(59.861, 108.259)), module, TAudioInterface::OUTPUT_LIGHTS + 6 * 2));
addChild(createLightCentered<SmallLight<GreenRedLight>>(mm2px(Vec(83.061, 108.259)), module, TAudioInterface::OUTPUT_LIGHTS + 7 * 2));

AudioWidget* audioWidget = createWidget<AudioWidget>(mm2px(Vec(2.57, 14.839)));
audioWidget->box.size = mm2px(Vec(91.382, 28.0));
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)));
audioWidget->box.size = mm2px(Vec(96.52, 29.021));
audioWidget->setAudioPort(module ? &module->port : NULL); audioWidget->setAudioPort(module ? &module->port : NULL);
addChild(audioWidget); addChild(audioWidget);
} }
else if (NUM_AUDIO_INPUTS == 2 && NUM_AUDIO_OUTPUTS == 2) { else if (NUM_AUDIO_INPUTS == 2 && NUM_AUDIO_OUTPUTS == 2) {
setPanel(Svg::load(asset::system("res/Core/AudioInterface2.svg")));
setPanel(Svg::load(asset::system("res/Core/Audio2.svg")));


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


addParam(createParamCentered<RoundBigBlackKnob>(mm2px(Vec(12.7, 74.019)), module, TAudioInterface::GAIN_PARAM));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(6.697, 94.253)), module, TAudioInterface::AUDIO_INPUTS + 0));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(18.703, 94.253)), module, TAudioInterface::AUDIO_INPUTS + 1));

addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(6.699, 112.254)), module, TAudioInterface::AUDIO_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(18.7, 112.254)), module, TAudioInterface::AUDIO_OUTPUTS + 1));

addChild(createLightCentered<MediumLight<RedLight>>(mm2px(Vec(6.7, 29.759)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 0));
addChild(createLightCentered<MediumLight<RedLight>>(mm2px(Vec(18.7, 29.759)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 0));
addChild(createLightCentered<MediumLight<YellowLight>>(mm2px(Vec(6.7, 34.753)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 1));
addChild(createLightCentered<MediumLight<YellowLight>>(mm2px(Vec(18.7, 34.753)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 1));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(6.7, 39.749)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 2));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(18.7, 39.749)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 2));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(6.7, 44.744)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 3));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(18.7, 44.744)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 3));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(6.7, 49.744)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 4));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(18.7, 49.744)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 4));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(6.7, 54.745)), module, TAudioInterface::VU_LIGHTS + 0 * 6 + 5));
addChild(createLightCentered<MediumLight<GreenLight>>(mm2px(Vec(18.7, 54.745)), module, TAudioInterface::VU_LIGHTS + 1 * 6 + 5));

AudioDeviceWidget* audioWidget = createWidget<AudioDeviceWidget>(mm2px(Vec(2.135, 14.259)));
audioWidget->box.size = mm2px(Vec(21.128, 6.725));
addParam(createParamCentered<RoundLargeBlackKnob>(mm2px(Vec(12.869, 77.362)), module, TAudioInterface::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));

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));

AudioDeviceWidget* audioWidget = createWidget<AudioDeviceWidget>(mm2px(Vec(0.0, 13.039)));
audioWidget->box.size = mm2px(Vec(25.4, 47.726));
audioWidget->setAudioPort(module ? &module->port : NULL); audioWidget->setAudioPort(module ? &module->port : NULL);
// Adjust deviceChoice position // Adjust deviceChoice position
audioWidget->deviceChoice->textOffset = Vec(6, 14); audioWidget->deviceChoice->textOffset = Vec(6, 14);


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

@@ -477,21 +477,21 @@ struct MIDI_CVWidget : ModuleWidget {
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); 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))); addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));


addOutput(createOutput<PJ301MPort>(mm2px(Vec(4.61505, 60.1445)), module, MIDI_CV::PITCH_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(16.214, 60.1445)), module, MIDI_CV::GATE_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(27.8143, 60.1445)), module, MIDI_CV::VELOCITY_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(4.61505, 76.1449)), module, MIDI_CV::AFTERTOUCH_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(16.214, 76.1449)), module, MIDI_CV::PW_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(27.8143, 76.1449)), module, MIDI_CV::MOD_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(4.61505, 92.1439)), module, MIDI_CV::CLOCK_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(16.214, 92.1439)), module, MIDI_CV::CLOCK_DIV_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(27.8143, 92.1439)), module, MIDI_CV::RETRIGGER_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(4.61505, 108.144)), module, MIDI_CV::START_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(16.214, 108.144)), module, MIDI_CV::STOP_OUTPUT));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(27.8143, 108.144)), module, MIDI_CV::CONTINUE_OUTPUT));
MidiWidget* midiWidget = createWidget<MidiWidget>(mm2px(Vec(3.41891, 14.8373)));
midiWidget->box.size = mm2px(Vec(33.840, 28));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.905, 64.347)), module, MIDI_CV::PITCH_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(20.248, 64.347)), module, MIDI_CV::GATE_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(32.591, 64.347)), module, MIDI_CV::VELOCITY_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.905, 80.603)), module, MIDI_CV::AFTERTOUCH_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(20.248, 80.603)), module, MIDI_CV::PW_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(32.591, 80.603)), module, MIDI_CV::MOD_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.905, 96.859)), module, MIDI_CV::CLOCK_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(20.248, 96.707)), module, MIDI_CV::CLOCK_DIV_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(32.591, 96.859)), module, MIDI_CV::RETRIGGER_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.905, 113.115)), module, MIDI_CV::START_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(32.591, 112.975)), module, MIDI_CV::STOP_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(20.248, 113.115)), module, MIDI_CV::CONTINUE_OUTPUT));
MidiWidget* midiWidget = createWidget<MidiWidget>(mm2px(Vec(0.0, 13.048)));
midiWidget->box.size = mm2px(Vec(40.64, 29.012));
midiWidget->setMidiPort(module ? &module->midiInput : NULL); midiWidget->setMidiPort(module ? &module->midiInput : NULL);
addChild(midiWidget); addChild(midiWidget);




Loading…
Cancel
Save