From c984651b2a966a0e7fed345182735f586ab0d346 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 17 Dec 2018 00:10:50 -0500 Subject: [PATCH] Modernize Core's Rack API calls --- src/Core/AudioInterface.cpp | 3 ++- src/Core/Blank.cpp | 2 +- src/Core/MIDICCToCVInterface.cpp | 3 ++- src/Core/MIDIToCVInterface.cpp | 4 +++- src/Core/MIDITriggerToCVInterface.cpp | 3 ++- src/Core/QuadMIDIToCVInterface.cpp | 4 +++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Core/AudioInterface.cpp b/src/Core/AudioInterface.cpp index 21e27966..46af6cd2 100644 --- a/src/Core/AudioInterface.cpp +++ b/src/Core/AudioInterface.cpp @@ -119,7 +119,8 @@ struct AudioInterface : Module { DoubleRingBuffer, 16> inputBuffer; DoubleRingBuffer, 16> outputBuffer; - AudioInterface() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + AudioInterface() { + setup(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); onSampleRateChange(); } diff --git a/src/Core/Blank.cpp b/src/Core/Blank.cpp index 46912d0b..8d93cfc8 100644 --- a/src/Core/Blank.cpp +++ b/src/Core/Blank.cpp @@ -103,7 +103,7 @@ struct BlankWidget : ModuleWidget { json_t *toJson() override { json_t *rootJ = ModuleWidget::toJson(); - // // width + // width json_object_set_new(rootJ, "width", json_real(box.size.x)); return rootJ; diff --git a/src/Core/MIDICCToCVInterface.cpp b/src/Core/MIDICCToCVInterface.cpp index 1b966190..985a59ae 100644 --- a/src/Core/MIDICCToCVInterface.cpp +++ b/src/Core/MIDICCToCVInterface.cpp @@ -27,7 +27,8 @@ struct MIDICCToCVInterface : Module { int learningId = -1; int learnedCcs[16] = {}; - MIDICCToCVInterface() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + MIDICCToCVInterface() { + setup(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); onReset(); } diff --git a/src/Core/MIDIToCVInterface.cpp b/src/Core/MIDIToCVInterface.cpp index 390409bc..a9bcee8b 100644 --- a/src/Core/MIDIToCVInterface.cpp +++ b/src/Core/MIDIToCVInterface.cpp @@ -57,7 +57,9 @@ struct MIDIToCVInterface : Module { bool pedal; bool gate; - MIDIToCVInterface() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS), heldNotes(128) { + MIDIToCVInterface() { + setup(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + heldNotes.resize(128, 0); onReset(); } diff --git a/src/Core/MIDITriggerToCVInterface.cpp b/src/Core/MIDITriggerToCVInterface.cpp index b7aaeb9f..7bd2a894 100644 --- a/src/Core/MIDITriggerToCVInterface.cpp +++ b/src/Core/MIDITriggerToCVInterface.cpp @@ -28,7 +28,8 @@ struct MIDITriggerToCVInterface : Module { uint8_t learnedNotes[16] = {}; bool velocity = false; - MIDITriggerToCVInterface() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + MIDITriggerToCVInterface() { + setup(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); onReset(); } diff --git a/src/Core/QuadMIDIToCVInterface.cpp b/src/Core/QuadMIDIToCVInterface.cpp index 5e7c1395..0dd3e4bc 100644 --- a/src/Core/QuadMIDIToCVInterface.cpp +++ b/src/Core/QuadMIDIToCVInterface.cpp @@ -51,7 +51,9 @@ struct QuadMIDIToCVInterface : Module { int rotateIndex; int stealIndex; - QuadMIDIToCVInterface() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS), cachedNotes(128) { + QuadMIDIToCVInterface() { + setup(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + cachedNotes.resize(128, 0); onReset(); }