very crude downsampling
This commit is contained in:
parent
3c09c94786
commit
83c4cba47c
@ -115,10 +115,13 @@ void BarrVerb::run(const float **inputs, float **outputs, uint32_t frames) {
|
|||||||
in_z22 += c2_2 * in_z12;
|
in_z22 += c2_2 * in_z12;
|
||||||
in_z12 += c1_2 * x;
|
in_z12 += c1_2 * x;
|
||||||
lowpass[i] = d0_2 * x + in_z22;
|
lowpass[i] = d0_2 * x + in_z22;
|
||||||
|
}
|
||||||
|
|
||||||
|
// now run the DSP
|
||||||
|
for (uint32_t i=0; i < frames; i+=2) {
|
||||||
// run the actual DSP engine for each sample
|
// run the actual DSP engine for each sample
|
||||||
for (uint8_t step = 0; step < 128; step++) {
|
for (uint8_t step = 0; step < 128; step++) {
|
||||||
opcode = rom[(128*48) + step];
|
opcode = rom[(128*44) + step];
|
||||||
switch (opcode & 0xc000) {
|
switch (opcode & 0xc000) {
|
||||||
case 0x0000:
|
case 0x0000:
|
||||||
ai = ram[ptr];
|
ai = ram[ptr];
|
||||||
@ -145,9 +148,12 @@ void BarrVerb::run(const float **inputs, float **outputs, uint32_t frames) {
|
|||||||
} else if (step == 0x60) {
|
} else if (step == 0x60) {
|
||||||
// output right channel
|
// output right channel
|
||||||
outputs[1][i] = (float)ai / 4096;
|
outputs[1][i] = (float)ai / 4096;
|
||||||
|
outputs[1][i+1] = (float)ai / 4096;
|
||||||
|
|
||||||
} else if (step == 0x70) {
|
} else if (step == 0x70) {
|
||||||
// output left channel
|
// output left channel
|
||||||
outputs[0][i] = (float)ai / 4096;
|
outputs[0][i] = (float)ai / 4096;
|
||||||
|
outputs[0][i+1] = (float)ai / 4096;
|
||||||
} else {
|
} else {
|
||||||
// everything else
|
// everything else
|
||||||
// ADC and DAC operations don't affect the accumulator
|
// ADC and DAC operations don't affect the accumulator
|
||||||
@ -164,4 +170,5 @@ void BarrVerb::run(const float **inputs, float **outputs, uint32_t frames) {
|
|||||||
|
|
||||||
// create the plugin
|
// create the plugin
|
||||||
Plugin *createPlugin() { return new BarrVerb(); }
|
Plugin *createPlugin() { return new BarrVerb(); }
|
||||||
|
|
||||||
END_NAMESPACE_DISTRHO
|
END_NAMESPACE_DISTRHO
|
||||||
|
Loading…
Reference in New Issue
Block a user