<blueData version='0.124.0'>
  <projectProperties>
    <title>Mixer Test</title>
    <author>Steven Yi</author>
    <notes>Test file for blue&apos;s Mixer system.  Try rendering with loop on and experimenting with
the fader values in the mixer dialog.</notes>
    <sampleRate>48000</sampleRate>
    <ksmps>16</ksmps>
    <channels>2</channels>
    <diskSampleRate>44100</diskSampleRate>
    <diskKsmps>1</diskKsmps>
    <diskChannels>2</diskChannels>
    <useAudioOut>true</useAudioOut>
    <useAudioIn>false</useAudioIn>
    <useMidiIn>false</useMidiIn>
    <useMidiOut>false</useMidiOut>
    <noteAmpsEnabled>true</noteAmpsEnabled>
    <outOfRangeEnabled>true</outOfRangeEnabled>
    <warningsEnabled>true</warningsEnabled>
    <benchmarkEnabled>true</benchmarkEnabled>
    <advancedSettings></advancedSettings>
    <completeOverride>false</completeOverride>
    <fileName>mixer.wav</fileName>
    <askOnRender>false</askOnRender>
    <diskNoteAmpsEnabled>true</diskNoteAmpsEnabled>
    <diskOutOfRangeEnabled>true</diskOutOfRangeEnabled>
    <diskWarningsEnabled>true</diskWarningsEnabled>
    <diskBenchmarkEnabled>true</diskBenchmarkEnabled>
    <diskAdvancedSettings></diskAdvancedSettings>
    <diskCompleteOverride>false</diskCompleteOverride>
    <diskAlwaysRenderEntireProject>false</diskAlwaysRenderEntireProject>
    <csladspaSettings>
      <name></name>
      <maker></maker>
      <uniqueId>0</uniqueId>
      <copyright></copyright>
      <portDefinitionList/>
      <enabled>false</enabled>
    </csladspaSettings>
  </projectProperties>
  <arrangement>
    <instrumentAssignment arrangementId='1' isEnabled='true'>
      <instrument type='blue.orchestra.GenericInstrument'>
        <name>triangle</name>
        <comment>Description: 

A simple band-limited fm wave instrument built using an instrument template code snippet I often use from my personal code repository for building my instruments. Instrument parameters are numerous, but often I use instruments I build from this template with python code that simplifies the process of generating these notes, yet I&apos;m still able to have the flexibility and nuance of all of these parameters.

Parameters:

p4	- start frequency, can be either hertz or pch notation 
p5	- end frequency, can be either hertz or pch notation
p6	- amplitude, expressed in decibels
p7	- panning, from range -1 to 1
p8	- amplitude envelope type, 0 = adsr, 1 = pyramid, 2 = ramp</comment>
        <globalOrc>;[once]{
gi_square		ftgen 0, 0, 65537, 10, 1, 0, 0.111111, 0, 0.4, 0, .020408163, 0, .012345679, 0, .008264463
;}</globalOrc>
        <globalSco></globalSco>
        <instrumentText>ipch 	getFrequency p4
ipch2 	getFrequency p5

kpchline 	line ipch, p3, ipch2

;print ipch, ipch2

iamp 	= ampdb(p6)
iSpace	= p7
ienvType	= p8

itable	= gi_square

kenv	yiEnvelope ienvType, .1, .05, .95, .1

;aout	oscili iamp * kenv, kpchline, itable
;aout	vco 	iamp * kenv, ipch, 3, .5

aout	vco2	1, kpchline, 12
aout2	vco2	1, kpchline + .0009, 12
aout3	vco2	1, kpchline + .0007, 12

aout	sum aout, aout2, aout3
aout	= aout * .333

kCut	= (kpchline * 4 * kenv) + kpchline

kCut    	limit kCut, sr * 0.0002, sr * 0.48

;if kCut &lt; 20000 kgoto kCutPass
;  kCut = 20000
;kCutPass:
;printk2 kCut

aout 	butterlp aout, kCut

aout	= aout * iamp * kenv

