JDK-4716399 : RFE: add method to know the Track from a MetaMessage
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_98
  • CPU: x86
  • Submitted: 2002-07-17
  • Updated: 2021-07-13
Description

Name: gm110360			Date: 07/17/2002


FULL PRODUCT VERSION :
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)



FULL OPERATING SYSTEM VERSION :
Windows 98 [Versie 4.10.1998]


A DESCRIPTION OF THE PROBLEM :
A class that implements
the javax.sound.midi.MetaEventListener interface cannot
determine from what javax.sound.midi.Track a MetaMessage
originates from. This makes it impossible to e.g. assign
lyrics (MetaMessage type 5) to the correct track in a
multi-track karaoke application. This can be solved in 2
ways, both of which have their advantages:
1.- let the MetaEventListener determine the Track a
MetaMessage comes from, by adding a method getTrack() to
javax.sound.midi.MetaMessage or javax.sound.midi.MidiMessage
2.- let a MetaEventListener to listen to track, by adding
the method signature addMetaEventListener(MetaEventListener,
Track) to javax.sound.midi.Sequencer

I would prefer solution 2, because a MetaMessage as such is
not Track-corelated (it is added to a Track only after
constructing it and wrapping it in a MidiEvent, I believe).
So it is at occurence time (when the meta method of the
MetaEventListener is fired), that a MetaMessage belongs to a
Track.

This bug can be reproduced always.
(Review ID: 144280) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
14-06-2004

PUBLIC COMMENTS RFE: add method to know the Track from a MetaMessage
10-06-2004

EVALUATION ###@###.### 2002-07-18 This is a valid request. MetaMessage.getTrack() would solve the issue, but is not nice because MetaMessages need not be bound to a track. The best would be if the meta event included the track number. Committed to Tiger. ###@###.### 2003-01-30 Changed synopsis (was: "MetaMessage need getTrack() method, addMetaEventListener() need track param"). ###@###.### 2003-09-22 No consistent solution found in tiger time-frame. Commit to mustang.
22-09-2003