Browse Source

remove virtual from functions in modules (inherit from midiIO not from

individual modules)
tags/v0.5.0
ben 7 years ago
parent
commit
3bace286ec
3 changed files with 13 additions and 13 deletions
  1. +4
    -4
      src/core/MidiCCToCV.cpp
  2. +4
    -4
      src/core/MidiToCV.cpp
  3. +5
    -5
      src/core/MidiTriggerToCV.cpp

+ 4
- 4
src/core/MidiCCToCV.cpp View File

@@ -40,9 +40,9 @@ struct MIDICCToCVInterface : MidiIO, Module {

void processMidi(std::vector<unsigned char> msg);

virtual void resetMidi();
void resetMidi();

virtual json_t *toJson() {
json_t *toJson() {
json_t *rootJ = json_object();
addBaseJson(rootJ);
for (int i = 0; i < NUM_OUTPUTS; i++) {
@@ -51,7 +51,7 @@ struct MIDICCToCVInterface : MidiIO, Module {
return rootJ;
}

virtual void fromJson(json_t *rootJ) {
void fromJson(json_t *rootJ) {
baseFromJson(rootJ);
for (int i = 0; i < NUM_OUTPUTS; i++) {
json_t *ccNumJ = json_object_get(rootJ, std::to_string(i).c_str());
@@ -63,7 +63,7 @@ struct MIDICCToCVInterface : MidiIO, Module {
}
}

virtual void initialize() {
void initialize() {
resetMidi();
}



+ 4
- 4
src/core/MidiToCV.cpp View File

@@ -55,21 +55,21 @@ struct MIDIToCVInterface : MidiIO, Module {

void processMidi(std::vector<unsigned char> msg);

virtual json_t *toJson() {
json_t *toJson() {
json_t *rootJ = json_object();
addBaseJson(rootJ);
return rootJ;
}

virtual void fromJson(json_t *rootJ) {
void fromJson(json_t *rootJ) {
baseFromJson(rootJ);
}

virtual void initialize() {
void initialize() {
resetMidi();
}

virtual void resetMidi();
void resetMidi();

};



+ 5
- 5
src/core/MidiTriggerToCV.cpp View File

@@ -42,7 +42,7 @@ struct MIDITriggerToCVInterface : MidiIO, Module {

void processMidi(std::vector<unsigned char> msg);

virtual void resetMidi();
void resetMidi();

virtual json_t *toJson() {
json_t *rootJ = json_object();
@@ -53,7 +53,7 @@ struct MIDITriggerToCVInterface : MidiIO, Module {
return rootJ;
}

virtual void fromJson(json_t *rootJ) {
void fromJson(json_t *rootJ) {
baseFromJson(rootJ);
for (int i = 0; i < NUM_OUTPUTS; i++) {
json_t *ccNumJ = json_object_get(rootJ, std::to_string(i).c_str());
@@ -65,7 +65,7 @@ struct MIDITriggerToCVInterface : MidiIO, Module {
}
}

virtual void initialize() {
void initialize() {
resetMidi();
}

@@ -111,7 +111,7 @@ void MIDITriggerToCVInterface::processMidi(std::vector<unsigned char> msg) {
return;

if (status == 0x8) { // note off
for (int i = 0; i<NUM_OUTPUTS; i++) {
for (int i = 0; i < NUM_OUTPUTS; i++) {
if (data1 == triggerNum[i]) {
trigger[i] = data2;
}
@@ -126,7 +126,7 @@ void MIDITriggerToCVInterface::processMidi(std::vector<unsigned char> msg) {
}
}

for (int i = 0; i<NUM_OUTPUTS; i++) {
for (int i = 0; i < NUM_OUTPUTS; i++) {
if (data1 == triggerNum[i]) {
trigger[i] = data2;
}


Loading…
Cancel
Save