<soundObject type='blue.soundObject.Sound'>
  <subjectiveDuration>5.031134259259257</subjectiveDuration>
  <startTime>29.635532407407407</startTime>
  <name>ATS Player Xtended</name>
  <backgroundColor>-3355648</backgroundColor>
  <instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
    <name>untitled</name>
    <comment></comment>
    <globalOrc/>
    <globalSco>f 1 0 16384 10 1</globalSco>
    <instrumentText>inp     ATSinfo &lt;ats_file&gt;, 3
id      ATSinfo &lt;ats_file&gt;, 7
inoise      ATSinfo &lt;ats_file&gt;, 8

;formula = offset + npartials*incr 

ipartialoffset      =   int(inp * i(&lt;partial offset&gt;))
ipartialincr        =   i(&lt;partial increment&gt;)
inoisebands         =   i(&lt;noisebands&gt;)
inoisebandoffset    =   i(&lt;noiseband offset&gt;)
inoisebandincr      =   i(&lt;noiseband increment&gt;)

if int(inp * i(&lt;partials&gt;) - inp * i(&lt;partial offset&gt;)) / i(&lt;partial increment&gt;) &lt; 1 then
    prints &quot;\n\nbalance between partials, offset and increment is not correct!!\n&quot;
    prints  &quot;ATS file contains %d partials.\n&quot;, inp
    aoutSIN =   0
else
    aoutSIN  ATSadd &lt;time pointer&gt; * id, &lt;frequency transposition&gt;, &lt;ats_file&gt;, 1, \
    int((inp * i(&lt;partials&gt;) - ipartialoffset) / ipartialincr), ipartialoffset, ipartialincr
endif

if inoise == 3 || inoise == 4 then                                              ; lets make some noise!
    aoutNZ    ATSaddnz &lt;time pointer&gt; * id, &lt;ats_file&gt;, (inoisebands - inoisebandoffset) / inoisebandincr , inoisebandoffset, inoisebandincr
else
    prints &quot;\nno noise is present in this ATS file.\n\n&quot;
    aoutNZ  =   0
endif

aout ntrpol aoutSIN, aoutNZ, &lt;mix&gt;