iSpace	= iSpace * 3.14159265359 * .5
krtl     	= sqrt(2) / 2 * (cos(iSpace) + sin(iSpace)) ; CONSTANT POWER PANNING
krtr     	= sqrt(2) / 2 * (cos(iSpace) - sin(iSpace)) ; FROM C.ROADS &quot;CM TUTORIAL&quot; pp460

aLeft 	=	aout * krtl
aRight	=	aout * krtr

;	outs aLeft, aRight

blueMixerOut aLeft, aRight

</instrumentText>
        <opcodeList/>
      </instrument>
    </instrumentAssignment>
    <instrumentAssignment arrangementId='2' isEnabled='true'>
      <instrument type='blue.orchestra.GenericInstrument'>
        <name>simple fm 2:1</name>
        <comment>Description: 

A simple FM instrument, built using an instrument template code snippet I often use from my personal code repository for building my instruments. Instrument parameters are numerous, but often I use instruments I build from this template with python code that simplifies the process of generating these notes, yet I&apos;m still able to have the flexibility and nuance of all of these parameters.

Parameters:

p4	- start frequency, can be either hertz or pch notation 
p5	- end frequency, can be either hertz or pch notation
p6	- amplitude, expressed in decibels
p7	- panning, from range -1 to 1
p8	- amplitude envelope type, 0 = adsr, 1 = pyramid, 2 = ramp</comment>
        <globalOrc>;[once]{
gi_sine	ftgen 0, 0, 65537, 10, 1
;}</globalOrc>
        <globalSco></globalSco>
        <instrumentText>ipch 	= p4
ipch2	= p5

ipch 	= (ipch &lt; 15 ? cpspch(ipch) : ipch)
ipch2 	= (ipch2 &lt; 15 ? cpspch(ipch2) : ipch2)

kpchline 	line ipch, p3, ipch2

iamp 	= ampdb(p6)
iSpace	= p7
ienvType	= p8

kenv	yiEnvelope ienvType

; SOUND GENERATION CODE

icar	= 2
imod	= 1

aout	foscili  	iamp * kenv, kpchline, icar, imod, kenv, gi_sine


iSpace	= iSpace * 3.14159265359 * .5
krtl     	= sqrt(2) / 2 * (cos(iSpace) + sin(iSpace)) ; CONSTANT POWER PANNING
krtr     	= sqrt(2) / 2 * (cos(iSpace) - sin(iSpace)) ; FROM C.ROADS &quot;CM TUTORIAL&quot; pp460

aLeft 	=	aout * krtl
aRight	=	aout * krtr

blueMixerOut aLeft, aRight

