Browse Source

Reorder MIDI-4 poly modes

tags/v0.6.1
Andrew Belt 6 years ago
parent
commit
aa76b4bc81
4 changed files with 17 additions and 15 deletions
  1. +2
    -0
      CHANGELOG.md
  2. +12
    -14
      src/Core/QuadMIDIToCVInterface.cpp
  3. +2
    -0
      src/app/SVGSlider.cpp
  4. +1
    -1
      src/engine.cpp

+ 2
- 0
CHANGELOG.md View File

@@ -7,6 +7,8 @@
- Added velocity mode to MIDI-Trig - Added velocity mode to MIDI-Trig
- Added MIDI multiplexing so multiple MIDI modules can use the same MIDI device on Windows - Added MIDI multiplexing so multiple MIDI modules can use the same MIDI device on Windows
- Make Module Browser layout more compact - Make Module Browser layout more compact
- Add power meter
- Add icons to toolbar
- [VCV Bridge](https://vcvrack.com/manual/Bridge.html) 0.6.1 - [VCV Bridge](https://vcvrack.com/manual/Bridge.html) 0.6.1
- Replaced VST effect plugin with VST instrument plugin with audio inputs - Replaced VST effect plugin with VST instrument plugin with audio inputs
- Added MIDI support - Added MIDI support


+ 12
- 14
src/Core/QuadMIDIToCVInterface.cpp View File

@@ -27,15 +27,13 @@ struct QuadMIDIToCVInterface : Module {


enum PolyMode { enum PolyMode {
ROTATE_MODE, ROTATE_MODE,
// Added REUSE option that reuses a channel when receiving the same note.
// Good when using sustain pedal so it doesn't "stack" unisons ... not sure this is the best name but it is descriptive...
REUSE_MODE, REUSE_MODE,
RESET_MODE, RESET_MODE,
REASSIGN_MODE, REASSIGN_MODE,
UNISON_MODE, UNISON_MODE,
NUM_MODES NUM_MODES
}; };
PolyMode polyMode = ROTATE_MODE;
PolyMode polyMode = RESET_MODE;


struct NoteData { struct NoteData {
uint8_t velocity = 0; uint8_t velocity = 0;
@@ -351,19 +349,19 @@ struct QuadMIDIToCVInterfaceWidget : ModuleWidget {


menu->addChild(MenuEntry::create()); menu->addChild(MenuEntry::create());
menu->addChild(MenuLabel::create("Polyphony mode")); menu->addChild(MenuLabel::create("Polyphony mode"));
std::vector<std::string> polyModeNames = {
"Rotate",
"Reuse",
"Reset",
"Reassign",
"Unison"
};
for (int i = 0; i < QuadMIDIToCVInterface::NUM_MODES; i++) {
PolyphonyItem *item = MenuItem::create<PolyphonyItem>(polyModeNames[i], CHECKMARK(module->polyMode == i));

auto addPolyphonyItem = [&](QuadMIDIToCVInterface::PolyMode polyMode, std::string name) {
PolyphonyItem *item = MenuItem::create<PolyphonyItem>(name, CHECKMARK(module->polyMode == polyMode));
item->module = module; item->module = module;
item->polyMode = (QuadMIDIToCVInterface::PolyMode) i;
item->polyMode = polyMode;
menu->addChild(item); menu->addChild(item);
}
};

addPolyphonyItem(QuadMIDIToCVInterface::RESET_MODE, "Reset");
addPolyphonyItem(QuadMIDIToCVInterface::ROTATE_MODE, "Rotate");
addPolyphonyItem(QuadMIDIToCVInterface::REUSE_MODE, "Reuse");
addPolyphonyItem(QuadMIDIToCVInterface::REASSIGN_MODE, "Reassign");
addPolyphonyItem(QuadMIDIToCVInterface::UNISON_MODE, "Unison");
} }
}; };




+ 2
- 0
src/app/SVGSlider.cpp View File

@@ -10,6 +10,8 @@ SVGSlider::SVGSlider() {


handle = new SVGWidget(); handle = new SVGWidget();
addChild(handle); addChild(handle);

speed = 2.0;
} }


void SVGSlider::setSVGs(std::shared_ptr<SVG> backgroundSVG, std::shared_ptr<SVG> handleSVG) { void SVGSlider::setSVGs(std::shared_ptr<SVG> backgroundSVG, std::shared_ptr<SVG> handleSVG) {


+ 1
- 1
src/engine.cpp View File

@@ -97,7 +97,7 @@ static void engineStep() {


auto stopTime = std::chrono::high_resolution_clock::now(); auto stopTime = std::chrono::high_resolution_clock::now();
float cpuTime = std::chrono::duration<float>(stopTime - startTime).count() * sampleRate; float cpuTime = std::chrono::duration<float>(stopTime - startTime).count() * sampleRate;
module->cpuTime += (cpuTime - module->cpuTime) * sampleTime / 0.25f;
module->cpuTime += (cpuTime - module->cpuTime) * sampleTime / 0.5f;
} }
else { else {
module->step(); module->step();


Loading…
Cancel
Save