<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
  <name>ModVanDerPol</name>
  <comment>;====================================================================
;
; 	Shaun&apos;s Modified Van Der Pol non-perturbative forced oscillator.
;	After E.Atlee Jackson, Perspectives on non-linear dynamics, Vol. I, 1991.
; 
;	x&apos; = - y + A * cos(?t)
;	y&apos; = x + ?*(1-x*x)*y
;
;
; Ignasi Alvarez, 1998.
; rev. 2005
;
; p4 = difrerencial de ? per polifon?a.
; p5 = &quot;inversi? de fase&quot; (+1, -1)
;
;====================================================================
</comment>
  <globalOrc/>
  <globalSco/>
  <instrumentText>; p4 - frequency addition
; p5 - panning

ifreq = p4
ipanL	=	sqrt(p5)
ipanR	=	sqrt(1-p5)
kfreq = &lt;omega&gt;
kgain = &lt;gain&gt;
kres = &lt;res&gt;
kfiltfreq = &lt;freq&gt;

kalfa init 2.328041
kmu init 0.557286
kcont init 0
amod init 0
ax init .5
ay init .5
axnew init 0
aynew init 0
afiltL init 0
afiltR init 0
aoutL init 0
aoutR init 0

kfreq = kfreq+ifreq

amod phasor kfreq,0

axnew = (-1)*ay+kalfa*amod
aynew = ax+ay*kmu*(1-ax*ax)

afiltL lowpass2 axnew*kgain,kfiltfreq,kres
afiltR lowpass2 aynew*kgain,kfiltfreq,kres


aoutL = afiltL
aoutR = afiltR

blueMixerOut	aoutL*ipanL,aoutR*ipanR

ax=axnew
ay=aynew


;Optionally output to a Display object:

;kax downsamp ax
;kay downsamp ay

;outvalue &quot;kdisplay&quot;, 0.5+kax/5
;outvalue &quot;kdisplax&quot;, 0.5+kay/5
</instrumentText>
  <graphicInterface editEnabled='false'>
    <uniqueNameManager nameIndex='-1' defaultPrefix='bsbObj'/>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>omega</objectName>
      <x>43</x>
      <y>24</y>
      <automationAllowed>true</automationAllowed>
      <minimum>1.448863</minimum>
      <maximum>1545.0</maximum>
      <value>348.97617</value>
      <knobWidth>140</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>90</x>
      <y>186</y>
      <label>Omega</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>gain</objectName>
      <x>232</x>
      <y>28</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>10000.0</maximum>
      <value>1692.2822</value>
      <knobWidth>80</knobWidth>
      <randomizable>false</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>260</x>
      <y>128</y>
      <label>Gain</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>res</objectName>
      <x>333</x>
      <y>29</y>
      <automationAllowed>true</automationAllowed>
      <minimum>1.0</minimum>
      <maximum>50.0</maximum>
      <value>3.5</value>
      <knobWidth>80</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>327</x>
      <y>127</y>
      <label>Filter Resonance</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>freq</objectName>
      <x>222</x>
      <y>165</y>
      <automationAllowed>true</automationAllowed>
      <minimum>20.0</minimum>
      <maximum>22050.0</maximum>
      <value>372.48</value>
      <knobWidth>120</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>240</x>
      <y>305</y>
      <label>Filter Frequency</label>
    </bsbObject>
  </graphicInterface>
  <bsbParameterList>
    <parameter uniqueId='-567852133' name='freq' label='' min='20.0' max='22050.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='22050.0' min='20.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='372.48'/>
      </line>
    </parameter>
    <parameter uniqueId='-567852137' name='gain' label='' min='0.0' max='10000.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='10000.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='1692.2822'/>
      </line>
    </parameter>
    <parameter uniqueId='-567852139' name='omega' label='' min='1.448863' max='1545.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='1545.0' min='1.448863' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='348.97617'/>
      </line>
    </parameter>
    <parameter uniqueId='-567852135' name='res' label='' min='1.0' max='50.0' resolution='-1.0' automationEnabled='false'>
      <line name='' version='2' max='50.0' min='1.0' resolution='-1.0' color='-8355712' rightBound='false'>
        <linePoint x='0.0' y='3.5'/>
      </line>
    </parameter>
  </bsbParameterList>
  <presetGroup name='Presets'/>
  <opcodeList/>
</instrument>