title: How can I create a sound fade out effect
body: <p>using this code    </p>
  
  <pre><code>for (int k = 0; k &lt; 16; k++) {
      Track track = musicS.createTrack();
      track.add(new MidiEvent(new ShortMessage(ShortMessage.CONTROL_CHANGE, k, 7, 20), track.ticks() -3));
  }
  </code></pre>
  
  <p>How can I make the volume fade out  <strong>right before the song ends</strong> </p>