aL, aR 	pan2	 aout, &lt;pan&gt;
aL  *=  &lt;volume&gt;
aR  *=  &lt;volume&gt;
blueMixerOut &quot;SubChannel1&quot;, aL ,aR</instrumentText>
    <alwaysOnInstrumentText></alwaysOnInstrumentText>
    <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.BSBGroup'>
          <objectName></objectName>
          <x>10</x>
          <y>10</y>
          <groupName>Group</groupName>
          <backgroundColor>0x999900ff</backgroundColor>
          <borderColor>0x000000ff</borderColor>
          <labelTextColor>0xffffffff</labelTextColor>
          <titleEnabled>false</titleEnabled>
          <width>20</width>
          <height>20</height>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
            <objectName></objectName>
            <x>630</x>
            <y>10</y>
            <groupName>residual components</groupName>
            <backgroundColor>0x999900ff</backgroundColor>
            <borderColor>0x000000ff</borderColor>
            <labelTextColor>0xffffffff</labelTextColor>
            <titleEnabled>true</titleEnabled>
            <width>20</width>
            <height>20</height>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>noisebands</objectName>
              <x>10</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>1.0</minimum>
              <maximum>25.0</maximum>
              <bdresolution>1</bdresolution>
              <value>25.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>125</x>
              <y>90</y>
              <label>incr.</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>noiseband increment</objectName>
              <x>110</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>1.0</minimum>
              <maximum>10.0</maximum>
              <bdresolution>1</bdresolution>
              <value>1.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>15</x>
              <y>90</y>
              <label>part %</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>noiseband offset</objectName>
              <x>60</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>24.0</maximum>
              <bdresolution>1</bdresolution>
              <value>0.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>65</x>
              <y>90</y>
              <label>offset %</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>200</x>
            <y>100</y>
            <label>noise</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
            <objectName>time pointer</objectName>
            <x>10</x>
            <y>70</y>
            <automationAllowed>true</automationAllowed>
            <minimum>0.0</minimum>
            <maximum>1.0</maximum>
            <value>1.0</value>
            <knobWidth>40</knobWidth>
            <randomizable>true</randomizable>
            <valueDisplayEnabled>true</valueDisplayEnabled>
            <label>time pointer</label>
            <labelEnabled>true</labelEnabled>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
            <objectName></objectName>
            <x>390</x>
            <y>10</y>
            <groupName>determenistic components</groupName>
            <backgroundColor>0x999900ff</backgroundColor>
            <borderColor>0x000000ff</borderColor>
            <labelTextColor>0xffffffff</labelTextColor>
            <titleEnabled>true</titleEnabled>
            <width>20</width>
            <height>20</height>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>partial increment</objectName>
              <x>110</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>1.0</minimum>
              <maximum>10.0</maximum>
              <bdresolution>1</bdresolution>
              <value>1.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>partial offset</objectName>
              <x>60</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>1.0</maximum>
              <bdresolution>0.01</bdresolution>
              <value>0.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
              <objectName>frequency transposition</objectName>
              <x>170</x>
              <y>20</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>5.0</maximum>
              <value>1.0</value>
              <knobWidth>40</knobWidth>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
              <label>transpose</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>20</x>
              <y>90</y>
              <label>part %</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>70</x>
              <y>90</y>
              <label>offset %</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>125</x>
              <y>90</y>
              <label>incr.</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>partials</objectName>
              <x>10</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>1.0</maximum>
              <bdresolution>0.05</bdresolution>
              <value>1.0</value>
              <sliderHeight>50</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>260</x>
            <y>85</y>
            <label>pan</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
            <objectName>volume</objectName>
            <x>345</x>
            <y>90</y>
            <automationAllowed>true</automationAllowed>
            <minimum>0.0</minimum>
            <maximum>5.0</maximum>
            <bdresolution>0.1</bdresolution>
            <value>2.8</value>
            <sliderHeight>50</sliderHeight>
            <randomizable>true</randomizable>
            <valueDisplayEnabled>false</valueDisplayEnabled>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>335</x>
            <y>75</y>
            <label>volume</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
            <objectName>mix</objectName>
            <x>130</x>
            <y>90</y>
            <automationAllowed>true</automationAllowed>
            <minimum>0.0</minimum>
            <maximum>1.0</maximum>
            <bdresolution>0.1</bdresolution>
            <value>0.1</value>
            <sliderWidth>70</sliderWidth>
            <randomizable>true</randomizable>
            <valueDisplayEnabled>false</valueDisplayEnabled>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
            <objectName></objectName>
            <x>10</x>
            <y>10</y>
            <groupName>ATS file</groupName>
            <backgroundColor>0x00000033</backgroundColor>
            <borderColor>0x000000ff</borderColor>
            <labelTextColor>0xffffffff</labelTextColor>
            <titleEnabled>true</titleEnabled>
            <width>20</width>
            <height>20</height>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBFileSelector'>
              <objectName>ats_file</objectName>
              <x>0</x>
              <y>0</y>
              <fileName>/home/menno/csound/Analyses/flute-A5.ats</fileName>
              <textFieldWidth>340</textFieldWidth>
              <stringChannelEnabled>true</stringChannelEnabled>
            </bsbObject>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>100</x>
            <y>100</y>
            <label>sines</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBHSlider' version='2'>
            <objectName>pan</objectName>
            <x>250</x>
            <y>90</y>
            <automationAllowed>true</automationAllowed>
            <minimum>0.0</minimum>
            <maximum>1.0</maximum>
            <bdresolution>0.1</bdresolution>
            <value>0.5</value>
            <sliderWidth>50</sliderWidth>
            <randomizable>true</randomizable>
            <valueDisplayEnabled>false</valueDisplayEnabled>
          </bsbObject>
        </bsbObject>
      </bsbObject>
    </graphicInterface>
    <parameterList>
      <parameter uniqueId='1501194581' name='time pointer' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='true' value='0.34624999999999995'>
        <line name='time pointer' version='2' max='1.0' min='0.0' bdresolution='-1' color='-23296' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='0.1797884841363102' y='0.7749160134378499'/>
          <linePoint x='0.2209165687426557' y='0.7290033594624861'/>
          <linePoint x='0.7579318448883666' y='0.23964165733482645'/>
          <linePoint x='1.0' y='1.0'/>
        </line>
      </parameter>
      <parameter uniqueId='1586952077' name='pan' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='true' value='0.5'>
        <line name='pan' version='2' max='1.0' min='0.0' bdresolution='-1' color='-16776961' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.5'/>
          <linePoint x='0.4821536600120992' y='0.8'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-2102355632' name='partial increment' label='' min='1.0' max='10.0' bdresolution='1' automationEnabled='false' value='1.0'>
        <line name='' version='2' max='10.0' min='1.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='1.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-2102355629' name='partial offset' label='' min='0.0' max='1.0' bdresolution='0.01' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-2102355626' name='partials' label='' min='0.0' max='1.0' bdresolution='0.05' automationEnabled='false' value='1.0'>
        <line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='1.0'/>
        </line>
      </parameter>
      <parameter uniqueId='556913595' name='volume' label='' min='0.0' max='5.0' bdresolution='0.1' automationEnabled='false' value='2.8'>
        <line name='' version='2' max='5.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='2.8'/>
        </line>
      </parameter>
      <parameter uniqueId='556913637' name='noiseband increment' label='' min='1.0' max='10.0' bdresolution='1' automationEnabled='false' value='1.0'>
        <line name='' version='2' max='10.0' min='1.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='1.0'/>
        </line>
      </parameter>
      <parameter uniqueId='556913640' name='noiseband offset' label='' min='0.0' max='24.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='24.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='556913643' name='noisebands' label='' min='1.0' max='25.0' bdresolution='1' automationEnabled='false' value='25.0'>
        <line name='' version='2' max='25.0' min='1.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='25.0'/>
        </line>
      </parameter>
      <parameter uniqueId='556913652' name='frequency transposition' label='' min='0.0' max='5.0' bdresolution='-1' automationEnabled='false' value='1.0'>
        <line name='' version='2' max='5.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='1.0'/>
        </line>
      </parameter>
      <parameter uniqueId='576680546' name='mix' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='true' value='0.9'>
        <line name='mix' version='2' max='1.0' min='0.0' bdresolution='-1' color='-14623488' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.06047032474804026'/>
          <linePoint x='0.19623971797884843' y='0.4949608062709966'/>
          <linePoint x='0.6192714453584018' y='1.0'/>
          <linePoint x='1.0' y='0.9'/>
        </line>
      </parameter>
    </parameterList>
    <presetGroup name='Presets'/>
    <opcodeList>
      <udo>
        <opcodeName>declick</opcodeName>
        <outTypes>a</outTypes>
        <inTypes>a</inTypes>
        <codeBody>
ain     xin
aenv    linseg 0, 0.01, 1, p3 - 0.03, 1, 0.02, 0, 0.01, 0
        xout ain * aenv         ; apply envelope and write output

</codeBody>
        <comments>declick - removes clicks from signal start and end

DESCRIPTION
Given a signal, it will DeClick will apply an envelope to it to ensure there is no clicking at the start or end of the sound

(Taken from the Csound Reference Manual)

SYNTAX
aout    declick    ain

INITIALIZATION
null

PERFORMANCE
ain - signal to declick
aout - declicked signal

CREDITS
Author: Istvan Varga</comments>
      </udo>
    </opcodeList>
  </instrument>
  <comment>;formula = offset + npartials*incr 
The ATS Player Xtended uses the 2 opcodes ATSadd and ATSnz.

version 1.0, April 2019

</comment>
</soundObject>