Reduced volume inside MDAEPiano due to digital distortion...

chorus2
Holger Wirtz 5 years ago
parent ca5776aa8b
commit 64998dfdcd
  1. 2
      MicroMDAEPiano.ino
  2. 2
      UI.cpp
  3. 2
      UI.h
  4. 2
      config.h
  5. 3
      mdaEPiano.cpp

@ -127,6 +127,7 @@ void setup()
Serial.begin(SERIAL_SPEED);
delay(220);
/*
// LCD display setup
lcd.init();
lcd.blink_off();
@ -145,6 +146,7 @@ void setup()
enc_val[1] = enc[1].read();
but[0].update();
but[1].update();
*/
// Debug output
Serial.println(F("MicroMDAEPiano based on https://sourceforge.net/projects/mda-vst"));

@ -24,6 +24,7 @@
#include "config.h"
#include "UI.h"
/*
UI::UI()
{
LiquidCrystalPlus_I2C lcd(LCD_I2C_ADDRESS, LCD_CHARS, LCD_LINES);
@ -31,3 +32,4 @@ UI::UI()
enc_val[] = {INITIAL_ENC_L_VALUE, INITIAL_ENC_R_VALUE};
but[] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)};
}
*/

@ -24,6 +24,7 @@
#ifndef UI_H_INCLUDED
#define UI_H_INCLUDED
/*
#include "config.h"
#include "LiquidCrystalPlus_I2C.h"
#include <Bounce.h>
@ -41,4 +42,5 @@ class UI
int32_t enc_val[2];
Bounce but[2];
}
*/
#endif

@ -55,7 +55,7 @@
#define VOLUME 0.8
#define AUDIO_MEM 128
#define SAMPLE_RATE 44100
#define REDUCE_LOUDNESS 1
#define REDUCE_LOUDNESS 0
#define USE_XFADE_DATA 1
//*************************************************************************************************

@ -228,6 +228,9 @@ void mdaEPiano::process(int16_t* outputs_r, int16_t* outputs_l)
l += l * lmod * lfo1;
r += r * rmod * lfo1; //worth making all these local variables?
r*=0.5;
l*=0.5;
if (r > 1.0)
r = 1.0;
else if (r < -1.0)

Loading…
Cancel
Save