better mixing
This commit is contained in:
parent
b913e9bb9c
commit
81904ead80
@ -102,47 +102,43 @@ void AlphaOsc::run(const float **, float **outputs, uint32_t frames, const MidiE
|
||||
pwg = (float)((osc & 0x7f) >= pw) != 0;
|
||||
|
||||
// calculate the oscillator output
|
||||
in = wave = 0;
|
||||
switch (sqrmode) {
|
||||
case 0:
|
||||
case 4:
|
||||
wave = 0;
|
||||
break; // oscillator is off
|
||||
case 1:
|
||||
wave = sqr;
|
||||
sqr = 0; // oscillator is off
|
||||
break;
|
||||
case 1: // do nothing, sqr is fine
|
||||
break;
|
||||
case 2:
|
||||
wave = sqr * oct1; // 25% pulse
|
||||
sqr *= oct1; // 25% pulse
|
||||
break;
|
||||
case 3:
|
||||
wave = sqr * pwg; // pwm
|
||||
sqr *= pwg; // pwm
|
||||
break;
|
||||
}
|
||||
|
||||
in += (wave * 0.63); // scaled similarly to Juno 106
|
||||
|
||||
switch (sawmode) {
|
||||
case 0:
|
||||
wave = 0;
|
||||
saw = 0;
|
||||
break; // oscillator is off
|
||||
case 1:
|
||||
wave = saw;
|
||||
break;
|
||||
break; // saw is fine, do nothing
|
||||
case 2:
|
||||
wave = saw * oct1; // pulsed
|
||||
saw *= oct1; // pulsed
|
||||
break;
|
||||
case 3:
|
||||
wave = saw * pwg; // pwm
|
||||
saw *= pwg; // pwm
|
||||
break;
|
||||
case 4:
|
||||
wave = saw * oct3; // oct3 pulse
|
||||
saw *= oct3; // oct3 pulse
|
||||
break;
|
||||
case 5:
|
||||
wave = saw * oct1 * oct3; // both pulse
|
||||
saw *= oct1 * oct3; // both pulse
|
||||
break;
|
||||
}
|
||||
|
||||
in += (wave * 0.8); // scaled similarly to Juno 106
|
||||
// mix the signals, probably done with some resistors in the chip
|
||||
in = (saw * 0.8) + (sqr * 0.63); // scaled similarly to Juno 106
|
||||
|
||||
// DC removal highpass filter
|
||||
// this is very approximately 6Hz at 44.1kHz and 48kHz
|
||||
|
Loading…
Reference in New Issue
Block a user