</instrumentText>
        <opcodeList/>
      </instrument>
    </instrumentAssignment>
  </arrangement>
  <mixer>
    <enabled>true</enabled>
    <extraRenderTime>2.0</extraRenderTime>
    <channelList list='channels'>
      <channel>
        <name>1</name>
        <outChannel>SubChannel2</outChannel>
        <level>0.0</level>
        <muted>false</muted>
        <solo>false</solo>
        <effectsChain bin='pre'/>
        <effectsChain bin='post'/>
        <parameter uniqueId='-1577324320' name='Volume' label='dB' min='-96.0' max='12.0' resolution='-1.0' automationEnabled='false' value='0.0'>
          <line name='' version='2' max='12.0' min='-96.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
            <linePoint x='0.0' y='0.0'/>
          </line>
        </parameter>
      </channel>
      <channel>
        <name>2</name>
        <outChannel>SubChannel1</outChannel>
        <level>0.0</level>
        <muted>false</muted>
        <solo>false</solo>
        <effectsChain bin='pre'/>
        <effectsChain bin='post'/>
        <parameter uniqueId='-1577324318' name='Volume' label='dB' min='-96.0' max='12.0' resolution='-1.0' automationEnabled='false' value='0.0'>
          <line name='' version='2' max='12.0' min='-96.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
            <linePoint x='0.0' y='0.0'/>
          </line>
        </parameter>
      </channel>
    </channelList>
    <channelList list='subChannels'>
      <channel>
        <name>SubChannel1</name>
        <outChannel>SubChannel2</outChannel>
        <level>0.0</level>
        <muted>false</muted>
        <solo>false</solo>
        <effectsChain bin='pre'/>
        <effectsChain bin='post'/>
        <parameter uniqueId='-1577324316' name='Volume' label='dB' min='-96.0' max='12.0' resolution='-1.0' automationEnabled='false' value='0.0'>
          <line name='' version='2' max='12.0' min='-96.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
            <linePoint x='0.0' y='0.0'/>
          </line>
        </parameter>
      </channel>
      <channel>
        <name>SubChannel2</name>
        <outChannel>Master</outChannel>
        <level>0.0</level>
        <muted>false</muted>
        <solo>false</solo>
        <effectsChain bin='pre'/>
        <effectsChain bin='post'/>
        <parameter uniqueId='-1577324314' name='Volume' label='dB' min='-96.0' max='12.0' resolution='-1.0' automationEnabled='false' value='0.0'>
          <line name='' version='2' max='12.0' min='-96.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
            <linePoint x='0.0' y='0.0'/>
          </line>
        </parameter>
      </channel>
    </channelList>
    <channel>
      <name>Master</name>
      <outChannel>Master</outChannel>
      <level>0.0</level>
      <muted>false</muted>
      <solo>false</solo>
      <effectsChain bin='pre'>
        <effect>
          <name>ReverbSC</name>
          <enabled>true</enabled>
          <numIns>2</numIns>
          <numOuts>2</numOuts>
          <code>aout1, aout2  reverbsc ain1, ain2, &lt;feedback&gt;, &lt;cutoff&gt;

aout1 = (ain1 * &lt;wetdry&gt;) + (aout1 * (1 - &lt;wetdry&gt;))
aout2 = (ain2 * &lt;wetdry&gt;) + (aout2 * (1 - &lt;wetdry&gt;))

</code>
          <comments/>
          <opcodeList/>
          <graphicInterface editEnabled='true'>
            <uniqueNameManager nameIndex='-1' defaultPrefix='bsbObj'/>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
              <objectName></objectName>
              <x>7</x>
              <y>7</y>
              <label>&lt;html&gt;&lt;font size=&quot;+1&quot;&gt;ReverbSC&lt;/font&gt;&lt;/html&gt;</label>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
              <objectName>feedback</objectName>
              <x>8</x>
              <y>55</y>
              <automationAllowed>false</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>1.0</maximum>
              <value>0.85</value>
              <knobWidth>60</knobWidth>
              <randomizable>true</randomizable>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
              <objectName></objectName>
              <x>11</x>
              <y>36</y>
              <label>Feedback</label>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
              <objectName>cutoff</objectName>
              <x>72</x>
              <y>55</y>
              <automationAllowed>false</automationAllowed>
              <minimum>20.0</minimum>
              <maximum>20000.0</maximum>
              <value>8000.0</value>
              <knobWidth>60</knobWidth>
              <randomizable>true</randomizable>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
              <objectName></objectName>
              <x>80</x>
              <y>36</y>
              <label>Cut-Off</label>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
              <objectName>wetdry</objectName>
              <x>136</x>
              <y>55</y>
              <automationAllowed>false</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>1.0</maximum>
              <value>0.3</value>
              <knobWidth>60</knobWidth>
              <randomizable>true</randomizable>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
              <objectName></objectName>
              <x>139</x>
              <y>36</y>
              <label>Wet/Dry</label>
            </bsbObject>
          </graphicInterface>
          <bsbParameterList/>
        </effect>
      </effectsChain>
      <effectsChain bin='post'/>
      <parameter uniqueId='-1577324312' name='Volume' label='dB' min='-96.0' max='12.0' resolution='-1.0' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='12.0' min='-96.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
        </line>
      </parameter>
    </channel>
  </mixer>
  <tables></tables>
  <soundObjectLibrary/>
  <globalOrcSco>
    <globalOrc></globalOrc>
    <globalSco></globalSco>
  </globalOrcSco>
  <opcodeList>
    <udo>
      <opcodeName>yiEnvelope</opcodeName>
      <outTypes>k</outTypes>
      <inTypes>ioooooo</inTypes>
      <codeBody>ienvType, iattack, idecay, isus, irel, iOldAmp, iNewAmp	xin

