Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
resources:tools-software:sigmastudio:toolbox:volumecontrols:mute [30 Jul 2012 23:05] – Created Brett Gildersleeveresources:tools-software:sigmastudio:toolbox:volumecontrols:mute [27 Jul 2020 16:56] (current) – Added example microcontroller code Joshua Berlin
Line 4: Line 4:
  
 **To Enable/Disable the mute:** **To Enable/Disable the mute:**
-Click the check boxthe signal is mutes when the box is checked.+Click the check boxthe signal is muted when the box is checked.
 \\ \\
 \\ \\
-The mute block include'Slew and Non-Slew type algorithms. Slew algorithms will smoothly transition the gain to zero, eliminating any click or pops, but require more system resources.+The mute block is available as a Slew or Non-Slew algorithm. 
 +The Slew version of the algorithm will smoothly transition the gain to its target value, eliminating any click or pops, but require more system resources.
 \\ \\
 \\ \\
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:tools-software:sigmastudio:tutorials:microcontroller|Interfacing SigmaDSP Processors with a Microcontroller]].
 +
 +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 ''MOD_MUTE1_ALG0_MUTEONOFF_ADDR'' to match your exported files.
 +
 +===== 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) {
 + Serial.println("System is Unmuted");
 +}
 +else if (mute_state == 0) {
 + Serial.println("System is Muted");
 +}
 +else {
 + Serial.println("Mute value is not 0 or 1");
 +}
 +</code>
 +===== Writing Mute Values to the SigmaDSP =====
 +To mute the output:
 +<code cpp>
 +SIGMA_WRITE_REGISTER_FLOAT(MOD_MUTE1_ALG0_MUTEONOFF_ADDR, 0);
 +</code>
 +
 +To unmute the output:
 +<code cpp>
 +SIGMA_WRITE_REGISTER_FLOAT(MOD_MUTE1_ALG0_MUTEONOFF_ADDR, 1);
 +</code>
resources/tools-software/sigmastudio/toolbox/volumecontrols/mute.txt · Last modified: 27 Jul 2020 16:56 by Joshua Berlin