modwheel
This commit is contained in:
parent
af49dcf7b6
commit
f8d07cfa3d
@ -133,9 +133,13 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv
|
|||||||
s.voice[i].calcPitch(s);
|
s.voice[i].calcPitch(s);
|
||||||
|
|
||||||
switch (s.patchRam.switch1 & 0x03) {
|
switch (s.patchRam.switch1 & 0x03) {
|
||||||
case 1: s.voice[i].omega /= 4; break;
|
case 1:
|
||||||
case 2: s.voice[i].omega /= 2;
|
s.voice[i].omega /= 4;
|
||||||
default: break;
|
break;
|
||||||
|
case 2:
|
||||||
|
s.voice[i].omega /= 2;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("voice %d note = %02x ff71 = %04x\n",i, s.voice[i].note, s.voice[i].ff71 );
|
// printf("voice %d note = %02x ff71 = %04x\n",i, s.voice[i].note, s.voice[i].ff71 );
|
||||||
|
@ -61,6 +61,8 @@ class Chassis : public Plugin {
|
|||||||
paramSustain,
|
paramSustain,
|
||||||
paramRelease,
|
paramRelease,
|
||||||
|
|
||||||
|
paramModWheel,
|
||||||
|
|
||||||
parameterCount
|
parameterCount
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -244,6 +244,16 @@ void Chassis::initParameter(uint32_t index, Parameter ¶meter) {
|
|||||||
parameter.ranges.def = 40.0f;
|
parameter.ranges.def = 40.0f;
|
||||||
parameter.midiCC = 26;
|
parameter.midiCC = 26;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case paramModWheel:
|
||||||
|
parameter.hints = kParameterIsAutomatable | kParameterIsHidden;
|
||||||
|
parameter.name = "Mod wheel";
|
||||||
|
parameter.symbol = "ch_modwheel";
|
||||||
|
parameter.ranges.min = 0.0f;
|
||||||
|
parameter.ranges.max = 127.0f;
|
||||||
|
parameter.ranges.def = 0.0f;
|
||||||
|
parameter.midiCC = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// chorus, porta, bend range, key mode still to do
|
// chorus, porta, bend range, key mode still to do
|
||||||
}
|
}
|
||||||
@ -307,7 +317,6 @@ void Chassis::setParameterValue(uint32_t index, float value) {
|
|||||||
s.patchRam.env_r = value;
|
s.patchRam.env_r = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
// switch 1 params
|
// switch 1 params
|
||||||
case paramVCORange: // bits 0-2 of switch 1
|
case paramVCORange: // bits 0-2 of switch 1
|
||||||
// doesn't look great in Carla because of odd behaviour with small integer knobs
|
// doesn't look great in Carla because of odd behaviour with small integer knobs
|
||||||
@ -347,6 +356,10 @@ void Chassis::setParameterValue(uint32_t index, float value) {
|
|||||||
s.patchRam.switch2 &= 0xf3;
|
s.patchRam.switch2 &= 0xf3;
|
||||||
s.patchRam.switch2 |= (int)value << 2;
|
s.patchRam.switch2 |= (int)value << 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case paramModWheel:
|
||||||
|
s.ff64 = (int)value << 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,6 +107,7 @@ class Synth {
|
|||||||
uint32_t framesLeft = 0;
|
uint32_t framesLeft = 0;
|
||||||
|
|
||||||
bool keyon;
|
bool keyon;
|
||||||
|
uint8_t ff63 = 0;
|
||||||
|
|
||||||
// RAM from ff00h to ffffh is cleared to zero
|
// RAM from ff00h to ffffh is cleared to zero
|
||||||
// this is in the startup routine at 0280h
|
// this is in the startup routine at 0280h
|
||||||
|
Loading…
Reference in New Issue
Block a user