<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
  <name>b64 - v1.1</name>
  <comment>b64
version 1.1
Released: 2008.02.04
Author: Steven Yi

This instrument is inspired by the SID sound chip commonly used in Commodore 64 computers, using simliar waveforms and options for ring modulation. 

[History]

v1.1 - 2008.02.04
-Fixed Triangle wave not being generated
-Added use of pan_gm2 for panning
-Added automatable pan knob to interface

v1.0 - 2007.12.14
-initial release</comment>
  <globalOrc>
</globalOrc>
  <globalSco>


</globalSco>
  <instrumentText>if (&lt;sustain&gt; &gt; 0) then
	p3 = p3 + &lt;release&gt;
else 
	p3 = &lt;attack&gt; + &lt;decay&gt;
endif

ipch getFrequency p4
iamp = ampdb(p5)

kenv adsr  &lt;attack&gt;, &lt;decay&gt;, &lt;sustain&gt;, &lt;release&gt;

aout1 	multiOscil &lt;waveform1&gt;, ipch * &lt;freqMultiply1&gt;, &lt;pulseWidth1&gt;
aout2 	multiOscil &lt;waveform2&gt;, ipch * &lt;freqMultiply2&gt;, &lt;pulseWidth2&gt;
aout3 	multiOscil &lt;waveform3&gt;, ipch * &lt;freqMultiply3&gt;, &lt;pulseWidth3&gt;

aout1 	simpleMultiFilter	aout1 * &lt;amp1&gt;, &lt;filterType1&gt;, &lt;filterFreq1&gt;, &lt;filterBandwidth1&gt;
aout2 	simpleMultiFilter	aout2 * &lt;amp2&gt;, &lt;filterType2&gt;, &lt;filterFreq2&gt;, &lt;filterBandwidth2&gt;
aout3 	simpleMultiFilter	aout3 * &lt;amp3&gt;, &lt;filterType3&gt;, &lt;filterFreq3&gt;, &lt;filterBandwidth3&gt;

aout = 0

if (&lt;ringmod1&gt; == 1) then
	atemp = aout1 * aout3
	aout = atemp
else
	aout = aout1
endif

if (&lt;ringmod2&gt; == 1) then
	atemp = aout2 * aout1
	aout = aout + atemp
else
	aout = aout + aout2
endif


if (&lt;ringmod3&gt; == 1) then
	atemp = aout3 * aout2
	aout = aout + atemp
else
	aout = aout + aout3
endif

aout = aout * kenv * iamp

aLeft, aRight	pan_gm2	aout, &lt;pan&gt;

