Hi. I have a mute block with a custom slew type (0xAAAA), which gives me a slow fade to mute over about two seconds. Rather than hard-coding the transition time in the MCU, I'd rather get this information from the DSP. My current approach is to read the mute block's gain value.
What I've found is that the gain value is not exposed directly in the PARAM.h header. The documentation for the Mute block (here) indicates that I should have a MOD_<block_name>_MUTE1_ALG0_MUTEONOFF_ADDR definition, but that's unfortunately not the case. MUTE_ADDR and SLEW_RATE_ADDR are provided, neither of which change when I mute this block. There is, however, a 4-byte gap between the preceding block's address (also a mute block) and the first address of the mute block I care about. If I read this, I get the slewing gain value.
I can add the gain value to the indirection parameter access table and read it using this address, but I'm a bit hesitant to do so as the value isn't available directly.
So, I have two questions, then. As the mute block's gain is not exposed through the normal API, is it safe to be reading it, and is it guaranteed to behave as expected? Also, stepping back a bit, is there a better way to indicate to the MCU that the mute block has completed ramping to its final value?
Excerpt from PARAM.h (MOD_MUTEWITHFADE is the mute block I care about):
/* Module MasterMute - Mute*/
#define MOD_MASTERMUTE_COUNT 2
#define MOD_MASTERMUTE_DEVICE "IC1"
#define MOD_MASTERMUTE_ALG0_SLEW_MODE_ADDR 761
#define MOD_MASTERMUTE_ALG0_SLEW_MODE_FIXPT 0x0000208A
#define MOD_MASTERMUTE_ALG0_SLEW_MODE_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(8330)
#define MOD_MASTERMUTE_ALG0_SLEW_MODE_TYPE SIGMASTUDIOTYPE_INTEGER
#define MOD_MASTERMUTE_ALG0_MUTE_ADDR 762
#define MOD_MASTERMUTE_ALG0_MUTE_VALUE SIGMASTUDIOTYPE_8_24_CONVERT(0)
#define MOD_MASTERMUTE_ALG0_MUTE_TYPE SIGMASTUDIOTYPE_8_24
/* MOD_MASTERMUTE_ALG0_MUTE_ADDR + 1 seems to correspond to MOD_MUTEWITHFADE_ALG0_MUTEONOFF_ADDR */
/* Module MuteWithFade - Mute*/
#define MOD_MUTEWITHFADE_COUNT 2
#define MOD_MUTEWITHFADE_DEVICE "IC1"
#define MOD_MUTEWITHFADE_ALG0_SLEW_MODE_ADDR 764
#define MOD_MUTEWITHFADE_ALG0_SLEW_MODE_FIXPT 0x0000AAAA
#define MOD_MUTEWITHFADE_ALG0_SLEW_MODE_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(43690)
#define MOD_MUTEWITHFADE_ALG0_SLEW_MODE_TYPE SIGMASTUDIOTYPE_INTEGER
#define MOD_MUTEWITHFADE_ALG0_MUTE_ADDR 765
#define MOD_MUTEWITHFADE_ALG0_MUTE_VALUE SIGMASTUDIOTYPE_8_24_CONVERT(0)
#define MOD_MUTEWITHFADE_ALG0_MUTE_TYPE SIGMASTUDIOTYPE_8_24