Fixes and PT8211 enabled.

Now it works!
chorus
Holger Wirtz 5 years ago
parent 86d790b2b8
commit 69a6bd885d
  1. 5
      MicroMDAPiano.ino
  2. 6
      config.h

@ -235,8 +235,8 @@ void loop()
#ifndef TEENSY_AUDIO_BOARD #ifndef TEENSY_AUDIO_BOARD
for (uint8_t i = 0; i < AUDIO_BLOCK_SAMPLES; i++) for (uint8_t i = 0; i < AUDIO_BLOCK_SAMPLES; i++)
{ {
audio_buffer_r[i] *= vol_r; audio_buffer_r[i] *= vol;
audio_buffer_l[i] *= vol_l; audio_buffer_l[i] *= vol;
} }
#endif #endif
queue_r.playBuffer(); queue_r.playBuffer();
@ -530,7 +530,6 @@ void set_volume(float v, float vr, float vl)
#ifdef TEENSY_AUDIO_BOARD #ifdef TEENSY_AUDIO_BOARD
sgtl5000_1.dacVolume(vol * vol_left, vol * vol_right); sgtl5000_1.dacVolume(vol * vol_left, vol * vol_right);
#else #else
volume_master.gain(vol);
volume_r.gain(vr); volume_r.gain(vr);
volume_l.gain(vl); volume_l.gain(vl);
#endif #endif

@ -30,8 +30,8 @@
// Initial values // Initial values
#define MIDI_DEVICE Serial1 #define MIDI_DEVICE Serial1
//#define USE_ONBOARD_USB_HOST 1 #define USE_ONBOARD_USB_HOST 1
#define TEENSY_AUDIO_BOARD 1 //#define TEENSY_AUDIO_BOARD 1
#define VOLUME 0.3 #define VOLUME 0.3
#define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI #define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI
#define AUDIO_MEM 300 #define AUDIO_MEM 300
@ -57,7 +57,7 @@
#define SHOW_CPU_LOAD_MSEC 5000 #define SHOW_CPU_LOAD_MSEC 5000
// Enable TEST_NOTE for adding code to drop some midi notes for testing without keyboard // Enable TEST_NOTE for adding code to drop some midi notes for testing without keyboard
#define TEST_NOTE MIDI_E2 //#define TEST_NOTE MIDI_E2
#define TEST_VEL_MIN 60 #define TEST_VEL_MIN 60
#define TEST_VEL_MAX 110 #define TEST_VEL_MAX 110

Loading…
Cancel
Save