<soundObject type='blue.soundObject.Sound'>
  <subjectiveDuration>2.0</subjectiveDuration>
  <startTime>13.734375</startTime>
  <name>Midi Out3.0</name>
  <backgroundColor>-12566464</backgroundColor>
  <instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
    <name>midi out_v3.0</name>
    <comment>Midi output for external hardware or software synthesizers.
This instrument can generate a gesture so you can hear quickly if the produced sound is the sound you are looking for. The program change dial can be adjusted while playing.
If the choice has been made, you can switch off the gesture and use scores like:
	i1 0 2  80 120		; note 80, velocity 120

My personal Csound command in Ubuntu include the options:
	-+rtmidi=alsaseq -Q16
It is making use of the alsasequencer driver, connecting the midioutput -Q to port 16 of my hardware midi output.
aconnect -o shows the right numbers of the midi outputs:
	client 16: &apos;M Audio Delta 1010&apos; [type=kernel]
    	0 &apos;M Audio Delta 1010 MIDI&apos;


For my external synth i have to substract 1 from the Program Change setting in order to get the corresponding value on my synths&apos; display.
On another synth i found that this substraction was not necessary.

version 3.0, September 2017
- latest GUI (Blue 2.7.0 or greater)

version 2:
- include test button to hear what sound the synth will produce while skipping through the sound banksusing the Program Change dial
- include 4 midi controllers: brightness, filter Q, panning and volume

october 2015</comment>
    <globalOrc/>
    <globalSco/>
    <instrumentText>;======program change=====================
    outkpc      &lt;channelPCh&gt;, &lt;ProgChange&gt;, 1, 127                              ;program change  

;=========================================

itest   =  i(&lt;testswitch&gt;)
if (itest == 0) then                                                            ;testbutton for external synth, using moscil

;======midi controllers===================
    outkc &lt;Channel&gt;, 74, &lt;CC74&gt;, 1, 127                                         ;brightness, filter Q, panning and volume
    outkc &lt;Channel&gt;, 71, &lt;CC71&gt;, 1, 127
    outkc &lt;Channel&gt;, 10, &lt;CC10&gt;, 1, 127
    outkc &lt;Channel&gt;,  7, &lt;CC07&gt;, 1, 127                              
    noteondur   &lt;Channel&gt;, p4 , p5, p3                                          ;noteondur ichn, inum, ivel, idur
else  
    seed    0                                                                   ;every time a different melody
    knum    random 40, 90                                                       ;random values for notes, velocity and pause
    knum    =   int(knum)
    kvel    random 40, 127
    kvel    =   int(kvel)
    kpause  random  0.1, .1
    moscil &lt;Channel&gt;, knum, kvel, .1, kpause                                    ;stream notes with length .1 seconds
;======midi controllers===================
    outkc &lt;Channel&gt;, 74, &lt;CC74&gt;, 1, 127                                         ;brightness, filter Q, panning and volume
    outkc &lt;Channel&gt;, 71, &lt;CC71&gt;, 1, 127
    outkc &lt;Channel&gt;, 10, &lt;CC10&gt;, 1, 127
    outkc &lt;Channel&gt;,  7, &lt;CC07&gt;, 1, 127    
endif

