JDK-4503860 : MIDI Playback does not play smoothly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.3.1,1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95,windows_2000
  • CPU: x86
  • Submitted: 2001-09-18
  • Updated: 2003-01-30
  • Resolved: 2003-01-30
Related Reports
Duplicate :  
Duplicate :  
Description

Name: ddT132432			Date: 09/17/2001


C:\>java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

This problem is reproducable in Windows 2000 and Me.  My configurations :
Win 2000 : Dell Inspiron 8000 laptop
Win Me   : Hp Pavillion.   We have two of these machines, both exhibit the
problem.
Mac G4 running OS10.0.4, the MIDI file appears to playback correctly.

You may find the following file useful :
ftp://ftp.mgtsciences.com/pub/users/sun/Invention.mid

Load this file into Windows Media Player and play it.  This is the correct way
to playback this file.  Load it into Juke and play it.  You will notice that
the timing "walks" around.  You may need to play them back and forth a couple
of times to let your ear tune in to the difference.

Groove is less pronounced due to the nature of what's being played. The problem
is exposed in "Groove" at the point in time when the playback loops.  There is
a slight, but noticable timing error.  Perhaps someone who isn't a musician
wouldn't notice it.

  To expose the problem in "Groove" :
1.  Start Groove
2.  Click "loop"
3.  Listen closely at the end of the pattern when it loops.

I am writing a music transcription application in Java.  We are about to go to
Beta sites, and this could be a major show stopper.  
(Review ID: 132067) 
======================================================================

Comments
EVALUATION ###@###.### 2001-09-27 This is known behavior, and in general it is recommended to use Java Sound's software synthesizer. I leave it open as a bug so that we can try to fix this. I wrote an email to the original submitter with the following content, which is copied from the Support Readyness Document which is not released yet. 5.5.1 Soundbank not found / No MIDI playback / Unrythmic MIDI playback Problem: MIDI playback has very bad timing, sound "unrythmic". Problem: No MIDI sound is heard at all. Problem: No soundbank can be found. Cause: On win32 systems, the JRE does not ship with a soundbank. Applets or applications that are run through the JRE lack the soundbank. When a soundbank is missing, the default MIDI device is used. The code to access the system's MIDI device is unstable and results in bad timing of the played MIDI file. Note that double-clicking a jar file commonly invokes the JRE, even if a JDK is installed on the user's system. Solution: Install a soundbank as described in Section 7.7.3, "Installing a soundbank.". More information regarding soundbanks can be found in Section 7.8.4, "MIDI quality / Soundbank Considerations" 7.7.3 Installing a soundbank On Win32 systems, the JRE is shipped without a soundbank. To enable MIDI playback with the Java Sound Engine's software synthesizer, install a downloadable soundbank. Download a soundbank from http://java.sun.com/products/java-media/sound/ and copy it to the lib/audio subdirectory of the JRE installation. Note: On Win32 systems, the JRE is installed in \Program Files\JavaSoft\JRE\<version> ! 7.8.4 MIDI quality / Soundbank Considerations The MIDI synthesizer provided with the Java Sound, version 1.4 implementation uses wavetable synthesis to generate sound from MIDI commands. It loads instruments from a software soundbank file; each instrument uses one or more audio samples. Higher quality samples produce better sound; they also increase the size of the soundbank file and the memory load during sound synthesis. The Solaris operating system release of the Java 2 Platform, Standard Edition, version 1.4 includes a software soundbank, soundbank.gm, with a file size of less than one-half megabyte. On Win32, the Software Developer's Kit (SDK) release includes the same soundbank file; the Java Runtime Environment (JRE) release does not include a soundbank file at all. The Java Sound Home Page provides descriptions of and access to soundbank files of various sizes and quality levels, along with installation instructions. This information can be found at: http://java.sun.com/products/java-media/sound/.
11-06-2004

WORK AROUND Name: ddT132432 Date: 09/17/2001 None ======================================================================
11-06-2004

PUBLIC COMMENTS This will be fixed with the addition of a real-time sequencer in J2SE v1.5. for more information, see bug 4773012.
10-06-2004