Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: midi file output

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default midi file output

    From the title for my thread, it is obvious that I am a real noob to java programming. I will be more specific.
    While using the program Soundhelix, I decided it would be useful to me to have the program output midi files instead or in addition to the .log file which contains the randomly generated seeds and parameters for each song rendered. The question is how to?

    java CreateSequence midi_file

    is used to to construct a Sequence object with a Track and MidiEvents in memory and save it to a Standard MIDI File (SMF). Where do I place this command? The program is controlled by .xml files. It seems to me I could place my command somewhere in the main .xml script "SoundHelix-Piano.xml." Here is the majority of the script:

     
    <variable name="songName">${adjective} ${subject}'s ${adjective} ${animal}${optionalEnding},The ${adjective} 
     
    ${animal}${optionalEnding}</variable>
      </songNameEngine>
      <structure>
         <bars><random min="80" max="128" 
     
    step="16"/></bars> 
         <beatsPerBar>4</beatsPerBar>
         <ticksPerBeat>4</ticksPerBeat>
      </structure>
     
     
    <harmonyEngine class="PatternHarmonyEngine">
        <chordPattern>0/4,1/4,1/4,2!1/4</chordPattern>
     
     
    <chordPattern>0/4,1/4,1/4,1/2,2!3/2</chordPattern>
     
     
    <chordPattern>0/4,1/4,1/4,1/2,1/2,0/4,1/4,1/4,1/2,2/2</chordPattern>
        <chordPattern>0/8,1/4,2/4</chordPattern>
     
     
    <chordPattern>0/8,1/8,1/8,1!1/8</chordPattern>
        <chordPattern>0/8,1/4,1/2,2/2,$0/8,1/4,$2/2,$3/2</chordPattern> 
     
     
     <chordPattern>0/4,1/4,1/2,1/2,1/2,2/2</chordPattern>
     
     
    <chordPattern>0/4,1/4,1/4,1/4,0/4,1/4,1/4,2/4</chordPattern>
     
     
    <chordPattern>0/4,1/4,1/4,1/4,0/4,1/4,1/4,1/2,2/2</chordPattern>
        <chordPattern>0/4,1/4,1/2,1/2,2/4</chordPattern>
     
     
       <chordPattern>0/2,1/2,1/2,2/2,$0/2,$1/2,$2/2,2/2,$0/2,$1/2,$2/2,$3/2,$0/2,$1/2,1/2,2/2</chordPattern>
     
     
    <chordPattern>0/4,1/4,$0/4,1/2,$1/2</chordPattern>
     
     
    <chordPattern>0/2,1/2,1/2,2/2,$0/2,$1/2,$2/2,2/2</chordPattern>
     
     
    <chordPattern>0/2,1/2,$0/2,$1/2,$0/2,$1/2,1/2,1/2</chordPattern>
        <chordPattern>0/16,1/8,1/8</chordPattern>
     
     
    <chordPattern>0/32,+1/16,1/8,1/4,1/4</chordPattern>
        <chordPattern>0/8,1/8,$0/8,1/8</chordPattern>
     
     
    <chordPattern>0/8,1/8,$0/8,$1/8</chordPattern>
        <chordPattern>0/16,1/8,1/8,+$0/16,1/8,1/4,1/4</chordPattern>
     
     
    <chordPattern>0/7,1/1,0/6,1/2,$0/7,$1/1,$2/6,1/2</chordPattern>  
     
     
    <chordPattern>0/7,1/1,0/7,1/1,$0/7,$1/1,$2/6,1/2</chordPattern>  
        <chordPattern>0/12,1/4,$0/12,1/4</chordPattern>
     
     
       <chordPattern>0/12,1/4,$0/8,1/8</chordPattern>
        <chordPattern>0/6,1/2,1/8,1!0/8,1!1/8</chordPattern>
     
     
    <chordPattern>0/6,1/2,1/8,1!0/6,1!1/2,1!2/8</chordPattern>
     
     
    <chordPattern>0/8,1/8,1/8,1/8,+$0/8,1/8,1/8,1/8</chordPattern>
        <chordPattern>0/8,1/8,0!0/8,1!1/8</chordPattern>
     
     
     
       <chordPattern>Am/4,C/4,Am/4,F/2,C/2,Am/4,C/4,Am/4,Dm/2,F/2</chordPattern>
     
     
    <chordPattern>C/4,G/8,C/8,F/4,C/2,G/2,C/4,+C/4,G/4,Am/4,Em/4,F/4,C/4,F/4,G/4</chordPattern>
     
     
     
    <chordRandomTable>Am,Am,Am,Am</chordRandomTable>
        <chordRandomTable>C,Am,G,F,Em,Dm</chordRandomTable>
     
     
    <chordRandomTable>C,Am,G,F,Em,Dm</chordRandomTable>
      </harmonyEngine>
      <arrangementEngine 
     
    class="SimpleArrangementEngine">
        <maxIterations>200000</maxIterations>
        <minActivityCount>3</minActivityCount>
     
     
      <maxActivityCount>8</maxActivityCount>
        <maxActivityChangeCount>2</maxActivityChangeCount>
     
     
    <startActivityCounts><random list="1,2,3,4|1,2,3,4,5"/></startActivityCounts>
        <stopActivityCounts><random 
     
    list="2,1|3,2|4,3,2"/></stopActivityCounts>
        <activityVector name="accomp">
          <stopShift>-2</stopShift>
     
     
    </activityVector>
        <activityVector name="arpeggio">
        </activityVector>
        <activityVector name="melody">
     
     
    <startAfterSection>3</startAfterSection>
          <stopBeforeSection>1</stopBeforeSection>
          <stopShift>-
     
    3</stopShift>
        </activityVector>
        <activityVector name="base_and_snare">
     
     
    <startAfterSection>0</startAfterSection>
          <stopBeforeSection>0</stopBeforeSection>
     
     
    <minActive>50</minActive>
          <maxActive>85</maxActive>
        </activityVector>
        <activityVector name="hihat">
     
     
    <startAfterSection>0</startAfterSection>
          <stopBeforeSection>0</stopBeforeSection>
        </activityVector>
     
     
    <activityVector name="pad"/>
        <activityVector name="bass">
          <startAfterSection>0</startAfterSection>
     
     
    </activityVector>
        <activityVector name="randombass">
          <startAfterSection>1</startAfterSection>
     
     
    <stopBeforeSection>0</stopBeforeSection>
        </activityVector>
        <activityVector name="plonk"/>
        <activityVector 
     
    name="chord"/>
     
        <track>
          <instrument>arpeggio</instrument>
          <transposition>-12</transposition>
     
     
    <sequenceEngine class="MultiPatternSequenceEngine">
      	    <obeyChordSubtype>true</obeyChordSubtype>
     
     
    <patternEngines>
    		  <patternEngine class="StringPatternEngine">
    		    <string>-/6,4/2</string>
     
     
    	  </patternEngine>
    		  <patternEngine class="StringPatternEngine">
    		    <string>
     
    -/4,3/4</string>
    		  </patternEngine>
    		  <patternEngine class="StringPatternEngine">
     
     
        <string>-/2,2/6</string>
    		  </patternEngine>
    		  <patternEngine 
     
    class="StringPatternEngine">
    		    <string>0/8</string>
    		  </patternEngine>
     
     
    </patternEngines>
    		<patternEngines>
    		  <patternEngine class="StringPatternEngine">
     
     
        <string>2/8</string>
    		  </patternEngine>
    		  <patternEngine 
     
    class="StringPatternEngine">
    		    <string>-/2,0/6</string>
    		  </patternEngine>
     
     
    <patternEngine class="StringPatternEngine">
    		    <string>-/4,1/4</string>
    		  </patternEngine>
     
     
    	  <patternEngine class="StringPatternEngine">
    		    <string>-/6,0/2</string>
     
     
    </patternEngine>
    		</patternEngines>
    		<patternEngines>
    		  <patternEngine 
     
    class="StringPatternEngine">
    		    <string>3/8</string>
    		  </patternEngine>
     
     
    <patternEngine class="StringPatternEngine">
    		    <string>-/2,1/6</string>
    		  </patternEngine>
     
     
    	  <patternEngine class="StringPatternEngine">
    		    <string>-/4,2/4</string>
     
     
    </patternEngine>
    		  <patternEngine class="StringPatternEngine">
    		    <string>-/6,0/2</string>
     
     
    	  </patternEngine>
    		</patternEngines>
          </sequenceEngine>
     
     
    <activityVector>arpeggio</activityVector>
        </track>
        <track>
          <instrument>accomp</instrument>
     
     
    <transposition>-24</transposition>
          <sequenceEngine class="MultiPatternSequenceEngine">
    	    <patternEngines>
     
     
    	  <patternEngine class="StringPatternEngine">
    		  <string>-,-,-,-,5,-,-,-,-,-,-,-,5,-,-,-</string>
     
     
    	  </patternEngine>
    		  <patternEngine class="StringPatternEngine">
    		  <string>-,-,-,
     
    -,4,-,-,-,-,-,-,-,4,-,-,-</string>
    		  </patternEngine>
    		  <patternEngine 
     
    class="StringPatternEngine">
    		  <string>-,-,-,-,3,-,-,-,-,-,-,-,3,-,-,-</string>
     
     
    </patternEngine>
    		  <patternEngine class="StringPatternEngine">
    		  <string>0,-,-,0,-,-,0,-,
     
    -,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,-,0,-,-,-,+,-,0,
     
    -,-,0,-,-,0,-,-,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,-,0,-,-,-,-,-,0,-,-,0,-,-,0,-,-,
     
    -,0,-,-,-,-1,+</string>
    		  </patternEngine>
    		</patternEngines>
          </sequenceEngine>
     
     
    <activityVector>accomp</activityVector>
        </track>
    <!--    <track>
          <instrument>chord</instrument>
     
     
    <sequenceEngine class="ChordSequenceEngine">
            <patternEngine class="StringPatternEngine">
              <string>-,
     
    -,0,-</string>
            </patternEngine>
          </sequenceEngine>
          <activityVector>chord</activityVector>
     
     
    </track> -->
        <track>
          <instrument>melody</instrument>
          <transposition>12</transposition>
     
     
    <sequenceEngine class="MelodySequenceEngine">
     	    <patternEngine class="StringPatternEngine">
              <string>0,
     
    -,-,-,+,-,+,+,0,-,-,-,+,-,+,-,0,-,-,-,+,-,+,+,0,-,-,-,0,+,+,+</string>
    		  <string>0,-,-,-,-,-,-,-,0,-,+,
     
    -,0,-,+,-,0,-,-,-,-,-,-,-,0,-,+,-,0,-,+,-,0,-,-,-,-,-,-,-,0,-,+,-,0,-,+,-,0,-,-,-,-,-,-,-,0,-,+,-,0,-,+,+,0,-,-,-,
     
    -,-,-,-,0,-,+,-,0,-,+,-,0,-,-,-,-,-,-,-,0,-,+,-,0,-,+,-,0,-,-,-,-,-,-,-,0,-,+,-,0,-,+,-,0,-,-,-,-,-,-,0,-,-,+,-,
     
    -,0,-,+</string>
              <string>0,-,-,0,-,-,+,-,0,-,-,0,-,-,+,-,0,-,-,0,-,-,+,-,0,-,-,0,-,+,0,+</string>
     
     
    <string>0,-,-,-,0,-,-,-,0,-,0,-,-,-,-,-,0,-,+,-,+,-,+,-,0,-,-,-,-,-,-,-,0,-,-,-,0,-,-,-,0,-,0,-,-,-,-,-,0,-,+,-,+,
     
    -,+,-,0,-,+,-,-,0,-,0</string>
              <string>0,-,-,-,0,-,-,-,0,-,-,+,-,-,-,+,0,-,-,-,0,-,-,-,-,+,-,0,-,-,0,-,0,
     
    -,-,-,0,-,-,-,0,-,-,+,-,-,-,+,0,-,-,-,0,-,-,-,+,-,-,0,-,0,-,+</string>
              <string>0,-,+,-,0,-,+,-,0,+,-,0,-,
     
    -,-,+,0,-,+,-,0,-,+,-,0,+,-,0,-,-,-,-</string>
              <string>0,-,-,-,0,-,-,0,-,-,+,-,-,0,-,-,0,-,-,+,-,-,-,0,-,
     
    -,+,-,-,0,-,+,0,-,-,+,-,-,-,0,-,-,+,-,-,0,-,-,0,-,-,+,-,-,-,0,-,-,+,-,0,-,0,-</string>
              <string>0,-,-,-,-,
     
    -,-,-,0,-,+,-,+,-,+,-,0,+,-,+,0,-,+,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,+,-,+,-,-,0,-,0,-,+,0,-,+,-,0,-,-,-,-,
     
    -,0,-</string>
    		</patternEngine>
    	  </sequenceEngine>
          <activityVector>melody</activityVector>
     
     
    </track>
     
    	<track>
          <instrument>percussion</instrument>
          <sequenceEngine 
     
    class="DrumSequenceEngine">
            <pattern>
              <pitch>36</pitch>
              <patternEngine 
     
    class="StringPatternEngine">
                <string><random list="0,-,-,0,-,-,-,0,-,-,0,-,-,-,-,-|0,-,-,-,-,-,-,0,-,
     
    -,0,-,-,-,-,-,0,-,-,-,-,-,-,0,-,-,0,-,-,0,-,-,0,-,-,-,-,-,-,0,-,-,0,-,-,-,-,-,0,-,-,-,-,-,-,0,-,-,0,-,-,0,-,0|0,
     
    -,0,-,-,-,-,-,-,-,0,-,-,-,0,-,0,-,0,-,-,-,-,-,-,-,-,0,-,-,0,-"/></string>
              </patternEngine>
     
     
    </pattern>
            <pattern>
              <pitch>38</pitch>
              <patternEngine class="StringPatternEngine">
     
     
      <string><random list="-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,
     
    -,-,-,-,-,-,-,0,-,-,-,-,0,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,
     
    -,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,0,-,0,-,-,0,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,
     
    -,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,0,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,
     
    -,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,0,-,0,-,0,0|-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,
     
    -,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,0,0,-,0,-,-,-,-,-,0,-,-,-,-,-,
     
    -,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,0,-,-,0,-,-,-|-,-,-,
     
    -,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,
     
    -,0,-,-,0|-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,0,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,
     
    -,0,-,-,-,-,0,-,-,0,-,0,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,-,-,-,-,-,0,-,-,0,-,-,-,-,0,-,-,-,-,-,-,
     
    -,0,-,-,-,-,-,-,-,0,-,-,-,-,0,-,-,0,-,0,0,"/></string>
              </patternEngine>
            </pattern>
     
     
    <pattern>
              <pitch>42</pitch>
              <patternEngine class="StringPatternEngine">
                <string><random 
     
    list="0:26000,-,-,-|0:26000,0:26000,-,-|0:26000,-,-,-,0:26000,-,-,-,0:26000,-,-,-,0:26000,0:26000,-,-"/></string>
     
     
          </patternEngine>
            </pattern>
    		<pattern>
              <pitch>46</pitch>
              <patternEngine 
     
    class="StringPatternEngine">
                <string>-,-,0:20000,-</string>
              </patternEngine>
            </pattern>
     
     
         <conditionalPattern>
              <target>1</target>
              <condition>0---&gt;1---</condition>
     
     
    <mode>replace</mode>
              <probability>40</probability>
              <patternEngine class="StringPatternEngine">
     
     
           <string><random 
     
    list="0:6,0:32,0:89,0:182,0:317,0:499,0:734,0:1024,0:1375,0:1789,0:2271,0:2822,0:3447,0:4149,0:4930,0:5793,0:6741,0:
     
    7776,0:8901,0:10119,0:11432,0:12842,0:14351,0:15962,0:17677,0:19498,0:21427,0:23467,0:25618,0:27884,0:30266,0:32767|
     
    0:1,0:6,0:16,0:32,0:56,0:89,0:130,0:182,0:243,0:317,0:402,0:499,0:610,0:734,0:872,0:1024,0:1192,0:1375,0:1574,0:1789
     
    ,0:2021,0:2271,0:2537,0:2822,0:3125,0:3447,0:3788,0:4149,0:4529,0:4930,0:5351,0:5793,0:6256,0:6741,0:7247,0:7776,0:8
     
    327,0:8901,0:9499,0:10119,0:10763,0:11432,0:12124,0:12842,0:13584,0:14351,0:15144,0:15962,0:16806,0:17677,0:18574,0:
     
    19498,0:20449,0:21427,0:22433,0:23467,0:24528,0:25618,0:26737,0:27884,0:29061,0:30266,0:31502,0:32767|0:1,0:1,0:3,0:
     
    6,0:10,0:16,0:23,0:32,0:43,0:56,0:71,0:89,0:108,0:130,0:155,0:182,0:211,0:243,0:279,0:317,0:358,0:402,0:449,0:499,0:
     
    553,0:610,0:670,0:734,0:801,0:872,0:946,0:1024,0:1106,0:1192,0:1282,0:1375,0:1472,0:1574,0:1680,0:1789,0:1903,0:2021
     
    ,0:2144,0:2271,0:2402,0:2537,0:2677,0:2822,0:2971,0:3125,0:3284,0:3447,0:3615,0:3788,0:3966,0:4149,0:4336,0:4529,0:4
     
    727,0:4930,0:5138,0:5351,0:5569,0:5793,0:6022,0:6256,0:6496,0:6741,0:6991,0:7247,0:7509,0:7776,0:8049,0:8327,0:8611,
     
    0:8901,0:9197,0:9499,0:9806,0:10119,0:10438,0:10763,0:11095,0:11432,0:11775,0:12124,0:12480,0:12842,0:13210,0:13584,
     
    0:13964,0:14351,0:14744,0:15144,0:15550,0:15962,0:16381,0:16806,0:17238,0:17677,0:18122,0:18574,0:19033,0:19498,0:19
     
    970,0:20449,0:20935,0:21427,0:21927,0:22433,0:22946,0:23467,0:23994,0:24528,0:25070,0:25618,0:26174,0:26737,0:27307,
     
    0:27884,0:28469,0:29061,0:29660,0:30266,0:30880,0:31502,0:32130,0:32767"/></string>
              </patternEngine>
     
     
    </conditionalPattern>
            <conditionalPattern>
              <target>0</target>
              <condition>1---&gt;0---
     
    </condition>
              <mode>add</mode>
              <probability>40</probability>
              <patternEngine 
     
    class="StringPatternEngine">
                <string><random list="0,0,0,0|0,0,0,0,0,0,0,0"/></string>
     
     
    </patternEngine>
            </conditionalPattern>
     
          </sequenceEngine>
     
     
    <activityVector>base_and_snare</activityVector>	
          <activityVector>base_and_snare</activityVector>
     
     
    <activityVector>hihat</activityVector>
          <activityVector>hihat</activityVector>
    	</track>
     
     
     
    <track>
          <instrument>pad</instrument>
          <sequenceEngine class="PadSequenceEngine">
     
     
    <offsets>0,1,2</offsets>
    		<velocity>12000</velocity>
          </sequenceEngine>
     
     
    <activityVector>pad</activityVector>	      
    	</track>
     
        <track>
    	  <transposition>-24</transposition>
     
     
         <instrument>bass</instrument>
          <sequenceEngine class="PatternSequenceEngine">
    	    <patternEngine 
     
    class="StringPatternEngine">
            <string>0,-,-,-,0,-,-,0,-,-,0,-,-,-1,-,-,0,-,-,-,0,-,-,0,-,-,0,-,-,-,+,-,0,-,-,
     
    -,0,-,-,0,-,-,0,-,-,-1,-,-,0,-,-,-,0,-,-,0,-,0,-,-,0,-,+,-</string>
    		<string>0,-,-,0,-,-,0,2,0,-,-,0,-,
     
    -,-1,-,0,-,-,0,-,-,0,2,0,-,-,0,-,-,-1,-,0,-,-,0,-,-,0,2,0,-,-,0,-,-,-1,-,0,-,-,0,-,-,0,2,0,-,-,0,-,-,1,-</string>
     
     
        <string>0,-,0,-,0,-,-,0,-,0,-,0,0,-,+,-</string> 
            <string>0,-,-,-,0,-,-,-,0,-,-,0,-,-,+,-,0,-,-,-,0,-,
     
    -,0,-,-,0,-,-,0,+,-,0,-,-,-,0,-,-,-,0,-,-,0,-,-,+,-,0,-,-,-,0,-,-,0,-,-,0,-,0,-,+,-</string>
            <string>-,-,0,
     
    -,-,-,0,-,-,-,0,-,-,-,0,-,-,-,0,-,-,-,0,-,-,-,0,-,-,-,+,-</string>
            <string>0,-,-,-,0,-,-,-,0,-,-,0,-,-,0,
     
    -,0,-,-,-,0,-,-,-,0,-,-,2,-,-,+,-,0,-,-,-,0,-,-,-,0,-,-,0,-,-,0,-,0,-,-,-,0,-,-,-,0,-,-,0,-,-,+,-</string>
     
     
    <string>0,-,-,3,-,-,0,-,1,-,-,0,-,-,3,-,0,-,-,3,-,-,0,-,1,-,-,0,-,2,1,-</string>
    		</patternEngine>
     
     
      </sequenceEngine>
          <activityVector>bass</activityVector>
        </track>
     
        <track>
          <transposition>-
     
    36</transposition>
          <instrument>randombass</instrument>
          <sequenceEngine class="PatternSequenceEngine">
     
     
        <patternEngine class="RandomPatternEngine"> 
                <patternTicks>16</patternTicks>
     
     
    <patternString><random list="A1,A2,A1,A3|A1,A2,A1,A3,A1,A2,A1,A4"/></patternString>
     
     
    <noteProbability>75</noteProbability>
                <legatoProbability>0</legatoProbability>
     
     
    <minVelocity>32767</minVelocity>
                <maxVelocity>32767</maxVelocity>
     
     
    <minActiveTicks>8</minActiveTicks>
                <maxActiveTicks>15</maxActiveTicks>
     
     
    <offsets>0,0,0,2,3,0,0,0</offsets>
                <noteLengths>1,2,3,2</noteLengths>
     
     
    <pauseLengths>1,2</pauseLengths>
                <pitchVelocityCorrelation>100</pitchVelocityCorrelation>
     
     
    <velocityExponent>3</velocityExponent>
            </patternEngine>
          </sequenceEngine>
     
     
    <activityVector>randombass</activityVector>
        </track>
     
        <!-- <track>
          <transposition>0</transposition>
     
     
      <instrument>plonk</instrument>
          <sequenceEngine class="PatternSequenceEngine">         
     
     
    <patternEngine class="RandomPatternEngine"> 
                <patternTicks>8</patternTicks>
     
     
    <patternString><random list="A1,A2,A1,A3|A1,A2,A1,A3,A1,A2,A1,A4"/></patternString>
     
     
    <noteProbability>90</noteProbability>
                <legatoProbability>0</legatoProbability>
     
     
    <minVelocity>28000</minVelocity>
                <maxVelocity>28000</maxVelocity>
     
     
    <minActiveTicks>6</minActiveTicks>
                <maxActiveTicks>8</maxActiveTicks>
     
     
    <offsets>0,1,2,3,4,5</offsets>
                <noteLengths>1</noteLengths>
                <pauseLengths>1</pauseLengths>
     
     
           <pitchVelocityCorrelation>100</pitchVelocityCorrelation>
                <velocityExponent>3</velocityExponent>
     
     
          </patternEngine>
          </sequenceEngine>
          <activityVector>plonk</activityVector>
        </track> -->
     
     
     
    </arrangementEngine>
     
      <player class="MidiPlayer">
        <bpm><random min="120" max="140" type="normal" 
     
    variance="7"/></bpm>
        <transposition><random min="64" max="68"/></transposition>
     
     
    <beforePlayWaitTicks>0</beforePlayWaitTicks>
        <afterPlayWaitTicks>16</afterPlayWaitTicks>
        <groove><random 
     
    list="100|110,90|115,85|125,75,115,85|130,70"/></groove>
        <device name="device1" 
     
    clockSynchronization="true">Microsoft GS Wavetable Synth,Microsoft GS Wavetable SW Synth,Java Sound 
     
    Synthesizer</device>
    	<map instrument="arpeggio" device="device1" channel="1" program="1"/>
    	<map 
     
    instrument="accomp" device="device1" channel="2" program="1"/>
    	<map instrument="melody" device="device1" 
     
    channel="3" program="2"/>
    	<map instrument="pad" device="device1" channel="4" program="92"/>
    	<map 
     
    instrument="bass" device="device1" channel="5" program="40"/>
        <map instrument="randombass" device="device1" 
     
    channel="6" program="40"/>
        <!-- <map instrument="plonk" device="device1" channel="7" program="1"/> -->
    	<map 
     
    instrument="percussion" device="device1" channel="10"/>
    <!--	<map instrument="chord" device="device2" channel="1" 
     
    program="1"/> -->
      </player>
    </SoundHelix>

    I would really appreciate some help here.
    Sincerely,
    dkuyp11


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: midi file output

    I'm afraid I have no experience working with MIDI in Java or Soundhelix.

    I will look into it but hopefully one of our other members will be able to help shortly

    It may be worth contacting them direct - SourceForge.net: SoundHelix - Support
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: midi file output

    I did contact Soundhelix on sourceforge.net. I received no reply and a new version has since been released, from which I quoted the .xml. Thanks for considering my questions!
    dkuyp11

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: midi file output

    Hopefully you will hear back from them. I've looked it over but don't have a clue what's going on!
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  5. #5
    Junior Member
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: midi file output

    SoundHelix supports writing songs as MIDI files since version 0.5. Go to the SoundHelix website for more information.

Similar Threads

  1. Applying a MIDI instrument change to a Track
    By AnkleSpankle in forum Java Theory & Questions
    Replies: 3
    Last Post: January 23rd, 2011, 02:34 PM
  2. Input/Output file help
    By Plural in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 25th, 2010, 08:34 PM
  3. Input/Output file help
    By Plural in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 23rd, 2010, 06:26 PM
  4. Output an int i to a file
    By NightFire91 in forum Java Theory & Questions
    Replies: 2
    Last Post: August 17th, 2010, 10:45 AM
  5. Writing Output To New File
    By Scottj996 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: January 6th, 2010, 06:25 PM