</instrumentText>
    <alwaysOnInstrumentText></alwaysOnInstrumentText>
    <graphicInterface editEnabled='false'>
      <gridSettings>
        <width>5</width>
        <height>5</height>
        <gridStyle>NONE</gridStyle>
        <snapGridEnabled>true</snapGridEnabled>
      </gridSettings>
      <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
        <objectName></objectName>
        <x>0</x>
        <y>0</y>
        <groupName>Group</groupName>
        <backgroundColor>0x00000033</backgroundColor>
        <borderColor>0x000000ff</borderColor>
        <labelTextColor>0xffffffff</labelTextColor>
        <titleEnabled>true</titleEnabled>
        <width>20</width>
        <height>20</height>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>115</x>
          <y>45</y>
          <label>out</label>
          <font>
            <name>System Bold</name>
            <size>36.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>185</x>
          <y>65</y>
          <label>v3.0</label>
          <font>
            <name>System Regular</name>
            <size>12.0</size>
          </font>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
          <objectName></objectName>
          <x>60</x>
          <y>130</y>
          <groupName>program change</groupName>
          <backgroundColor>0x669966ff</backgroundColor>
          <borderColor>0x1a1a1aff</borderColor>
          <labelTextColor>0xffffffff</labelTextColor>
          <titleEnabled>true</titleEnabled>
          <width>20</width>
          <height>20</height>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown' version='2'>
            <objectName>channelPCh</objectName>
            <x>45</x>
            <y>180</y>
            <automationAllowed>false</automationAllowed>
            <selectedIndex>0</selectedIndex>
            <fontSize>12</fontSize>
            <randomizable>false</randomizable>
            <bsbDropdownItemList>
              <bsbDropdownItem uniqueId='-1625890492'>
                <name>1</name>
                <value>1</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890491'>
                <name>2</name>
                <value>2</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890490'>
                <name>3</name>
                <value>3</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890489'>
                <name>4</name>
                <value>4</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890488'>
                <name>5</name>
                <value>5</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890487'>
                <name>6</name>
                <value>6</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890486'>
                <name>7</name>
                <value>7</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890485'>
                <name>8</name>
                <value>8</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890484'>
                <name>9</name>
                <value>9</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890483'>
                <name>10</name>
                <value>10</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890482'>
                <name>11</name>
                <value>11</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890481'>
                <name>12</name>
                <value>12</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890480'>
                <name>13</name>
                <value>13</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890479'>
                <name>14</name>
                <value>14</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890478'>
                <name>15</name>
                <value>15</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890477'>
                <name>16</name>
                <value>16</value>
              </bsbDropdownItem>
            </bsbDropdownItemList>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>17</x>
            <y>153</y>
            <label>to global channel</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
            <objectName>ProgChange</objectName>
            <x>16</x>
            <y>14</y>
            <automationAllowed>true</automationAllowed>
            <minimum>0.0</minimum>
            <maximum>127.0</maximum>
            <value>22.86</value>
            <knobWidth>100</knobWidth>
            <randomizable>true</randomizable>
            <valueDisplayEnabled>true</valueDisplayEnabled>
          </bsbObject>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
          <objectName></objectName>
          <x>230</x>
          <y>5</y>
          <groupName>Group</groupName>
          <backgroundColor>0x669966ff</backgroundColor>
          <borderColor>0x1a1a1aff</borderColor>
          <labelTextColor>0xffffffff</labelTextColor>
          <titleEnabled>false</titleEnabled>
          <width>20</width>
          <height>20</height>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown' version='2'>
            <objectName>Channel</objectName>
            <x>146</x>
            <y>22</y>
            <automationAllowed>false</automationAllowed>
            <selectedIndex>0</selectedIndex>
            <fontSize>12</fontSize>
            <randomizable>false</randomizable>
            <bsbDropdownItemList>
              <bsbDropdownItem uniqueId='-1625890476'>
                <name>1</name>
                <value>1</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890475'>
                <name>2</name>
                <value>2</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890474'>
                <name>3</name>
                <value>3</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890473'>
                <name>4</name>
                <value>4</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890472'>
                <name>5</name>
                <value>5</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890471'>
                <name>6</name>
                <value>6</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890470'>
                <name>7</name>
                <value>7</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890469'>
                <name>8</name>
                <value>8</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890468'>
                <name>9</name>
                <value>9</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890467'>
                <name>10</name>
                <value>10</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890466'>
                <name>11</name>
                <value>11</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890465'>
                <name>12</name>
                <value>12</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890464'>
                <name>13</name>
                <value>13</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890463'>
                <name>14</name>
                <value>14</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890462'>
                <name>15</name>
                <value>15</value>
              </bsbDropdownItem>
              <bsbDropdownItem uniqueId='-1625890461'>
                <name>16</name>
                <value>16</value>
              </bsbDropdownItem>
            </bsbDropdownItemList>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
            <objectName></objectName>
            <x>50</x>
            <y>300</y>
            <groupName>activate for testing</groupName>
            <backgroundColor>0x669966ff</backgroundColor>
            <borderColor>0x1a1a1aff</borderColor>
            <labelTextColor>0xffffffff</labelTextColor>
            <titleEnabled>true</titleEnabled>
            <width>20</width>
            <height>20</height>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
              <objectName>testswitch</objectName>
              <x>5</x>
              <y>10</y>
              <automationAllowed>true</automationAllowed>
              <label>TESTING 1,2,3...</label>
              <selected>false</selected>
              <randomizable>true</randomizable>
            </bsbObject>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
            <objectName></objectName>
            <x>35</x>
            <y>25</y>
            <label>send to channel:</label>
            <font>
              <name>System Regular</name>
              <size>12.0</size>
            </font>
          </bsbObject>
          <bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
            <objectName></objectName>
            <x>5</x>
            <y>60</y>
            <groupName>controllers</groupName>
            <backgroundColor>0x669966ff</backgroundColor>
            <borderColor>0x1a1a1aff</borderColor>
            <labelTextColor>0xffffffff</labelTextColor>
            <titleEnabled>true</titleEnabled>
            <width>20</width>
            <height>20</height>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>126</x>
              <y>58</y>
              <label></label>
              <font>
                <name>System Bold</name>
                <size>36.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>120</x>
              <y>184</y>
              <label>CC10</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>CC10</objectName>
              <x>112</x>
              <y>5</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>127.0</maximum>
              <bdresolution>1</bdresolution>
              <value>0.0</value>
              <sliderHeight>150</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>CC74</objectName>
              <x>6</x>
              <y>4</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>127.0</maximum>
              <bdresolution>1</bdresolution>
              <value>0.0</value>
              <sliderHeight>150</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>64</x>
              <y>184</y>
              <label>CC71</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>11</x>
              <y>184</y>
              <label>CC74</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>CC07</objectName>
              <x>165</x>
              <y>5</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>127.0</maximum>
              <bdresolution>1</bdresolution>
              <value>0.0</value>
              <sliderHeight>150</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
              <objectName>CC71</objectName>
              <x>58</x>
              <y>5</y>
              <automationAllowed>true</automationAllowed>
              <minimum>0.0</minimum>
              <maximum>127.0</maximum>
              <bdresolution>1</bdresolution>
              <value>0.0</value>
              <sliderHeight>150</sliderHeight>
              <randomizable>true</randomizable>
              <valueDisplayEnabled>true</valueDisplayEnabled>
            </bsbObject>
            <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
              <objectName></objectName>
              <x>176</x>
              <y>184</y>
              <label>CC07</label>
              <font>
                <name>System Regular</name>
                <size>12.0</size>
              </font>
            </bsbObject>
          </bsbObject>
        </bsbObject>
        <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
          <objectName></objectName>
          <x>27</x>
          <y>60</y>
          <label>midi</label>
          <font>
            <name>System Bold</name>
            <size>36.0</size>
          </font>
        </bsbObject>
      </bsbObject>
    </graphicInterface>
    <parameterList>
      <parameter uniqueId='-1625891373' name='testswitch' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-1625891371' name='CC10' label='' min='0.0' max='127.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='127.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-1625891369' name='CC07' label='' min='0.0' max='127.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='127.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-1625891367' name='CC74' label='' min='0.0' max='127.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='127.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-1625891365' name='CC71' label='' min='0.0' max='127.0' bdresolution='1' automationEnabled='false' value='0.0'>
        <line name='' version='2' max='127.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
      <parameter uniqueId='-1625891363' name='ProgChange' label='' min='0.0' max='127.0' bdresolution='-1' automationEnabled='false' value='22.86'>
        <line name='' version='2' max='127.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='true' endPointsLinked='false'>
          <linePoint x='0.0' y='0.0'/>
          <linePoint x='1.0' y='0.0'/>
        </line>
      </parameter>
    </parameterList>
    <presetGroup name='Presets'/>
    <opcodeList/>
  </instrument>
  <comment>Midi output test Utility for external hardware or software synthesizers.
This instrument can generate a gesture so you can hear quickly if the produced sound is the sound you are looking for. The program change dial can be adjusted while playing.
If the choice has been made, you can switch off the gesture and use scores like:
	i1 0 2  80 120		; note 80, velocity 120

My personal Csound command in Ubuntu include the options:
	-+rtmidi=alsaseq -Q16
It is making use of the alsasequencer driver, connecting the midioutput -Q to port 16 of my hardware midi output.
aconnect -o shows the right numbers of the midi outputs:
	client 16: &apos;M Audio Delta 1010&apos; [type=kernel]
    	0 &apos;M Audio Delta 1010 MIDI&apos;


For my external synth i have to substract 1 from the Program Change setting in order to get the corresponding value on my synths&apos; display.
On another synth i found that this substraction was not necessary.

version 3.0, September 2017
- latest GUI (Blue 2.7.0 or greater)

version 2:
- include test button to hear what sound the synth will produce while skipping through the sound banksusing the Program Change dial
- include 4 midi controllers: brightness, filter Q, panning and volume

version 1.0, october 2015</comment>
</soundObject>