Subject: kern/33614: sequencer (/dev/music) mishandles tempo/timebase changes
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <nblists@anastigmatix.net>
List: netbsd-bugs
Date: 05/31/2006 22:10:00
>Number: 33614
>Category: kern
>Synopsis: sequencer (/dev/music) mishandles tempo/timebase changes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 31 22:10:00 +0000 2006
>Originator: Chapman Flack
>Release: any to date since sequencer added
>Organization:
>Environment:
any
>Description:
Using the sequencer's SEQ_TMR_TEMPO event during sequencing, or the
SEQUENCER_TMR_{TEMPO,TIMEBASE} ioctls, will throw off the timing; a
tempo reduction results in a longish delay before sequencing resumes,
while a tempo increase results in a number of subsequent events being
played simultaneously.
The trouble is in the sequencer's internal use of absolute times,
without accounting for the effect of tempo change on the correspondence
of its beat units to wall time already past.
>How-To-Repeat:
Play a MIDI file containing tempo changes, using a player program that
actually changes the sequencer's tempo in response. (The problem was
cloaked by midiplay(1) setting the sequencer to a fixed tempo and doing
all adjustments in userland, and was exposed in the process of changing
midiplay(1) to use the sequencer tempo.)
>Fix:
Requires the sequencer to track the absolute time of the last tempo
change. In the chap-midi branch.