<effect>
  <name>Solina</name>
  <enabled>true</enabled>
  <numIns>2</numIns>
  <numOuts>2</numOuts>
  <code>if (&lt;SolinaON&gt; == 1) then

    aout1 solina_chorus ain1, &lt;Solina_freq1&gt;, &lt;Solina_amp1&gt;, &lt;Solina_freq2&gt;, &lt;Solina_amp2&gt;
    aout2 solina_chorus ain2, &lt;Solina_freq1&gt;, &lt;Solina_amp1&gt;, &lt;Solina_freq2&gt;, &lt;Solina_amp2&gt;
    aout1   ntrpol    ain1, aout1*1.2, &lt;Solina_mix&gt;                             ; create a dry/wet mix
    aout2   ntrpol    ain2, aout2*1.2, &lt;Solina_mix&gt; 

else

    aout1   =   ain1
    aout2   =   ain2

endif
</code>
  <comments>
DESCRIPTION:

Solina Chorus, based on Solina String Ensemble Chorus Module
  
   based on:
   J. Haible: Triple Chorus
   http://jhaible.com/legacy/triple_chorus/triple_chorus.html
   Hugo Portillo: Solina-V String Ensemble
   http://www.native-instruments.com/en/reaktor-community/reaktor-user-library/entry/show/4525/ 
   Parabola tabled shape borrowed from Iain McCurdy delayStereoChorus.csd:
   http://iainmccurdy.org/CsoundRealtimeExamples/Delays/delayStereoChorus.csd
   Author: Steven Yi
   Date: 2016.05.22


CONTROLLERS:

ON/OFF          -       bypass
freq1/2         -       frequency 1 and 2 of LFOs
amp1/2          -       amount of gain of the LFOs
mix             -       mix direct signal with effect

---

version 1.01, July 2020
- added BSB information comments

version 1.0, Juin 2020
- initial version by Menno Knevel
- slightly adapted code from UDOs by Steven Yi (2016)</comments>
  <opcodeList>
    <udo>
      <opcodeName>sol_lfo_3</opcodeName>
      <outTypes>aaa</outTypes>
      <inTypes>kk</inTypes>
      <codeBody>kfreq, kamp xin

isolina_parabola ftgen 0, 0, 65537, 19, 0.5, 1, 180, 1 

  aphs phasor kfreq

  a0   tablei   aphs, isolina_parabola, 1, 0, 1
  a120 tablei   aphs, isolina_parabola, 1, 0.333, 1
  a240 tablei   aphs, isolina_parabola, 1, -0.333, 1

  xout (a0 * kamp), (a120 * kamp), (a240 * kamp)</codeBody>
      <comments></comments>
    </udo>
    <udo>
      <opcodeName>solina_chorus</opcodeName>
      <outTypes>a</outTypes>
      <inTypes>akkkk</inTypes>
      <codeBody>  aLeft, klfo_freq1, klfo_amp1, klfo_freq2, klfo_amp2 xin

  imax = 100

  ;; slow lfo
  as1, as2, as3 sol_lfo_3 klfo_freq1, klfo_amp1

  ;; fast lfo
  af1, af2, af3  sol_lfo_3 klfo_freq2, klfo_amp2

  at1 = limit(as1 + af1 + 5, 0.0, imax)
  at2 = limit(as2 + af2 + 5, 0.0, imax)
  at3 = limit(as3 + af3 + 5, 0.0, imax)
    
  a1 vdelay3 aLeft, at1, imax 
  a2 vdelay3 aLeft, at2, imax 
  a3 vdelay3 aLeft, at3, imax 

  xout (a1 + a2 + a3) / 3</codeBody>
      <comments></comments>
    </udo>
  </opcodeList>
  <graphicInterface editEnabled='false'>
    <gridSettings>
      <width>10</width>
      <height>2</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>SolinaON</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>ReverbSC</groupName>
        <backgroundColor>0x4d8080ff</backgroundColor>
        <borderColor>0x000000ff</borderColor>
        <labelTextColor>0xffffffff</labelTextColor>
        <titleEnabled>false</titleEnabled>
        <width>170</width>
        <height>20</height>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
          <objectName>Solina_amp2</objectName>
          <x>160</x>
          <y>20</y>
          <comment>amount of gain of the LFO 2</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>0.6</value>
          <sliderHeight>60</sliderHeight>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>160</x>
          <y>10</y>
          <label>amp 2</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
          <objectName>Solina_amp1</objectName>
          <x>60</x>
          <y>20</y>
          <comment>amount of gain of the LFO 1</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <bdresolution>0.01</bdresolution>
          <value>0.5</value>
          <sliderHeight>60</sliderHeight>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>Solina_freq2</objectName>
          <x>110</x>
          <y>10</y>
          <comment>frequency 2 of LFOs</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>10.0</maximum>
          <value>1.7000000000000002</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>freq 2</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
          <objectName>Solina_freq1</objectName>
          <x>10</x>
          <y>10</y>
          <comment>frequency 1 of LFOs</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>10.0</maximum>
          <value>0.18</value>
          <knobWidth>40</knobWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
          <label>freq 1</label>
          <labelEnabled>true</labelEnabled>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>Solina_mix</objectName>
          <x>10</x>
          <y>84</y>
          <comment>mix direct signal with effect</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>0.0</minimum>
          <maximum>1.0</maximum>
          <bdresolution>0.1</bdresolution>
          <value>1.0</value>
          <sliderWidth>190</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>90</x>
          <y>80</y>
          <label>mix</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>60</x>
          <y>10</y>
          <label>amp 1</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
      </bsbObject>
    </bsbObject>
  </graphicInterface>
  <parameterList>
    <parameter uniqueId='1862606553' name='Solina_amp2' label='' min='0.0' max='1.0' bdresolution='0.01' automationEnabled='false' value='0.6'>
      <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.6'/>
      </line>
    </parameter>
    <parameter uniqueId='1862606555' name='Solina_mix' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='false' value='1.0'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='1862606557' name='Solina_freq1' label='' min='0.0' max='10.0' bdresolution='-1' automationEnabled='false' value='0.18'>
      <line name='' version='2' max='10.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.18'/>
      </line>
    </parameter>
    <parameter uniqueId='1862606559' name='Solina_amp1' label='' min='0.0' max='1.0' bdresolution='0.01' automationEnabled='false' value='0.5'>
      <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.5'/>
      </line>
    </parameter>
    <parameter uniqueId='1862606561' name='Solina_freq2' label='' min='0.0' max='10.0' bdresolution='-1' automationEnabled='false' value='1.7000000000000002'>
      <line name='' version='2' max='10.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.7000000000000002'/>
      </line>
    </parameter>
    <parameter uniqueId='1862606563' name='SolinaON' 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>
  </parameterList>
</effect>