<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
  <name>EastCross v0.3</name>
  <comment>; Eastcross : Adapted from the Crossfade instrument in the EAST (Early Analogue Synthesis Techniques) tutorial by Jacob Joaquin. By Brian Wong, 2007.

- Dec. 15, 2009 - v0.3 - Automation turned off for BSB knobs.

 For p-fields 6, 7 and 8 use a value of -1 to use GUI settings, or enter any other value from 0 to 1 into the score.

inst	strt	dur	amp	frq	rise	dec	pan
</comment>
  <globalOrc>;[once](
gi_eastcross_sine	ftgen 0, 0, 65536, 10, 1
gi_eastcross_1		ftgen 0, 0, 65536, 10, 1, 0, 1, 0, 1, 0, 1, 0
gi_eastcross_2		ftgen 0, 0, 65536, 10, 0, 1, 0, 1, 0, 1, 0, 1
;)</globalOrc>
  <globalSco/>
  <instrumentText>idur 	= 	p3  
iamp 	= 	p5  
ifreq	= 	p4  
irise		scoreDefault p6,&lt;Rise&gt;, -1  	; rise time (0-1)
irise	=	irise*idur
idec		scoreDefault p7,&lt;Decay&gt;, -1 	; dec time (0-1)
idec	=	idec*idur
ipan		scoreDefault p8,&lt;Pan&gt;, -1	; pan variable (0-1)
kenv 	expseg 	1, idur * .25, 6, idur * .5, 6, idur * .25, 1 
kosc1 	oscil 	.5, kenv, gi_eastcross_sine, -1 
kosc2 	= 	kosc1 * -1 
kosc1 	= 	kosc1 + .5 
kosc2 	= 	kosc2 + .5
k1 	linen	iamp, irise, idur, idec
aosc1 	oscil 	k1, ifreq, gi_eastcross_1, -1 
aosc2 	oscil 	k1, ifreq, gi_eastcross_2, -1 
amix 	= 	aosc1 * kosc1 + aosc2 * kosc2 
blueMixerOut 	amix*ipan, amix*(1-ipan) 
</instrumentText>
  <graphicInterface editEnabled='true'>
    <uniqueNameManager nameIndex='-1' defaultPrefix='bsbObj'/>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>Rise</objectName>
      <x>278</x>
      <y>2</y>
      <automationAllowed>false</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.031156667</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName>RiseLabel</objectName>
      <x>294</x>
      <y>77</y>
      <label>Rise</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>Decay</objectName>
      <x>365</x>
      <y>2</y>
      <automationAllowed>false</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.34184134</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName>DecayLabel</objectName>
      <x>376</x>
      <y>78</y>
      <label>Decay</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>Pan</objectName>
      <x>450</x>
      <y>2</y>
      <automationAllowed>false</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.5024682</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName>PanLabel</objectName>
      <x>468</x>
      <y>78</y>
      <label>Pan</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName>EastCross</objectName>
      <x>44</x>
      <y>21</y>
      <label>&lt;html&gt;&lt;font size=&quot;+3&quot; face=&quot;serif&quot; color=rgb(190,167,148)&gt;EastCross&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
  </graphicInterface>
  <bsbParameterList/>
  <presetGroup name='Presets'>
    <preset name='Centred'>
      <setting name='Decay'>ver2:0.5085129142</setting>
      <setting name='Pan'>ver2:0.5024682283</setting>
      <setting name='Rise'>ver2:0.5003339052</setting>
    </preset>
  </presetGroup>
  <opcodeList>
    <udo>
      <opcodeName>scoreDefault</opcodeName>
      <outTypes>i</outTypes>
      <inTypes>iio</inTypes>
      <codeBody>iPfield,iGui,iDefault xin

if (iPfield == iDefault) then
	iRes = iGui
else
	iRes = iPfield
endif

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