Opened 12 years ago

Closed 5 years ago

#6314 closed defect (fixed)

KYRA: Wrong MIDI notes sometimes heard at beginning of new s

Reported by: eriktorbjorn Owned by: athrxx
Priority: normal Component: Engine: Kyra
Version: Keywords:
Cc: Game: Kyrandia 2

Description

English talkie version of Kyrandia 2 Current Git snapshot

When the music changes between rooms, it is first faded down and then the new song is played. But in some cases, you can still hear the tail end of the notes of the old song at the beginning of the new one. As best as I can understand, once the music has faded out, we tell the MIDI device to end the notes. But this does not actually end them immediately, because there is an optional "decay" phase to the note. I'm attaching a savegame for one of the more obvious cases. Just walk down, back to the (no longer) petrified forest.

I haven't been able to find a way to end the note immediately.

Ticket imported from: #3612654. Ticket imported from: bugs/6314.

Attachments (2)

kyra2-cd.035 (21.2 KB ) - added by eriktorbjorn 12 years ago.
Savegame near the petrified forest
music-glitch-possible-fix.txt (3.4 KB ) - added by eriktorbjorn 12 years ago.
Barely tested proof-of-concept patch

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 12 years ago

Attachment: kyra2-cd.035 added

Savegame near the petrified forest

comment:1 by eriktorbjorn, 12 years ago

One possible would be to (usually) not set the volume immediately, but rather wait until there is a "note on" event on that channel. I don't know if this will automatically terminate the old note, so my main reasoning was to potentially give the old note a bit longer to die.

I'm attaching a barely tested proof-of-concept patch.

comment:2 by eriktorbjorn, 12 years ago

Component: Engine: Kyra
Game: Kyrandia 2

by eriktorbjorn, 12 years ago

Barely tested proof-of-concept patch

comment:3 by eriktorbjorn, 12 years ago

Owner: set to lordhoto

comment:4 by digitall, 6 years ago

Owner: lordhoto removed

comment:5 by athrxx, 5 years ago

Owner: set to athrxx
Resolution: fixed
Status: newclosed

I have committed a fix for this.
It works for me with the standard Windows "Microsoft GS Wavetable Synth" and with our builtin MT-32 emulation. I haven't tested any hardware devices.

Note: See TracTickets for help on using tickets.