blueMixerOut aLeft, aRight</instrumentText>
  <graphicInterface editEnabled='true'>
    <uniqueNameManager nameIndex='21' defaultPrefix='bsbObj'/>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
      <objectName>ringmod1</objectName>
      <x>389</x>
      <y>58</y>
      <label>Ring Modulation</label>
      <selected>false</selected>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
      <objectName>ringmod2</objectName>
      <x>389</x>
      <y>202</y>
      <label>Ring Modulation</label>
      <selected>false</selected>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
      <objectName>ringmod3</objectName>
      <x>388</x>
      <y>350</y>
      <label>Ring Modulation</label>
      <selected>false</selected>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>decay</objectName>
      <x>615</x>
      <y>104</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.025</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>sustain</objectName>
      <x>668</x>
      <y>104</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.9320919</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>release</objectName>
      <x>721</x>
      <y>104</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>10.0</maximum>
      <value>0.15</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>attack</objectName>
      <x>562</x>
      <y>104</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>10.0</maximum>
      <value>0.025</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>566</x>
      <y>85</y>
      <label>Attack</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>619</x>
      <y>85</y>
      <label>Decay</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>669</x>
      <y>85</y>
      <label>Sustain</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>722</x>
      <y>85</y>
      <label>Release</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>565</x>
      <y>55</y>
      <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;Amp Env&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>amp2</objectName>
      <x>410</x>
      <y>258</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.75279456</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>419</x>
      <y>239</y>
      <label>Amp</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>amp1</objectName>
      <x>410</x>
      <y>110</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>1.0</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>419</x>
      <y>89</y>
      <label>Amp</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>amp3</objectName>
      <x>410</x>
      <y>404</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.342383</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>419</x>
      <y>385</y>
      <label>Amp</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>13</x>
      <y>11</y>
      <label>&lt;html&gt;&lt;font size=&quot;+3&quot;&gt;&lt;b&gt;b64&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>pan</objectName>
      <x>562</x>
      <y>230</y>
      <automationAllowed>true</automationAllowed>
      <minimum>-1.0</minimum>
      <maximum>1.0</maximum>
      <value>0.0</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>575</x>
      <y>200</y>
      <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;Pan&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>waveform1</objectName>
      <x>74</x>
      <y>60</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>2</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw</name>
          <value>3</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Pulse</name>
          <value>4</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw-Pulse</name>
          <value>5</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw-Pulse</name>
          <value>6</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Noise</name>
          <value>7</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>3</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>filterType1</objectName>
      <x>243</x>
      <y>59</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>No Filter</name>
          <value>-1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Low Pass</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>High Pass</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Band Pass</name>
          <value>2</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>1</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>waveform2</objectName>
      <x>76</x>
      <y>202</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>2</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw</name>
          <value>3</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Pulse</name>
          <value>4</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw-Pulse</name>
          <value>5</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw-Pulse</name>
          <value>6</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Noise</name>
          <value>7</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>3</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>16</x>
      <y>61</y>
      <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;Osc 1&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>17</x>
      <y>202</y>
      <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;Osc 2&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>20</x>
      <y>352</y>
      <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;Osc 3&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>waveform3</objectName>
      <x>79</x>
      <y>352</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>2</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw</name>
          <value>3</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Pulse</name>
          <value>4</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw-Pulse</name>
          <value>5</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Tri-Saw-Pulse</name>
          <value>6</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Noise</name>
          <value>7</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>6</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>freqMultiply3</objectName>
      <x>89</x>
      <y>404</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>8.0</maximum>
      <value>4.3661346</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>freqMultiply2</objectName>
      <x>92</x>
      <y>258</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>8.0</maximum>
      <value>2.0799</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>freqMultiply1</objectName>
      <x>87</x>
      <y>110</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>8.0</maximum>
      <value>1.0</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>filterType2</objectName>
      <x>243</x>
      <y>202</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>No Filter</name>
          <value>-1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Low Pass</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>High Pass</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Band Pass</name>
          <value>2</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>3</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>filterType3</objectName>
      <x>243</x>
      <y>351</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>No Filter</name>
          <value>-1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Low Pass</name>
          <value>0</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>High Pass</name>
          <value>1</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Band Pass</name>
          <value>2</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>1</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>75</x>
      <y>89</y>
      <label>Freq Multiply</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>78</x>
      <y>239</y>
      <label>Freq Multiply</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>81</x>
      <y>385</y>
      <label>Freq Multiply</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterFreq1</objectName>
      <x>247</x>
      <y>110</y>
      <automationAllowed>true</automationAllowed>
      <minimum>20.0</minimum>
      <maximum>10000.0</maximum>
      <value>5553.636</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterBandwidth1</objectName>
      <x>303</x>
      <y>110</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>1000.0</maximum>
      <value>259.06876</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterFreq2</objectName>
      <x>245</x>
      <y>258</y>
      <automationAllowed>true</automationAllowed>
      <minimum>20.0</minimum>
      <maximum>10000.0</maximum>
      <value>3352.252</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterBandwidth2</objectName>
      <x>301</x>
      <y>258</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>1000.0</maximum>
      <value>333.70627</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterFreq3</objectName>
      <x>247</x>
      <y>404</y>
      <automationAllowed>true</automationAllowed>
      <minimum>20.0</minimum>
      <maximum>10000.0</maximum>
      <value>1829.2126</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>filterBandwidth3</objectName>
      <x>303</x>
      <y>404</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.01</minimum>
      <maximum>1000.0</maximum>
      <value>259.06876</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>259</x>
      <y>385</y>
      <label>Freq</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>300</x>
      <y>385</y>
      <label>Bandwidth</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>256</x>
      <y>239</y>
      <label>Freq</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>297</x>
      <y>239</y>
      <label>Bandwidth</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>258</x>
      <y>89</y>
      <label>Freq</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>299</x>
      <y>89</y>
      <label>Bandwidth</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>157</x>
      <y>89</y>
      <label>Pulse Width</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>pulseWidth1</objectName>
      <x>166</x>
      <y>110</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.011042413</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>pulseWidth2</objectName>
      <x>171</x>
      <y>258</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.21877983</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>163</x>
      <y>239</y>
      <label>Pulse Width</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>pulseWidth3</objectName>
      <x>171</x>
      <y>404</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.42848733</value>
      <knobWidth>50</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>166</x>
      <y>385</y>
      <label>Pulse Width</label>
    </bsbObject>
  </graphicInterface>
  <bsbParameterList>
    <parameter uniqueId='1367083620' name='amp1' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083618' name='amp2' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.75279456'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083622' name='amp3' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.342383'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083616' name='attack' label='' min='0.0' max='10.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.025'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083610' name='decay' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.025'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380545' name='filterBandwidth1' label='' min='0.01' max='1000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1000.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='259.06876'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380541' name='filterBandwidth2' label='' min='0.01' max='1000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1000.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='333.70627'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380537' name='filterBandwidth3' label='' min='0.01' max='1000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1000.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='259.06876'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380547' name='filterFreq1' label='' min='20.0' max='10000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10000.0' min='20.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='5553.636'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380543' name='filterFreq2' label='' min='20.0' max='10000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10000.0' min='20.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='3352.252'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380539' name='filterFreq3' label='' min='20.0' max='10000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10000.0' min='20.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='1829.2126'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380549' name='freqMultiply1' label='' min='0.01' max='8.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='8.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='1.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380551' name='freqMultiply2' label='' min='0.01' max='8.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='8.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='2.0799'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380553' name='freqMultiply3' label='' min='0.01' max='8.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='8.0' min='0.01' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='4.3661346'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380555' name='pan' label='' min='-1.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='-1.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.0'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380535' name='pulseWidth1' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.011042413'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380533' name='pulseWidth2' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.21877983'/>
      </line>
    </parameter>
    <parameter uniqueId='-397380531' name='pulseWidth3' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.42848733'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083614' name='release' label='' min='0.0' max='10.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.15'/>
      </line>
    </parameter>
    <parameter uniqueId='1367083612' name='sustain' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='0.9320919'/>
      </line>
    </parameter>
  </bsbParameterList>
  <presetGroup name='Presets'/>
  <opcodeList>
    <udo>
      <opcodeName>getFrequency</opcodeName>
      <outTypes>i</outTypes>
      <inTypes>i</inTypes>
      <codeBody>ipch 	xin

