pull/32/head
Holger Wirtz 5 years ago
parent 56ba4ef351
commit b69c0dada3
  1. 6
      MicroDexed.ino
  2. 36
      UI.hpp
  3. 16
      config.h
  4. 6
      dexed.cpp

@ -1498,6 +1498,7 @@ void set_master_mixer_gain(uint8_t type, float level)
float new_level[num_fx]; float new_level[num_fx];
/*
new_level[CHORUS] = master_mixer_level[CHORUS] / float(num_fx); new_level[CHORUS] = master_mixer_level[CHORUS] / float(num_fx);
new_level[DELAY] = master_mixer_level[DELAY] / float(num_fx); new_level[DELAY] = master_mixer_level[DELAY] / float(num_fx);
#if defined(USE_REVERB) #if defined(USE_REVERB)
@ -1506,6 +1507,11 @@ void set_master_mixer_gain(uint8_t type, float level)
#else #else
new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY]; new_level[DEXED] = 1.0 - new_level[CHORUS] - new_level[DELAY];
#endif #endif
*/
new_level[CHORUS] = master_mixer_level[CHORUS];
new_level[DELAY] = master_mixer_level[DELAY];
new_level[REVERB] = master_mixer_level[REVERB];
new_level[DEXED] = 1.0;
master_mixer_r.gain(DEXED, new_level[DEXED]); master_mixer_r.gain(DEXED, new_level[DEXED]);
master_mixer_l.gain(DEXED, new_level[DEXED]); master_mixer_l.gain(DEXED, new_level[DEXED]);

@ -1388,8 +1388,8 @@ void UI_func_chorus_send(uint8_t param)
} }
} }
chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 200.0); chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
chorus_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].chorus_send / 200.0); chorus_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
} }
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
@ -1544,8 +1544,8 @@ void UI_func_delay_feedback(uint8_t param)
} }
} }
delay_fb_mixer_r.gain(1, configuration.delay_feedback / 200.0 ); // amount of feedback delay_fb_mixer_r.gain(1, configuration.delay_feedback / 100.0); // amount of feedback
delay_fb_mixer_l.gain(1, configuration.delay_feedback / 200.0 ); // amount of feedback delay_fb_mixer_l.gain(1, configuration.delay_feedback / 100.0); // amount of feedback
//delay_fb_mixer.gain(0, 1.0 - configuration.delay_feedback / 200.0); // original signal //delay_fb_mixer.gain(0, 1.0 - configuration.delay_feedback / 200.0); // original signal
} }
@ -3207,7 +3207,7 @@ void UI_func_midi_soft_thru(uint8_t param)
{ {
// setup function // setup function
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("MIDI-Soft_Thru")); lcd.print(F("MIDI Soft THRU"));
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3436,6 +3436,31 @@ void UI_func_save(uint8_t param)
} }
} }
void UI_function_not_enabled(void)
{
if (LCDML.FUNC_setup()) // ****** SETUP *********
{
// setup function
lcd.setCursor(0, 0);
lcd.print(F("Function not"));
lcd.setCursor(0, 1);
lcd.print(F("enbaled!"));
}
if (LCDML.FUNC_loop()) // ****** LOOP *********
{
if (LCDML.BT_checkEnter())
{
LCDML.FUNC_goBackToMenu();
}
}
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
// you can here reset some global vars or do nothing
}
}
void UI_function_not_implemented(uint8_t param) void UI_function_not_implemented(uint8_t param)
{ {
if (LCDML.FUNC_setup()) // ****** SETUP ********* if (LCDML.FUNC_setup()) // ****** SETUP *********
@ -3460,6 +3485,7 @@ void UI_function_not_implemented(uint8_t param)
// you can here reset some global vars or do nothing // you can here reset some global vars or do nothing
} }
} }
void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign) void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign)
{ {
int16_t tmp = 0; int16_t tmp = 0;

@ -96,7 +96,7 @@
#else #else
#define AUDIO_MEM 384 #define AUDIO_MEM 384
#endif #endif
#define REDUCE_LOUDNESS 0 #define REDUCE_LOUDNESS 2
#else // IF TEENSY_AUDIO_BOARD #else // IF TEENSY_AUDIO_BOARD
#define SGTL5000_LINEOUT_LEVEL 29 #define SGTL5000_LINEOUT_LEVEL 29
#if AUDIO_BLOCK_SAMPLES == 64 #if AUDIO_BLOCK_SAMPLES == 64
@ -104,7 +104,7 @@
#else #else
#define AUDIO_MEM 384 #define AUDIO_MEM 384
#endif #endif
#define REDUCE_LOUDNESS 0 #define REDUCE_LOUDNESS 2
#endif #endif
#define DELAY_MAX_TIME 500 #define DELAY_MAX_TIME 500
#define SAMPLE_RATE 44100 #define SAMPLE_RATE 44100
@ -228,16 +228,12 @@ enum { DEXED, CHORUS, DELAY, REVERB};
#if defined(__MK66FX1M0__) // Teensy-3.6 #if defined(__MK66FX1M0__) // Teensy-3.6
// Teensy-3.6 settings // Teensy-3.6 settings
#define MIDI_DEVICE_USB_HOST 1 #define MIDI_DEVICE_USB_HOST 1
#if defined(USE_REVERB) #if defined(USE_REVERB) && (F_CPU >= 240000000)
#if defined(DEBUG)
//#define MAX_NOTES 12
#define MAX_NOTES 16 #define MAX_NOTES 16
#elif defined(USE_REVERB)
#define MAX_NOTES 8
#else #else
//#define MAX_NOTES 11 #define MAX_NOTES 11
#define MAX_NOTES 16
#endif
#else
#define MAX_NOTES 15
#endif #endif
#endif #endif

@ -174,10 +174,10 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer)
fx.process(sumbuf, n_samples); fx.process(sumbuf, n_samples);
//#ifdef USE_TEENSY_DSP //#ifdef USE_TEENSY_DSP
//arm_float_to_q15(sumbuf, buffer, AUDIO_BLOCK_SAMPLES); arm_float_to_q15(sumbuf, buffer, AUDIO_BLOCK_SAMPLES);
//#else //#else
for (i = 0; i < n_samples; ++i) //for (i = 0; i < n_samples; ++i)
buffer[i] = static_cast<int16_t>(sumbuf[i] * 0x7fff); //buffer[i] = static_cast<int16_t>(sumbuf[i] * 0x7fff);
//#endif //#endif
} }

Loading…
Cancel
Save