Fixes for multi-instance.

pull/32/head
Holger Wirtz 5 years ago
parent 11b2afb949
commit 8e3a15f9ae
  1. 28
      MicroDexed.ino
  2. 8
      config.h

@ -1322,16 +1322,6 @@ void init_configuration(void)
configuration.dexed[instance_id].pan = PANORAMA_DEFAULT;
configuration.dexed[instance_id].transpose = TRANSPOSE_DEFAULT;
configuration.dexed[instance_id].tune = TUNE_DEFAULT;
#if NUM_DEXED > 1
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT / 2;
#else
if (instance_id == 0)
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT;
else
configuration.dexed[instance_id].polyphony = 0;
#endif
configuration.dexed[instance_id].velocity_level = VELOCITY_LEVEL_DEFAULT;
configuration.dexed[instance_id].engine = ENGINE_DEFAULT;
configuration.dexed[instance_id].monopoly = MONOPOLY_DEFAULT;
@ -1358,7 +1348,25 @@ void init_configuration(void)
configuration.performance.bank[instance_id] = SYSEXBANK_DEFAULT;
configuration.performance.voice[instance_id] = SYSEXSOUND_DEFAULT;
#if NUM_DEXED > 1
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT / 2;
#else
if (instance_id == 0)
{
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT;
}
else
{
configuration.dexed[instance_id].polyphony = 0;
}
#endif
#if NUM_DEXED > 1
MicroDexed[instance_id]->controllers.refresh();
#else
if (instance_id == 0)
MicroDexed[instance_id]->controllers.refresh();
#endif
}
set_volume(configuration.sys.vol, configuration.sys.mono);

@ -577,9 +577,9 @@ typedef struct fx_s {
} fx_t;
typedef struct performance_s {
uint8_t bank[NUM_DEXED];
uint8_t voice[NUM_DEXED];
uint8_t voiceconfig_number[NUM_DEXED];
uint8_t bank[MAX_DEXED];
uint8_t voice[MAX_DEXED];
uint8_t voiceconfig_number[MAX_DEXED];
uint8_t fx_number;
} performance_t;
@ -595,7 +595,7 @@ typedef struct configuration_s {
sys_t sys;
fx_t fx;
performance_t performance;
dexed_t dexed[NUM_DEXED];
dexed_t dexed[MAX_DEXED];
uint32_t _marker_;
} config_t;

Loading…
Cancel
Save