<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
  <name>Pentadd v1.02</name>
  <comment>Pentadd v1.02 - by Brian Wong, 2008

Pentadd is a 5-oscillator additive synth with dynamic panning. It uses the 5 pfields shown below, and most of the controls are in the BSB lineobject widget. Each oscillator has a separate amplitude envelope and frequency curve that can be edited from the lineobject widget. The pan control is also implemented in the lineobject. All lines are converted to exponential curves except for the panning. The simple design of the instrument should allow easy expansion to add more oscillators or ftables to suit the needs of the moment.

I welcome any discussion or suggestions on the blue list.

;inst	strt	dur	amp	freq
;----------------------------------------------------------------------------------------------------
p1	p2	p3	p4	p5

v1.01 - added invdur variable to optimize code, changed startup preset to &quot;1st Five Harmonics&quot;.
v1.02 - changed colours in labels
</comment>
  <globalOrc>gi_sine_&lt;INSTR_ID&gt;	ftgen 0, 0, 65536, 10, 1
gi_saw_&lt;INSTR_ID&gt;	ftgen 0, 0, 65536, 7, 1, 65536, -1
gi_square_&lt;INSTR_ID&gt;	ftgen 0, 0, 65536, 7, 1, 32768, -1, 32768
gi_tri_&lt;INSTR_ID&gt;	ftgen 0, 0, 65536, 7, -1, 32768, 1, 32768, -1
gi_pulse_&lt;INSTR_ID&gt;	ftgen 0, 0, 65536, 7, 1, 16384, 1, 0, -1, 49152, -1
gi_amp1_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Amp1&gt;
gi_fq1_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Freq1&gt;
gi_amp2_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Amp2&gt;
gi_fq2_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Freq2&gt;
gi_amp3_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Amp3&gt;
gi_fq3_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Freq3&gt;
gi_amp4_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Amp4&gt;
gi_fq4_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Freq4&gt;
gi_amp5_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Amp5&gt;
gi_fq5_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 5, &lt;liner_Freq5&gt;
gi_pan_&lt;INSTR_ID&gt;	ftgen 0, 0, 1024, 7, &lt;liner_Panning&gt;

</globalOrc>
  <globalSco/>
  <instrumentText>invdur	=	1/p3

kamp1	oscili	p4, invdur, gi_amp1_&lt;INSTR_ID&gt;
kfq1	oscili	p5, invdur, gi_fq1_&lt;INSTR_ID&gt;
a1 	poscil	kamp1, kfq1, &lt;drop1&gt;

kamp2	oscili	p4, invdur, gi_amp2_&lt;INSTR_ID&gt;
kfq2	oscili	p5, invdur, gi_fq2_&lt;INSTR_ID&gt;
a2 	poscil	kamp2, kfq2, &lt;drop2&gt;

kamp3	oscili	p4, invdur, gi_amp3_&lt;INSTR_ID&gt;
kfq3	oscili	p5, invdur, gi_fq3_&lt;INSTR_ID&gt;
a3 	poscil	kamp3, kfq3, &lt;drop3&gt;

kamp4	oscili	p4, invdur, gi_amp4_&lt;INSTR_ID&gt;
kfq4	oscili	p5, invdur, gi_fq4_&lt;INSTR_ID&gt;
a4 	poscil	kamp4, kfq4, &lt;drop4&gt;

kamp5	oscili	p4, invdur, gi_amp5_&lt;INSTR_ID&gt;
kfq5	oscili	p5, invdur, gi_fq5_&lt;INSTR_ID&gt;
a5 	poscil	kamp5, kfq5, &lt;drop5&gt;

aout	=	(a1+a2+a3+a4+a5)*.2

kpan	oscili	1, invdur, gi_pan_&lt;INSTR_ID&gt;		; dynamic panning
aLeft, aRight	pan_equal_power	aout, kpan