iout	= (ipch &lt; 15 ? cpspch(ipch) : ipch)
	
	xout	iout
</codeBody>
      <comments></comments>
    </udo>
    <udo>
      <opcodeName>simpleMultiFilter</opcodeName>
      <outTypes>a</outTypes>
      <inTypes>aikk</inTypes>
      <codeBody>ain, itype, kfreq, kbandwidth xin

if (itype &lt; 0) then
	aout = ain
elseif (itype == 0) then
	aout butterlp ain, kfreq
elseif (itype == 1) then
	aout butterhp ain, kfreq
elseif (itype == 2) then
	aout butterbp ain, kfreq, kbandwidth
endif

xout aout</codeBody>
      <comments></comments>
    </udo>
    <udo>
      <opcodeName>pan_gm2</opcodeName>
      <outTypes>aa</outTypes>
      <inTypes>ak</inTypes>
      <codeBody>ain, kspace xin

klast init -2
kleft init 0
kright init 0

;from MIDI GM-2 Default Pan Curve (RP-036)
;Left Channel Gain [dB] = 20*log (cos (Pi/2* max(0,CC#10 ? 1)/126)
;Right Channel Gain [dB] = 20*log (sin (Pi /2* max(0,CC#10 ? 1)/126)

if (kspace != klast) then
 kpercent = (kspace + 1) / 2
 kleft = ampdb(20 * log(cos($M_PI_2 * kpercent)))
 kright = (kpercent == 0) ? 0 : ampdb(20 * log(sin($M_PI_2 * kpercent)))
endif

aleft = ain * kleft
aright = ain * kright

xout aleft, aright</codeBody>
      <comments></comments>
    </udo>
    <udo>
      <opcodeName>multiOscil</opcodeName>
      <outTypes>a</outTypes>
      <inTypes>ikk</inTypes>
      <codeBody>iwaveform, kpch, kpulsewidth xin

aout = 0
kcount = 0

if (iwaveform == 7) then
	aout 	noise 1, 0
	kcount = 1
endif

if (iwaveform == 0 || iwaveform == 3 || iwaveform == 4 || iwaveform == 6) then
	aout 	vco2 	1, kpch, 12

	kcount = 1
endif

if (iwaveform == 1 || iwaveform == 3 || iwaveform == 6) then
	atemp 	vco2 	1, kpch, 0
	aout = aout + atemp
	kcount = kcount + 1
endif

if (iwaveform == 2 || iwaveform == 4 || iwaveform == 5 || iwaveform == 6) then
	atemp 	vco2 	1, kpch, 2, kpulsewidth
	aout = aout + atemp
	kcount = kcount + 1
endif

aout = aout / kcount

xout aout</codeBody>
      <comments></comments>
    </udo>
  </opcodeList>
</instrument>