<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
  <name>Drone Just Intonation</name>
  <comment>This instrument is a port of a Michael Gogins CsoundAC instrument. It is moddled after LaMonte Young and Just Intonation.
Young?s drones consists of the mere  persistence  of long  loud tones in a reverberant space.

Setting the fundamental frequency to low values is nice, but higher settings produces nice aery sounds as well.


This is (the condensed version of) the sore of Michaels CsoundAC instrument. 
;   p1          p2         p3               p4                  p5             p6          p7       
;   insno   onset   duration    numerator  denominator  amplitude  pan

; just intonation, 3 chords :C major 7, G major 7, G 7, C major with voice leading.
  
i   1            0           6                 1                   1                .2      -0.875
i   1            0          18                3                   2                 .       0.000
i   1            0          6                  28                 15               .        0.875

i   1            30        6                  9                   8                 .       0.875
i   1            30        3                  10                 7                 .      -0.875
i   1            30        3                  4                   3                 .        0.875

i   1            60        6        	      1                   1                .       -0.875
i   1            60        6       	      5                   4                .        0.000
i   1            60        6         	      2                   1                .        0.875


version 1, January 2016
- AD envelope for amplitude
- fundamental frequency can be set at will</comment>
  <globalOrc/>
  <globalSco/>
  <instrumentText>itone           ftgenonce 1, 0, 65536, 10, 3, 0, 1, 0, 0, 2                         ; sinoide wave
idistort	ftgenonce 2, 0, 65536, 13, 1, 1, 0, 3, 0, 2                         ; waveshape table

isustain        	init        p3 - i(&lt;attack&gt;)
p3          		=           p3 + i(&lt;decay&gt;)

ifundamental            =           &lt;fundamental&gt;
inumerator              =           p4
idenominator            =           p5
iamp                    =           p6
ipan                    =           p7
iratio                  =           inumerator / idenominator
ihertz                  =           ifundamental * iratio
kenvelope               transeg     0.0, i(&lt;attack&gt;) / 2.0, 2.5, iamp / 2.0, i(&lt;attack&gt;) / 2.0, -2.5, iamp, isustain, 0.0, iamp, i(&lt;decay&gt;) / 2.0, 2.5, iamp / 2.0, i(&lt;decay&gt;) / 2.0, -2.5, 0.0
asignal                 poscil3     kenvelope, ihertz, itone
asignal                 distort     asignal, &lt;DistortFactor&gt;, idistort
aleft, aright           pan2        asignal , ipan


aLeft, aRight           reverbsc    aleft, aright, &lt;ReverbscFeedback&gt;, &lt;cutoff&gt;
                        blueMixerOut (aLeft * &lt;ReverbscFeedback&gt;) + aleft, (aRight * &lt;ReverbscFeedback&gt;) + aright</instrumentText>
  <alwaysOnInstrumentText></alwaysOnInstrumentText>
  <graphicInterface editEnabled='false'>
    <gridSettings>
      <width>15</width>
      <height>15</height>
      <gridStyle>DOT</gridStyle>
      <snapGridEnabled>true</snapGridEnabled>
    </gridSettings>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>DistortFactor</objectName>
      <x>465</x>
      <y>60</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.61993</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>465</x>
      <y>150</y>
      <label>distortion</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBTextField'>
      <objectName>fundamental</objectName>
      <x>165</x>
      <y>165</y>
      <value>50</value>
      <textFieldWidth>50</textFieldWidth>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>165</x>
      <y>195</y>
      <label>fundamental</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>600</x>
      <y>150</y>
      <label>galm</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>ReverbscFeedback</objectName>
      <x>585</x>
      <y>60</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>1.0</maximum>
      <value>0.90999</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>45</x>
      <y>60</y>
      <label>&lt;html&gt;&lt;font size=&quot;+3&quot;&gt;&lt;b&gt;JustIntonation&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>165</x>
      <y>210</y>
      <label>frequency</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>attack</objectName>
      <x>465</x>
      <y>225</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>40.0</maximum>
      <value>4.79999</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>decay</objectName>
      <x>555</x>
      <y>225</y>
      <automationAllowed>true</automationAllowed>
      <minimum>0.0</minimum>
      <maximum>40.0</maximum>
      <value>32.3997</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>90</x>
      <y>30</y>
      <label>&lt;html&gt;&lt;font size=&quot;+2&quot;&gt;&lt;b&gt;LaMonteYoung&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>480</x>
      <y>315</y>
      <label>attack</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>570</x>
      <y>315</y>
      <label>decay</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>690</x>
      <y>150</y>
      <label>cutoff</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
      <objectName>cutoff</objectName>
      <x>675</x>
      <y>60</y>
      <automationAllowed>true</automationAllowed>
      <minimum>100.0</minimum>
      <maximum>15000.0</maximum>
      <value>13956.7</value>
      <knobWidth>60</knobWidth>
      <randomizable>true</randomizable>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>480</x>
      <y>195</y>
      <label>&lt;html&gt;&lt;font size=&quot;+2&quot;&gt;&lt;b&gt;envelope&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>510</x>
      <y>30</y>
      <label>&lt;html&gt;&lt;font size=&quot;+2&quot;&gt;&lt;b&gt;effects&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
    <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'>
      <objectName></objectName>
      <x>120</x>
      <y>90</y>
      <label>&lt;html&gt;&lt;font size=&quot;+3&quot;&gt;&lt;b&gt;Drone&lt;/b&gt;&lt;/font&gt;&lt;/html&gt;</label>
    </bsbObject>
  </graphicInterface>
  <bsbParameterList>
    <parameter uniqueId='1600521204' name='attack' label='' min='0.0' max='40.0' resolution='-1.0' automationEnabled='false' value='4.79999'>
      <line name='' version='2' max='40.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='4.79999'/>
      </line>
    </parameter>
    <parameter uniqueId='1600521208' name='cutoff' label='' min='100.0' max='15000.0' resolution='-1.0' automationEnabled='false' value='13956.7'>
      <line name='' version='2' max='15000.0' min='100.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='13956.7'/>
      </line>
    </parameter>
    <parameter uniqueId='1600521206' name='decay' label='' min='0.0' max='40.0' resolution='-1.0' automationEnabled='false' value='32.3997'>
      <line name='' version='2' max='40.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='32.3997'/>
      </line>
    </parameter>
    <parameter uniqueId='1600521200' name='DistortFactor' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false' value='0.61993'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.61993'/>
      </line>
    </parameter>
    <parameter uniqueId='1600521202' name='ReverbscFeedback' label='' min='0.0' max='1.0' resolution='-1.0' automationEnabled='false' value='0.90999'>
      <line name='' version='2' max='1.0' min='0.0' resolution='-1.0' color='-8355712' rightBound='false' endPointsLinked='false'>
        <linePoint x='0.0' y='0.90999'/>
      </line>
    </parameter>
  </bsbParameterList>
  <presetGroup name='Presets'/>
  <opcodeList/>
</instrument>