Several small fixes.

pull/32/head
Holger Wirtz 5 years ago
parent 69ce71436e
commit c53a30dcdd
  1. 42
      MicroDexed.ino
  2. 4
      UI.hpp
  3. 2
      dexed.cpp
  4. 6
      dexed_sd.cpp
  5. 6
      dexed_sd.h

@ -1360,20 +1360,21 @@ void initial_values_from_eeprom(bool init)
{
uint32_t _m_;
EEPROM.get(EEPROM_START_ADDRESS + offsetof(configuration_s, _marker_), _m_);
if (_m_ != EEPROM_MARKER)
{
#ifdef DEBUG
Serial.println(F("Found wrong EEPROM marker, initializing EEPROM..."));
#endif
init = true;
configuration._marker_ = EEPROM_MARKER;
}
if (init == true)
init_configuration();
else
{
EEPROM.get(EEPROM_START_ADDRESS + offsetof(configuration_s, _marker_), _m_);
if (_m_ != EEPROM_MARKER)
{
#ifdef DEBUG
Serial.println(F("Found wrong EEPROM marker, initializing EEPROM..."));
#endif
init = true;
configuration._marker_ = EEPROM_MARKER;
}
#ifdef DEBUG
Serial.println(F("Loading inital system data from EEPROM."));
#endif
@ -1390,21 +1391,22 @@ void initial_values_from_eeprom(bool init)
show_configuration();
#endif
check_configuration();
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
set_voiceconfig_params(instance_id);
}
set_fx_params();
set_sys_params();
set_volume(configuration.sys.vol, configuration.sys.mono);
#ifdef DEBUG
Serial.println(F("OK, loaded!"));
#endif
}
check_configuration();
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
set_voiceconfig_params(instance_id);
}
set_fx_params();
set_sys_params();
set_volume(configuration.sys.vol, configuration.sys.mono);
#ifdef DEBUG
show_configuration();
#endif

@ -1434,8 +1434,8 @@ void UI_func_reverb_send(uint8_t param)
lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false);
reverb_mixer_r.gain(selected_instance_id, pseudo_log_curve(configuration.fx.reverb_send[selected_instance_id] / 100.0));
reverb_mixer_l.gain(selected_instance_id, pseudo_log_curve(configuration.fx.reverb_send[selected_instance_id] / 100.0));
reverb_mixer_r.gain(selected_instance_id, pseudo_log_curve(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)));
reverb_mixer_l.gain(selected_instance_id, pseudo_log_curve(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)));
}
if (LCDML.FUNC_close()) // ****** STABLE END *********

@ -150,7 +150,7 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer)
{
//sumbuf[i + j] += static_cast<float>(signed_saturate_rshift(audiobuf.get()[j] >> 4, 24, 9)) / 0x8000;
//sumbuf[i + j] += static_cast<float>(signed_saturate_rshift(audiobuf.get()[j] >> 5, 24, 9)) / 0x8000;
sumbuf[i + j] += static_cast<float>(signed_saturate_rshift(audiobuf.get()[j], 32, 14)) / 0x8000;
sumbuf[i + j] += static_cast<float>(signed_saturate_rshift(audiobuf.get()[j], 32, 13)) / 0x8000;
//sumbuf[i + j] += static_cast<float>(audiobuf.get()[j] / 0x8000);
audiobuf.get()[j] = 0;
}

@ -344,7 +344,7 @@ bool save_sd_bank(const char* bank_filename, uint8_t* data)
/******************************************************************************
SD VOICECONFIG
******************************************************************************/
bool load_sd_voiceconfig(uint8_t vc, uint8_t instance_id)
bool load_sd_voiceconfig(int8_t vc, uint8_t instance_id)
{
if (vc < 0)
return (false);
@ -444,7 +444,7 @@ bool save_sd_voiceconfig(uint8_t vc, uint8_t instance_id)
/******************************************************************************
SD FX
******************************************************************************/
bool load_sd_fx(uint8_t fx)
bool load_sd_fx(int8_t fx)
{
if (fx < 0)
return (false);
@ -543,7 +543,7 @@ bool save_sd_fx(uint8_t fx)
/******************************************************************************
SD PERFORMANCE
******************************************************************************/
bool load_sd_performance(uint8_t p)
bool load_sd_performance(int8_t p)
{
if (p < 0)
return (false);

@ -53,13 +53,13 @@ bool get_sd_voice(File sysex, uint8_t voice_number, uint8_t* data);
bool put_sd_voice(File sysex, uint8_t voice_number, uint8_t* data);
bool save_sd_bank(const char* bank_filename, uint8_t* data);
bool load_sd_voiceconfig(uint8_t vc, uint8_t instance_id);
bool load_sd_voiceconfig(int8_t vc, uint8_t instance_id);
bool save_sd_voiceconfig(uint8_t vc, uint8_t instance_id);
bool load_sd_fx(uint8_t fx);
bool load_sd_fx(int8_t fx);
bool save_sd_fx(uint8_t fx);
bool load_sd_performance(uint8_t p);
bool load_sd_performance(int8_t p);
bool save_sd_performance(uint8_t p);
bool get_sd_data(File sysex, uint8_t format, uint8_t* conf);

Loading…
Cancel
Save