I'm experimenting with an effect pedal project I found on GitHub,
https://github.com/n3ws/fvduino/blob/main/fvduino.ino
Default values are not loaded correctly, a comment in the code says :
// something wrong with algo index, set to zero
// user will have to edit and save,
// load patch settings from EEPROM
uint16_t eeAdress = PATCH_EE_ADDR;
for (uint8_t i = 0; i < NPATCH; ++i) {
EEPROM.get(eeAdress, patch_data[i]);
if (patch_data[i].algorithm >= NALGO) {
patch_data[i].algorithm = 0; // something wrong with algo index, set to zero
changed[i] = true; // user will have to edit and save
I think this part is the algo index:
// Sensible default settings for each algorithm
typedef struct {
uint8_t vol;
uint8_t mix;
uint8_t par1;
uint8_t par2;
uint8_t par3;
} Default;
// Keep everything together in a single array
typedef struct {
Description desc;
Default def;
uint8_t* const prog_addr;
} AlgoDatum;
const AlgoDatum algodata [] PROGMEM = {
// Reverbs
{{"SprgRev+Trem", "Revrb", "Rate", "Depth"}, {17, 8, 128, 128, 128}, (uint8_t *)spring_verb},
{{"Tremolo +Rev", "Revrb", "Rate", "Level"}, {17, 8, 128, 128, 128}, (uint8_t *)GA_DEMO_TREM},
{{"Room", "Pre", "Time", "Damp" }, {17, 8, 128, 128, 128}, (uint8_t *)K3_V1_1_Room},
{{"Hall", "Pre", "Time", "Damp" }, {17, 8, 128, 128, 128}, (uint8_t *)K3_V1_0_Hall},
{{"Gated Reverb", "Pre", "GateT", "Damp" }, {17, 8, 128, 128, 128}, (uint8_t *)K3_V1_3_GATED},
can anyone see anything wrong with this?