itie	tival
idur = p3

iEndAmp = iNewAmp / iOldAmp


if (ienvType == 0) then
	kenv	adsr	iattack, idecay, isus, irel
elseif (ienvType == 1) then	
	kenv 	linseg	0, p3 * .5, 1, p3 * .5, 0

elseif (ienvType == 2) then	
	kenv	linseg 	0, p3 - .1, 1, .1, 0	

elseif (ienvType == 3) then

    if (itie == 0 &amp;&amp; p3 &lt; 0) then
        ; this is an initial note within a group of tied notes
        kenv	linseg	0, .2, 1,  .2, 1
       
    elseif (p3 &gt; 0 &amp;&amp; itie == 1) then
        ; this is an end note out of a group of tied notes
        kenv linseg	1, p3 - 1, 1, 1, 0
 
    elseif (p3 &gt; 0 &amp;&amp; itie == 0) then
        ; this is a stand alone note
        kenv adsr iattack, idecay, isus, irel
    else
        ; this is a middle note within a group of tied notes (p3 &lt; 0 &amp;&amp; itie == 1)
        kenv line 1, abs(p3), iEndAmp
    endif  

endif

	xout 	kenv
</codeBody>
      <comments></comments>
    </udo>
    <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>
  </opcodeList>
  <liveData>
    <commandLine>csound -Wdo devaudio -L stdin</commandLine>
    <commandLineEnabled>true</commandLineEnabled>
    <commandLineOverride>true</commandLineOverride>
  </liveData>
  <soundObject type='blue.soundObject.PolyObject'>
    <subjectiveDuration>2.0</subjectiveDuration>
    <startTime>0.0</startTime>
    <name>root</name>
    <backgroundColor>-10066279</backgroundColor>
    <timeBehavior>0</timeBehavior>
    <noteProcessorChain/>
    <isRoot>true</isRoot>
    <pixelSecond>64</pixelSecond>
    <defaultHeightIndex>1</defaultHeightIndex>
    <snapEnabled>false</snapEnabled>
    <snapValue>1.0</snapValue>
    <timeDisplay>0</timeDisplay>
    <timeUnit>5</timeUnit>
    <soundLayer name='' muted='false' solo='false' heightIndex='1'>
      <noteProcessorChain/>
      <soundObject type='blue.soundObject.GenericScore'>
        <subjectiveDuration>2.0</subjectiveDuration>
        <startTime>0.0</startTime>
        <name>triangle</name>
        <backgroundColor>-12566464</backgroundColor>
        <timeBehavior>0</timeBehavior>
        <noteProcessorChain/>
        <score>i1 0 1 8.00 8.00 80 0 1</score>
      </soundObject>
    </soundLayer>
    <soundLayer name='' muted='false' solo='false' heightIndex='1'>
      <noteProcessorChain/>
      <soundObject type='blue.soundObject.GenericScore'>
        <subjectiveDuration>2.0</subjectiveDuration>
        <startTime>0.0</startTime>
        <name>fm 2:1</name>
        <backgroundColor>-12566464</backgroundColor>
        <timeBehavior>0</timeBehavior>
        <noteProcessorChain/>
        <score>i2 0 1 9.00 8.00 80 0 1</score>
      </soundObject>
    </soundLayer>
  </soundObject>
  <scratchPadData>
    <isWordWrapEnabled>true</isWordWrapEnabled>
    <scratchText/>
  </scratchPadData>
  <noteProcessorChainMap/>
  <renderStartTime>0.0</renderStartTime>
  <renderEndTime>-1.0</renderEndTime>
  <markersList/>
  <loopRendering>true</loopRendering>
  <tempo>
    <enabled>false</enabled>
    <visible>false</visible>
    <line name='' version='2' max='240.0' min='30.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
      <linePoint x='0.0' y='60.0'/>
    </line>
  </tempo>
</blueData>