<effect>
  <name>diodeRing</name>
  <enabled>true</enabled>
  <numIns>2</numIns>
  <numOuts>2</numOuts>
  <code>if (&lt;diodeRingON&gt; == 1) then
    ;aout diode_ringmode ain, kfreq, kdiode=0, kfeedback=0, knonlinear=0, koversample=0
    aout1 diode_ringmod ain1, &lt;diodeRing_frequency&gt;, &lt;diodeRing_diode&gt;, &lt;diodeRing_feedback&gt;, &lt;diodeRing_linearity&gt;, 1
    aout2 diode_ringmod ain2, &lt;diodeRing_frequency&gt;, &lt;diodeRing_diode&gt;, &lt;diodeRing_feedback&gt;, &lt;diodeRing_linearity&gt;, 1

    aout1   ntrpol    ain1, aout1, &lt;diodeRing_mix&gt;                                   ; create a dry/wet mix
    aout2   ntrpol    ain2, aout2, &lt;diodeRing_mix&gt; 
else
    aout1   =   ain1
    aout2   =   ain2
endif</code>
  <comments>The opcode diode_ringmod is not part of the official Csound ditribution, but is a Csound-plugin. It can be found here: https://github.com/csound-plugins/csound-plugins
(The Blue effect is grey to reflect the status)
Please build the plugins yourself in order to use this effect!


DESCRIPTION:

diode_ringmod is a ring modulator with optional non-linearities. It implements a built-in sinusoidal carrier signal. 
The carrier is passed through a diode simulation prior to being multiplied with the input. This signal passes through a feedback stage.


CONTROLLERS:

ON/OFF          -       bypass
Frequency       -       the carrier&apos;s frequency (a sine wave) 
Feedback        -       the amount of feedback
Linearity       -       the amount of non linearities
diode           -       if on, the carrier is passed through a diode rectification stage
mix             -       mix direct signal with effect

---

version 1.02, July 2020
- added BSB information comments

version 1.01, May 2020
- added comments on controllers

version 1.0, September 2019
- initial version by Menno Knevel</comments>
  <opcodeList/>
  <graphicInterface editEnabled='false'>
    <gridSettings>
      <width>5</width>
      <height>5</height>
      <gridStyle>DOT</gridStyle>
      <snapGridEnabled>true</snapGridEnabled>
    </gridSettings>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
      <objectName></objectName>
      <x>0</x>
      <y>0</y>
      <groupName>Group</groupName>
      <backgroundColor>0x00000033</backgroundColor>
      <borderColor>0x000000ff</borderColor>
      <labelTextColor>0xffffffff</labelTextColor>
      <titleEnabled>true</titleEnabled>
      <width>20</width>
      <height>20</height>
      <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
        <objectName>diodeRingON</objectName>
        <x>0</x>
        <y>0</y>
        <comment>bypass</comment>
        <automationAllowed>true</automationAllowed>
        <label/>
        <selected>true</selected>
        <randomizable>true</randomizable>
      </bsbObject>
      <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
        <objectName></objectName>
        <x>10</x>
        <y>10</y>
        <groupName>Group</groupName>
        <backgroundColor>0x666666ff</backgroundColor>
        <borderColor>0x000000ff</borderColor>
        <labelTextColor>0xffffffff</labelTextColor>
        <titleEnabled>false</titleEnabled>
        <width>20</width>
        <height>20</height>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>diodeRing_frequency</objectName>
          <x>10</x>
          <y>10</y>
          <comment>the carrier&apos;s frequency (a sine wave) </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.1</minimum>
          <maximum>10000.0</maximum>
          <value>1100.089</value>
          <knobWidth>60</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>frequency</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>diodeRing_feedback</objectName>
          <x>80</x>
          <y>10</y>
          <comment>the amount of feedback</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <value>0.15</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>feedback</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>200</x>
          <y>10</y>
          <label>mix</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>diodeRing_linearity</objectName>
          <x>140</x>
          <y>10</y>
          <comment>the amount of non linearities</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <value>0.66</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>linearity</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
          <objectName>diodeRing_diode</objectName>
          <x>85</x>
          <y>85</y>
          <comment>if on, the carrier is passed through a diode rectification stage</comment>
          <automationAllowed>true</automationAllowed>
          <label>diode</label>
          <selected>true</selected>
          <randomizable>true</randomizable>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
          <objectName>diodeRing_mix</objectName>
          <x>200</x>
          <y>25</y>
          <comment>mix direct signal with effect</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>0.58</value>
          <sliderHeight>50</sliderHeight>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
      </bsbObject>
    </bsbObject>
  </graphicInterface>
  <parameterList>
    <parameter uniqueId='362816979' name='diodeRingON' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='1.0'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='362816981' name='diodeRing_diode' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='1.0'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='362816983' name='diodeRing_linearity' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.66'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.66'/>
      </line>
    </parameter>
    <parameter uniqueId='362816985' name='diodeRing_mix' label='' min='0.0' max='1.0' bdresolution='0.01' automationEnabled='false' value='0.58'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.58'/>
      </line>
    </parameter>
    <parameter uniqueId='362816987' name='diodeRing_feedback' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.15'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.15'/>
      </line>
    </parameter>
    <parameter uniqueId='362816989' name='diodeRing_frequency' label='' min='0.1' max='10000.0' bdresolution='-1' automationEnabled='false' value='1100.089'>
      <line name='' version='2' max='10000.0' min='0.1' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1100.089'/>
      </line>
    </parameter>
  </parameterList>
</effect>