<effect>
  <name>harmony</name>
  <enabled>true</enabled>
  <numIns>2</numIns>
  <numOuts>2</numOuts>
  <code>if (&lt;harmonyON&gt; == 1) then
    iupdte  =   i(&lt;harmony_update&gt;)
    ilo     =   i(&lt;harmony_detection low&gt;)
    ihi     =   i(&lt;harmony_detection high&gt;)
    idbthresh = i(&lt;harmony_treshold&gt;)
    koct, kamp pitch ain1, iupdte, ilo, ihi, idbthresh, 24
    aout1   harmon4 ain1, koct, &lt;harmony_frequency_0&gt;, &lt;harmony_frequency_1&gt;, &lt;harmony_frequency_2&gt;, &lt;harmony_frequency_3&gt;, 0, 5;kfrq1, kfrq2, kfrq3, kfrq4, icpsmode, ilowest
    aout1   dcblock aout1
    aout2   harmon4 ain2, koct-0.001, &lt;harmony_frequency_0&gt;, &lt;harmony_frequency_1&gt;, &lt;harmony_frequency_2&gt;, &lt;harmony_frequency_3&gt;, 0, 5;kfrq1, kfrq2, kfrq3, kfrq4, icpsmode, ilowest
    aout2   dcblock aout2
    aout1 = (ain1 * &lt;harmony_wetdry&gt;) + (aout1 * (1 - &lt;harmony_wetdry&gt;))
    aout2 = (ain2 * &lt;harmony_wetdry&gt;) + (aout2 * (1 - &lt;harmony_wetdry&gt;))
else
    aout1   =   ain1
    aout2   =   ain2
endif</code>
  <comments>
DESCRIPTION:

stereo harmonizer, based on harmon4, with up to 2 x voices. Can be mixed with direct signal.


CONTROLLERS:

ON/OFF                  -       bypass
update                  -       pitch analyze update: length of period, in seconds, that outputs are updated
treshold                -       amplitude, expressed in decibels, necessary for the pitch to be detected
detection low/high      -       range in which pitch is detected
frequency 1/2/3/4       -       the 1st, 2nd, 3th, 4th generated frequency   
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, 2019
- initial version by Menno Knevel
</comments>
  <opcodeList/>
  <graphicInterface editEnabled='false'>
    <gridSettings>
      <width>10</width>
      <height>10</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.BSBGroup'>
        <objectName></objectName>
        <x>10</x>
        <y>10</y>
        <groupName>Group</groupName>
        <backgroundColor>0x4d8080ff</backgroundColor>
        <borderColor>0x000000ff</borderColor>
        <labelTextColor>0xffffffff</labelTextColor>
        <titleEnabled>false</titleEnabled>
        <width>20</width>
        <height>20</height>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>harmony_frequency_0</objectName>
          <x>10</x>
          <y>90</y>
          <comment>the 1st generated frequency </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>5.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>1.54</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>140</x>
          <y>0</y>
          <label>detection </label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>harmony_detection low</objectName>
          <x>120</x>
          <y>10</y>
          <comment>low boundary in which pitch is detected</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>3.0</minimum>
          <maximum>7.0</maximum>
          <value>4.12</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>low</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>harmony_frequency_1</objectName>
          <x>10</x>
          <y>120</y>
          <comment>the 2nd generated frequency </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>5.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>3.05</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>harmony_treshold</objectName>
          <x>60</x>
          <y>10</y>
          <comment>amplitude, expressed in decibels, necessary for the pitch to be detected</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>20.0</maximum>
          <value>8.8</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>treshold</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>harmony_update</objectName>
          <x>10</x>
          <y>10</y>
          <comment>pitch analyze update: length of period, in seconds, that outputs are updated</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.001</minimum>
          <maximum>0.25</maximum>
          <value>0.02092</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>update</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
          <objectName>harmony_wetdry</objectName>
          <x>210</x>
          <y>20</y>
          <comment>mix direct signal with effect  </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <bdresolution>0.1</bdresolution>
          <value>0.5</value>
          <sliderHeight>150</sliderHeight>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>harmony_detection high</objectName>
          <x>170</x>
          <y>10</y>
          <comment>high boundary in which pitch is detected</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>5.0</minimum>
          <maximum>11.0</maximum>
          <value>8.9</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>high</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>210</x>
          <y>10</y>
          <label>  mix</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>harmony_frequency_2</objectName>
          <x>10</x>
          <y>150</y>
          <comment>the 3th generated frequency </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>5.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>1.65</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>harmony_frequency_3</objectName>
          <x>10</x>
          <y>180</y>
          <comment>the 4th generated frequency </comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>5.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>2.46</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
      </bsbObject>
      <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
        <objectName>harmonyON</objectName>
        <x>0</x>
        <y>0</y>
        <comment>bypass</comment>
        <automationAllowed>true</automationAllowed>
        <label/>
        <selected>true</selected>
        <randomizable>true</randomizable>
      </bsbObject>
    </bsbObject>
  </graphicInterface>
  <parameterList>
    <parameter uniqueId='-63855330' name='harmony_detection low' label='' min='3.0' max='7.0' bdresolution='-1' automationEnabled='false' value='4.12'>
      <line name='' version='2' max='7.0' min='3.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='4.12'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855328' name='harmony_frequency_2' label='' min='0.0' max='5.0' bdresolution='0.01' automationEnabled='false' value='1.65'>
      <line name='' version='2' max='5.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.65'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855324' name='harmony_detection high' label='' min='5.0' max='11.0' bdresolution='-1' automationEnabled='false' value='8.9'>
      <line name='' version='2' max='11.0' min='5.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='8.9'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855322' name='harmony_frequency_1' label='' min='0.0' max='5.0' bdresolution='0.01' automationEnabled='false' value='3.05'>
      <line name='' version='2' max='5.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='3.05'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855320' name='harmony_treshold' label='' min='0.0' max='20.0' bdresolution='-1' automationEnabled='false' value='8.8'>
      <line name='' version='2' max='20.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='8.8'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855318' name='harmony_update' label='' min='0.001' max='0.25' bdresolution='-1' automationEnabled='false' value='0.02092'>
      <line name='' version='2' max='0.25' min='0.001' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.02092'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855316' name='harmony_frequency_0' label='' min='0.0' max='5.0' bdresolution='0.01' automationEnabled='false' value='1.54'>
      <line name='' version='2' max='5.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.54'/>
      </line>
    </parameter>
    <parameter uniqueId='-63855314' name='harmony_wetdry' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='false' value='0.5'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.5'/>
      </line>
    </parameter>
    <parameter uniqueId='-104104237' name='harmonyON' 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='-1883788952' name='harmony_frequency_3' label='' min='0.0' max='5.0' bdresolution='0.01' automationEnabled='false' value='2.46'>
      <line name='' version='2' max='5.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='2.46'/>
      </line>
    </parameter>
  </parameterList>
</effect>