diff --git a/plugin/assigner.cpp b/plugin/assigner.cpp index 3135207..1cd8c22 100644 --- a/plugin/assigner.cpp +++ b/plugin/assigner.cpp @@ -43,7 +43,12 @@ Assigner::Assigner() { } void Assigner::handleMidi(MidiEvent* ev) { + uint8_t status = ev->data[0]; + + //printf("called with event %04x (%02x): %02x %02x %02x\n", ev->frame, ev->size, ev->data[0], ev->data[1], ev->data[2]); + if (ev->size > 3) return; // sysex bug + switch (status & 0xf0) { case 0x80: noteOff(ev->data[1]); diff --git a/plugin/module.cpp b/plugin/module.cpp index 1d4c3a6..d873111 100644 --- a/plugin/module.cpp +++ b/plugin/module.cpp @@ -92,9 +92,12 @@ void Module::run(Voice* voices, uint32_t blockSize) { master = powf(2, (patchRam.vca / 31.75 - 4.0f)) * 0.1; - square = (patchRam.switch1 & 0x08) ? 0.28 : 0; - saw = (patchRam.switch1 & 0x10) ? .36 : 0; - sub = (patchRam.sub / 127.0f) * 0.4; + // originally I had 0.28, 0.36, 0.4 + // measurement suggests that saw and square are around 100mV each with sub 160mV + + square = (patchRam.switch1 & 0x08) ? 0.3 : 0; + saw = (patchRam.switch1 & 0x10) ? .3 : 0; + sub = (patchRam.sub / 127.0f) * 0.48; res = patchRam.vcfReso / 127.0; noise = (patchRam.noise / 127.0) * 0.4;