<effect>
  <name>cutit!</name>
  <enabled>true</enabled>
  <numIns>2</numIns>
  <numOuts>2</numOuts>
  <code>if (&lt;cutit!ON&gt; == 1) then
	kSwitch	changed		&lt;cutit!_beats per second&gt;, &lt;cutit!_subdivision&gt;, &lt;cutit!_barlength&gt;, &lt;cutit!_phrasebars&gt;, &lt;cutit!_number of repeats&gt;, &lt;cutit!_curves&gt;  	;GENERATE A MOMENTARY &apos;1&apos; PULSE IN OUTPUT &apos;kSwitch&apos; IF ANY OF THE SCANNED INPUT VARIABLES CHANGE. (OUTPUT &apos;kSwitch&apos; IS NORMALLY ZERO)
	if	kSwitch=1	then		;IF I-RATE VARIABLE CHANGE TRIGGER IS &apos;1&apos;...
		reinit	STARTCUT			;BEGIN A REINITIALISATION PASS FROM LABEL &apos;UPDATE&apos;
	endif

    STARTCUT:
    aout1 bbcutm ain1, i(&lt;cutit!_beats per second&gt;), i(&lt;cutit!_subdivision&gt;), i(&lt;cutit!_barlength&gt;), i(&lt;cutit!_phrasebars&gt;), i(&lt;cutit!_number of repeats&gt;), 1, 0, i(&lt;cutit!_curves&gt;)
    aout2 bbcutm ain2, i(&lt;cutit!_beats per second&gt;), i(&lt;cutit!_subdivision&gt;), i(&lt;cutit!_barlength&gt;), i(&lt;cutit!_phrasebars&gt;), i(&lt;cutit!_number of repeats&gt;), 1, 0, i(&lt;cutit!_curves&gt;)

    aout1       ntrpol  aout1, ain1, &lt;cutit!_mix&gt;
    aout2       ntrpol  aout2, ain2, &lt;cutit!_mix&gt;
else
    aout1  =   ain1
    aout2  =   ain2
endif
</code>
  <comments>DESCRIPTION:

cutit! chops the incoming signal into bits. It is a wrapper of the bbcut opcode but the values can be changed while playing.


CONTROLLERS:

ON/OFF          -       bypass
beats per sec.  -       Tempo to cut at, in beats per second
subdivision     -       Subdivisions unit, for a bar. So 8 is eighth notes (of a 4/4 bar)
barlength       -       How many beats per bar. Set to 4 for default 4/4 bar behaviour
phrasebars      -       The output cuts are generated in phrases, each phrase is up to iphrasebars long
# repeats       -       in normal use the algorithm would allow up to one additional repeat of a given cut at a time. This parameter allows that to be changed. Value 1 is normal- up to one extra repeat. 0 would avoid repeating, and you would always get back the original source except for enveloping and stuttering.
Dropdown List   -       envelope of cuts, ie. exponential or rectangular
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, July 2019
- initial version by Menno Knevel
</comments>
  <opcodeList/>
  <graphicInterface editEnabled='false'>
    <gridSettings>
      <width>10</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.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>cutit!_number of repeats</objectName>
          <x>10</x>
          <y>130</y>
          <comment>in normal use the algorithm would allow up to one additional repeat of a given cut at a time. This parameter allows that to be changed. Value 1 is normal- up to one extra repeat. 0 would avoid repeating, and you would always get back the original source except for enveloping and stuttering.</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>1.0</minimum>
          <maximum>32.0</maximum>
          <bdresolution>1</bdresolution>
          <value>8.0</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>220</x>
          <y>110</y>
          <label>phrasebars</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>220</x>
          <y>20</y>
          <label>beats per sec.</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>cutit!_phrasebars</objectName>
          <x>10</x>
          <y>100</y>
          <comment>The output cuts are generated in phrases, each phrase is up to iphrasebars long</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>1.0</minimum>
          <maximum>8.0</maximum>
          <bdresolution>1</bdresolution>
          <value>1.0</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>270</x>
          <y>175</y>
          <label>mix</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>cutit!_subdivision</objectName>
          <x>10</x>
          <y>40</y>
          <comment>Subdivisions unit, for a bar. So 8 is eighth notes (of a 4/4 bar)</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>1.0</minimum>
          <maximum>32.0</maximum>
          <bdresolution>1</bdresolution>
          <value>8.0</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>cutit!_mix</objectName>
          <x>220</x>
          <y>170</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.0</value>
          <sliderWidth>50</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>false</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown' version='2'>
          <objectName>cutit!_curves</objectName>
          <x>10</x>
          <y>170</y>
          <comment>envelope of cuts, ie. exponential or rectangular</comment>
          <automationAllowed>true</automationAllowed>
          <selectedIndex>0</selectedIndex>
          <fontSize>12</fontSize>
          <randomizable>true</randomizable>
          <bsbDropdownItemList>
            <bsbDropdownItem uniqueId='-1190650170'>
              <name>exponential curves   </name>
              <value>0</value>
            </bsbDropdownItem>
            <bsbDropdownItem uniqueId='-1190650169'>
              <name>rectangular curves</name>
              <value>1</value>
            </bsbDropdownItem>
          </bsbDropdownItemList>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>220</x>
          <y>80</y>
          <label>barlength</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>220</x>
          <y>140</y>
          <label># repeats</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>cutit!_beats per second</objectName>
          <x>10</x>
          <y>10</y>
          <comment>Tempo to cut at, in beats per second</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>1.0</minimum>
          <maximum>32.0</maximum>
          <bdresolution>1</bdresolution>
          <value>16.0</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
          <objectName>cutit!_barlength</objectName>
          <x>10</x>
          <y>70</y>
          <comment>How many beats per bar. Set to 4 for default 4/4 bar behaviour</comment>
          <automationAllowed>true</automationAllowed>
          <minimum>1.0</minimum>
          <maximum>16.0</maximum>
          <bdresolution>1</bdresolution>
          <value>4.0</value>
          <sliderWidth>150</sliderWidth>
          <randomizable>true</randomizable>
          <valueDisplayEnabled>true</valueDisplayEnabled>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>220</x>
          <y>50</y>
          <label>subdivision</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
      </bsbObject>
      <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
        <objectName>cutit!ON</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='-1190650167' name='cutit!_subdivision' label='' min='1.0' max='32.0' bdresolution='1' automationEnabled='false' value='8.0'>
      <line name='' version='2' max='32.0' min='1.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='8.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650165' name='cutit!_number of repeats' label='' min='1.0' max='32.0' bdresolution='1' automationEnabled='false' value='8.0'>
      <line name='' version='2' max='32.0' min='1.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='8.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650163' name='cutit!_phrasebars' label='' min='1.0' max='8.0' bdresolution='1' automationEnabled='false' value='1.0'>
      <line name='' version='2' max='8.0' min='1.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650161' name='cutit!_curves' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='0.0'>
      <line name='' version='2' max='1.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650159' name='cutit!_barlength' label='' min='1.0' max='16.0' bdresolution='1' automationEnabled='false' value='4.0'>
      <line name='' version='2' max='16.0' min='1.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='4.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650157' name='cutit!_mix' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='false' value='0.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='0.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650155' name='cutit!_beats per second' label='' min='1.0' max='32.0' bdresolution='1' automationEnabled='false' value='16.0'>
      <line name='' version='2' max='32.0' min='1.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='16.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-1190650153' name='cutit!ON' 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>