This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
resources:tools-software:sigmastudio:toolbox:volumecontrols:mute [30 Jul 2012 23:05] – Created Brett Gildersleeve | resources:tools-software:sigmastudio:toolbox:volumecontrols:mute [27 Jul 2020 16:56] (current) – Added example microcontroller code Joshua Berlin | ||
---|---|---|---|
Line 4: | Line 4: | ||
**To Enable/ | **To Enable/ | ||
- | Click the check box, the signal is mutes when the box is checked. | + | Click the check box; the signal is muted when the box is checked. |
\\ | \\ | ||
\\ | \\ | ||
- | The mute block include' | + | The mute block is available as a Slew or Non-Slew |
+ | The Slew version of the algorithm | ||
\\ | \\ | ||
\\ | \\ | ||
Line 16: | Line 17: | ||
\\ | \\ | ||
This block supports both Grow Algorithm (adds additional inputs and outputs) and Add Algorithm (adds an independent mute algorithm plus associated inputs and outputs). | This block supports both Grow Algorithm (adds additional inputs and outputs) and Add Algorithm (adds an independent mute algorithm plus associated inputs and outputs). | ||
+ | |||
+ | ====== Controlling Mute from a Microcontroller ====== | ||
+ | The following assumes you have a working microcontroller platform, with SigmaDSP interface code based on [[resources: | ||
+ | |||
+ | Within SigmaDSP processors, the Mute function is implemented as a gain. When the checkbox is selected (Mute Enabled), the DSP multiplies the input by 0. This produces a 0 at the output. When the checkbox is unchecked (Mute Disabled), the DSP multiplies the input by 1, allowing the input signal to pass through to the output. | ||
+ | |||
+ | To set the algorithm to Mute, write a 0 to the MuteOnOff address. | ||
+ | To unmute the output, write a 1 to the MuteOnOff address. | ||
+ | |||
+ | As usual, adjust the variable name of '' | ||
+ | |||
+ | ===== Reading Mute Values from the SigmaDSP ===== | ||
+ | Mute values are stored in decimal format (8.24 or 5.23), so use the SIGMA_READ_REGISTER_FLOAT function to get the current value. | ||
+ | <code cpp> | ||
+ | double mute_state = SIGMA_READ_REGISTER_FLOAT(MOD_MUTE1_ALG0_MUTEONOFF_ADDR); | ||
+ | if (mute_state == 1) { | ||
+ | | ||
+ | } | ||
+ | else if (mute_state == 0) { | ||
+ | | ||
+ | } | ||
+ | else { | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | ===== Writing Mute Values to the SigmaDSP ===== | ||
+ | To mute the output: | ||
+ | <code cpp> | ||
+ | SIGMA_WRITE_REGISTER_FLOAT(MOD_MUTE1_ALG0_MUTEONOFF_ADDR, | ||
+ | </ | ||
+ | |||
+ | To unmute the output: | ||
+ | <code cpp> | ||
+ | SIGMA_WRITE_REGISTER_FLOAT(MOD_MUTE1_ALG0_MUTEONOFF_ADDR, | ||
+ | </ |