Merge pull request 'Dateien hochladen nach „“' (#43) from positionhigh/MicroDexed:dev-synth_dexed into dev-synth_dexed

Reviewed-on: https://codeberg.org/dcoredump/MicroDexed/pulls/43
pull/44/head
Holger Wirtz 3 years ago
commit b009c0cecb
  1. 32
      UI.hpp

@ -110,7 +110,8 @@ elapsedMillis back_from_volume;
uint8_t instance_num[8][8];
const char accepted_chars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-abcdefghijklmnopqrstuvwxyz";
uint8_t active_perform_page = 1;
uint8_t orig_attack_values[2][7];
uint8_t orig_release_values[2][7];
#ifdef I2C_DISPLAY
#include <LiquidCrystal_I2C.h>
@ -4110,36 +4111,49 @@ void UI_func_volume(uint8_t param)
if (LCDML.BT_checkDown() )
{
if (perform_attack_mod[selected_instance_id] == 0)
for (uint8_t i = 0; i < 6; i++) {
orig_attack_values[selected_instance_id][i] = MicroDexed[selected_instance_id]->getRateOP(i, ATTACK);
}
perform_attack_mod[selected_instance_id] = constrain(perform_attack_mod[selected_instance_id] + ENCODER[ENC_L].speed(), -MAX_PERF_MOD, MAX_PERF_MOD);
for (uint8_t i = 0; i < 6; i++)
MicroDexed[selected_instance_id]->setRateOP(i, ATTACK, MicroDexed[selected_instance_id]->getRateOP(i, ATTACK) - perform_attack_mod[selected_instance_id] );
MicroDexed[selected_instance_id]->setRateOP(i, ATTACK, orig_attack_values[selected_instance_id][i] - perform_attack_mod[selected_instance_id] );
}
else if (LCDML.BT_checkUp() )
{
if (perform_attack_mod[selected_instance_id] == 0) // Save initial Values
for (uint8_t i = 0; i < 6; i++) {
orig_attack_values[selected_instance_id][i] = MicroDexed[selected_instance_id]->getRateOP(i, ATTACK);
}
perform_attack_mod[selected_instance_id] = constrain(perform_attack_mod[selected_instance_id] - ENCODER[ENC_L].speed(), -MAX_PERF_MOD, MAX_PERF_MOD);
for (uint8_t i = 0; i < 6; i++)
MicroDexed[selected_instance_id]->setRateOP(i, ATTACK, MicroDexed[selected_instance_id]->getRateOP(i, ATTACK) - perform_attack_mod[selected_instance_id] );
MicroDexed[selected_instance_id]->setRateOP(i, ATTACK, orig_attack_values[selected_instance_id][i] - perform_attack_mod[selected_instance_id] );
}
}
else if (active_perform_page == 3)
{ //Release
if (LCDML.BT_checkDown() )
{
if (perform_release_mod[selected_instance_id] == 0) // Save initial Values
for (uint8_t i = 0; i < 6; i++) {
orig_release_values[selected_instance_id][i] = MicroDexed[selected_instance_id]->getRateOP(i, RELEASE);
}
perform_release_mod[selected_instance_id] = constrain(perform_release_mod[selected_instance_id] + ENCODER[ENC_L].speed(), -MAX_PERF_MOD, MAX_PERF_MOD);
for (uint8_t i = 0; i < 6; i++)
MicroDexed[selected_instance_id]->setRateOP(i, RELEASE, MicroDexed[selected_instance_id]->getRateOP(i, RELEASE) - perform_release_mod[selected_instance_id] );
MicroDexed[selected_instance_id]->setRateOP(i, RELEASE, orig_release_values[selected_instance_id][i] - perform_release_mod[selected_instance_id] );
}
else if (LCDML.BT_checkUp() )
{
if (perform_release_mod[selected_instance_id] == 0)
for (uint8_t i = 0; i < 6; i++) {
orig_release_values[selected_instance_id][i] = MicroDexed[selected_instance_id]->getRateOP(i, RELEASE);
}
perform_release_mod[selected_instance_id] = constrain(perform_release_mod[selected_instance_id] - ENCODER[ENC_L].speed(), -MAX_PERF_MOD, MAX_PERF_MOD);
for (uint8_t i = 0; i < 6; i++)
MicroDexed[selected_instance_id]->setRateOP(i, RELEASE, MicroDexed[selected_instance_id]->getRateOP(i, RELEASE) - perform_release_mod[selected_instance_id] );
MicroDexed[selected_instance_id]->setRateOP(i, RELEASE, orig_release_values[selected_instance_id][i] - perform_release_mod[selected_instance_id] );
}
}
}

Loading…
Cancel
Save