blueMixerOut	aLeft, aRight</instrumentText>
  <graphicInterface editEnabled='true'>
    <uniqueNameManager nameIndex='3' defaultPrefix='bsbObj'/>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'>
      <objectName>liner</objectName>
      <x>22</x>
      <y>67</y>
      <canvasWidth>400</canvasWidth>
      <canvasHeight>320</canvasHeight>
      <xMax>1024.0</xMax>
      <relativeXValues>true</relativeXValues>
      <separatorType>Comma</separatorType>
      <leadingZero>false</leadingZero>
      <locked>false</locked>
      <lines>
        <line name='Amp1' version='2' max='1.0' min='0.01' resolution='-1.0' color='-14623488' rightBound='true'>
          <linePoint x='0.0' y='0.01'/>
          <linePoint x='0.5' y='1.0'/>
          <linePoint x='1.0' y='0.01'/>
        </line>
        <line name='Freq1' version='2' max='8.0' min='0.01' resolution='-1.0' color='-16711834' rightBound='true'>
          <linePoint x='0.0' y='1.0'/>
          <linePoint x='1.0' y='1.0'/>
        </line>
        <line name='Amp2' version='2' max='1.0' min='0.01' resolution='-1.0' color='-23296' rightBound='true'>
          <linePoint x='0.0' y='0.01'/>
          <linePoint x='0.5' y='0.5'/>
          <linePoint x='1.0' y='0.01'/>
        </line>
        <line name='Freq2' version='2' max='8.0' min='0.01' resolution='-1.0' color='-3381760' rightBound='true'>
          <linePoint x='0.0' y='2.0'/>
          <linePoint x='1.0' y='2.0'/>
        </line>
        <line name='Amp3' version='2' max='1.0' min='0.01' resolution='-1.0' color='-65281' rightBound='true'>
          <linePoint x='0.0' y='0.01'/>
          <linePoint x='0.5' y='0.25'/>
          <linePoint x='1.0' y='0.01'/>
        </line>
        <line name='Freq3' version='2' max='8.0' min='0.01' resolution='-1.0' color='-3407668' rightBound='true'>
          <linePoint x='0.0' y='3.0'/>
          <linePoint x='1.0' y='3.0'/>
        </line>
        <line name='Amp4' version='2' max='1.0' min='0.01' resolution='-1.0' color='-16750849' rightBound='true'>
          <linePoint x='0.0' y='0.01'/>
          <linePoint x='0.5' y='0.125'/>
          <linePoint x='1.0' y='0.01'/>
        </line>
        <line name='Freq4' version='2' max='8.0' min='0.01' resolution='-1.0' color='-16776961' rightBound='true'>
          <linePoint x='0.0' y='4.0'/>
          <linePoint x='1.0' y='4.0'/>
        </line>
        <line name='Amp5' version='2' max='1.0' min='0.01' resolution='-1.0' color='-3407821' rightBound='true'>
          <linePoint x='0.0' y='0.01'/>
          <linePoint x='0.5' y='0.0625'/>
          <linePoint x='1.0' y='0.01'/>
        </line>
        <line name='Freq5' version='2' max='8.0' min='0.01' resolution='-1.0' color='-65485' rightBound='true'>
          <linePoint x='0.0' y='5.0'/>
          <linePoint x='1.0' y='5.0'/>
        </line>
        <line name='Panning' version='2' max='1.0' min='-1.0' resolution='-1.0' color='-7640812' rightBound='true'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </lines>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>drop1</objectName>
      <x>443</x>
      <y>91</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Sine</name>
          <value>gi_sine_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>gi_saw_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Square</name>
          <value>gi_square_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>gi_tri_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>gi_pulse_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>0</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>536</x>
      <y>94</y>
      <label>&lt;html&gt;&lt;font color=rgb(0,255,0)&gt;Osc1&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>535</x>
      <y>153</y>
      <label>&lt;html&gt;&lt;font color=rgb(255,120,60)&gt;Osc2&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>drop2</objectName>
      <x>444</x>
      <y>150</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Sine</name>
          <value>gi_sine_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>gi_saw_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Square</name>
          <value>gi_square_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>gi_tri_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>gi_pulse_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>0</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>drop3</objectName>
      <x>444</x>
      <y>213</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Sine</name>
          <value>gi_sine_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>gi_saw_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Square</name>
          <value>gi_square_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>gi_tri_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>gi_pulse_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>0</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>535</x>
      <y>216</y>
      <label>&lt;html&gt;&lt;font color=rgb(255,50,255)&gt;Osc3&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>drop4</objectName>
      <x>444</x>
      <y>277</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Sine</name>
          <value>gi_sine_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>gi_saw_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Square</name>
          <value>gi_square_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>gi_tri_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>gi_pulse_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>0</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>536</x>
      <y>280</y>
      <label>&lt;html&gt;&lt;font color=rgb(150,150,255)&gt;Osc4&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown'>
      <objectName>drop5</objectName>
      <x>444</x>
      <y>339</y>
      <bsbDropdownItemList>
        <bsbDropdownItem>
          <name>Sine</name>
          <value>gi_sine_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Saw</name>
          <value>gi_saw_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Square</name>
          <value>gi_square_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Triangle</name>
          <value>gi_tri_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
        <bsbDropdownItem>
          <name>Pulse</name>
          <value>gi_pulse_&lt;INSTR_ID&gt;</value>
        </bsbDropdownItem>
      </bsbDropdownItemList>
      <selectedIndex>0</selectedIndex>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>535</x>
      <y>341</y>
      <label>&lt;html&gt;&lt;font color=rgb(255,50,50)&gt;Osc5&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>166</x>
      <y>11</y>
      <label>&lt;html&gt;&lt;font size=&quot;+3&quot; face=&quot;serif&quot; color=rgb(200,200,0)&gt;Pentadd&lt;/font&gt;&lt;/htmL&gt;</label>
    </bsbObject>
  </graphicInterface>
  <bsbParameterList/>
  <presetGroup name='Presets'>
    <preset name='12et Starship'>
      <setting name='drop1'>3</setting>
      <setting name='drop2'>3</setting>
      <setting name='drop3'>3</setting>
      <setting name='drop4'>3</setting>
      <setting name='drop5'>3</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq1:0.0:1.0:0.25:1.0:0.75:2.0:1.0:2.0@_@Amp2:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq2:0.0:1.259921:0.25:1.259921:0.75:2.519842:1.0:2.519842@_@Amp3:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq3:0.0:1.498307:0.25:1.498307:0.75:2.996614:1.0:2.996614@_@Amp4:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq4:0.0:2.0:0.25:2.0:0.75:4.0:1.0:4.0@_@Amp5:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq5:0.0:2.996614:0.25:2.996614:0.75:5.993228:1.0:5.993228@_@Panning:0.0:0.0:1.0:0.0</setting>
    </preset>
    <preset name='1st Five Harmonics'>
      <setting name='drop1'>0</setting>
      <setting name='drop2'>0</setting>
      <setting name='drop3'>0</setting>
      <setting name='drop4'>0</setting>
      <setting name='drop5'>0</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq1:0.0:1.0:1.0:1.0@_@Amp2:0.0:0.01:0.5:0.5:1.0:0.01@_@Freq2:0.0:2.0:1.0:2.0@_@Amp3:0.0:0.01:0.5:0.25:1.0:0.01@_@Freq3:0.0:3.0:1.0:3.0@_@Amp4:0.0:0.01:0.5:0.125:1.0:0.01@_@Freq4:0.0:4.0:1.0:4.0@_@Amp5:0.0:0.01:0.5:0.0625:1.0:0.01@_@Freq5:0.0:5.0:1.0:5.0@_@Panning:0.0:0.0:1.0:0.0</setting>
    </preset>
    <preset name='Bell'>
      <setting name='drop1'>0</setting>
      <setting name='drop2'>0</setting>
      <setting name='drop3'>0</setting>
      <setting name='drop4'>0</setting>
      <setting name='drop5'>0</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.012886598:1.0:1.0:0.01@_@Freq1:0.0:1.0:1.0:1.0@_@Amp2:0.0:0.01:0.010309278:1.0:0.91494846:0.01:1.0:0.01@_@Freq2:0.0:1.1541667:1.0:1.1541667@_@Amp3:0.0:0.01:0.005154639:1.0:0.8556701:0.01:1.0:0.01@_@Freq3:0.0:1.6041666:1.0:1.6041666@_@Amp4:0.0:0.01:0.010309278:1.0:0.6082474:0.01:1.0:0.01@_@Freq4:0.0:2.8541667:1.0:2.8541667@_@Amp5:0.0:0.01:0.0077319588:0.9935714:0.7654639:0.01:1.0:0.01@_@Freq5:0.0:1.4166666:1.0:1.4166666@_@Panning:0.0:0.0:1.0:0.0</setting>
    </preset>
    <preset name='Pentaddophone'>
      <setting name='drop1'>1</setting>
      <setting name='drop2'>1</setting>
      <setting name='drop3'>0</setting>
      <setting name='drop4'>0</setting>
      <setting name='drop5'>3</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.18041237:0.4214286:0.52577317:0.70750004:0.6340206:1.0:0.7912371:0.37321427:1.0:0.01@_@Freq1:0.0:0.0625:1.0:0.125@_@Amp2:0.0:0.013214257:0.185567:0.775:0.3814433:0.81035715:0.51804125:0.37964284:1.0:0.01@_@Freq2:0.0:1.0:1.0:0.5@_@Amp3:0.0:0.022857148:0.0154639175:0.6946429:0.2242268:1.0:0.36597937:0.67214286:0.6546392:0.44071427:1.0:0.01@_@Freq3:0.0:0.5:1.0:0.75@_@Amp4:0.0:0.016428573:0.8582474:1.0:1.0:0.01@_@Freq4:0.0:3.0:1.0:0.8@_@Amp5:0.0:0.016428573:0.14175257:1.0:0.31958762:0.6464286:0.7963917:0.595:1.0:0.01@_@Freq5:0.0:1.01:1.0:0.99@_@Panning:0.0:-0.99350655:1.0:0.96103895</setting>
    </preset>
    <preset name='Widend'>
      <setting name='drop1'>2</setting>
      <setting name='drop2'>2</setting>
      <setting name='drop3'>2</setting>
      <setting name='drop4'>2</setting>
      <setting name='drop5'>2</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq1:0.0:1.0:1.0:1.0@_@Amp2:0.0:0.01:0.53092784:0.9646429:1.0:0.01@_@Freq2:0.0:1.01:1.0:1.01@_@Amp3:0.0:0.01:0.42783505:0.9325:1.0:0.01@_@Freq3:0.0:0.99:1.0:0.99@_@Amp4:0.0:0.01:0.6005155:0.955:1.0:0.01@_@Freq4:0.0:1.02:1.0:1.02@_@Amp5:0.0:0.01:0.38402063:0.9678571:1.0:0.01@_@Freq5:0.0:0.98:1.0:0.98@_@Panning:0.0:0.0:1.0:0.0</setting>
    </preset>
    <preset name='Init'>
      <setting name='drop1'>0</setting>
      <setting name='drop2'>0</setting>
      <setting name='drop3'>0</setting>
      <setting name='drop4'>0</setting>
      <setting name='drop5'>0</setting>
      <setting name='liner'>version=2@_@Amp1:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq1:0.0:1.0:1.0:1.0@_@Amp2:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq2:0.0:1.0:1.0:1.0@_@Amp3:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq3:0.0:1.0:1.0:1.0@_@Amp4:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq4:0.0:1.0:1.0:1.0@_@Amp5:0.0:0.01:0.5:1.0:1.0:0.01@_@Freq5:0.0:1.0:1.0:1.0@_@Panning:0.0:0.0:1.0:0.0</setting>
    </preset>
  </presetGroup>
  <opcodeList>
    <udo>
      <opcodeName>pan_equal_power</opcodeName>
      <outTypes>aa</outTypes>
      <inTypes>ak</inTypes>
      <codeBody>ain, kpan       xin
kangl   =  $M_PI_2 * (kpan + 0.5)
        
	xout    ain * sin(kangl), ain * cos(kangl)

</codeBody>
      <comments>pan_equal_power - Equal Power Panning

SYNTAX
a1, a2    pan_equal_power    asig, kpan

CREDITS
Author: Michael Gogins, converted by Steven Yi, Rewritten by Istvan Varga for Speed</comments>
    </udo>
  </opcodeList>
</instrument>