Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#5970 closed defect (fixed)

SCI: LB1: Clock chime is too fast

Reported by: SF/kurufinwe Owned by: wjp
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: Laura Bow 1: The Colonel's Bequest

Description

Using ScummVM 1.5.0git2329 on Windows 7 64-bit.

See the attached sound file. The first part is from DOSBox, the second part from ScummVM. Clearly, ScummVM is going too fast. More accurately, it seems to be missing some delay between the various parts of the tune. Notice how the three 4-note bits have the right tempo, but the time between each of them is too short. And the seven notes to indicate the hour sound like they're played by a jackhammer.

The problem occurs with both the AdLib emulator and the MT-32 emulator.

Ticket imported from: #3487090. Ticket imported from: bugs/5970.

Attachments (2)

lb1.ogg (150.9 KB ) - added by SF/kurufinwe 8 years ago.
1st part is DOSBox, 2nd part is ScummVM
laurabow.002 (17.7 KB ) - added by SF/kurufinwe 8 years ago.
Save near the clock

Download all attachments as: .zip

Change History (17)

by SF/kurufinwe, 8 years ago

Attachment: lb1.ogg added

1st part is DOSBox, 2nd part is ScummVM

comment:1 by digitall, 8 years ago

kurufinwe: Thank you for the bug report, but can you please attach a savegame to aid replication and describe how to steps to replicate this bug...

comment:2 by SF/kurufinwe, 8 years ago

Just start the game and skip the intro (or choose Restart from the in-game menu). The first thing that will happen is the 7 PM clock chime, which is faster than it should be, as shown in the attached recording.

comment:3 by digitall, 8 years ago

kurufinwe: Thank you... Will attempt to investigate. Please standby.

by SF/kurufinwe, 8 years ago

Attachment: laurabow.002 added

Save near the clock

comment:4 by SF/kurufinwe, 8 years ago

I've found a simpler way to notice the bug: the grandfather clock in the hallway.

It's playing a two-note sound, with a delay between the notes (let's say Tick ... Tock), and this is looped, with a delay between each iteration, so that it should sound like: Tick ... Tock ,,, Tick ,,, Tock ... That's what happens in DOSBox.

However, in ScummVM, the delay when looping seems to be missing (or too short), so that it sounds like: Tick ... TockTick ... TockTick... Tock.

I'm attaching a savegame. Hopefully that will be a simpler test case than having to go through all the clock chime over and over again.

comment:5 by wjp, 8 years ago

This sounds similar to https://sourceforge.net/tracker/?func=detail&aid=3293354&group_id=37116&atid=418820 from QfG3.

comment:6 by wjp, 7 years ago

Not sure about the time between the groups of 4 notes, but the delay between the 7 hour notes as well as the tick-tock in the hallway are caused by the delta of the end-of-track command being dropped.

comment:7 by wjp, 7 years ago

Fixed the hour notes and clock in hallway in 457f5da0957a964b.

comment:8 by bluegr, 7 years ago

Owner: set to wjp
Resolution: fixed
Status: newclosed

comment:9 by bluegr, 7 years ago

Just verified the fix, nice work! :) Closing as fixed

comment:10 by wjp, 7 years ago

Do you mean the other half of the report is likely just the "general" timing problem? (Quite plausible, but I hadn't looked at it yet.)

comment:11 by bluegr, 7 years ago

Resolution: fixed
Status: closednew

comment:12 by bluegr, 7 years ago

The clock sound is made of several different songs, namely 94, 95 and then it repeats 29.

The missing delays were because of the missing delta at the end of each song, which wjp fixed in that commit. Now, there's still the problem where the instrument that the seven notes are played with sounds different ("like a jackhammer", as the OP said). Not sure why that happens.

I'm reopening this since our song timing is still a bit off, compared to DOSBox. This may be caused by lines 48 - 51 in sci/sound/midiparser_sci.cpp:

// mididata contains delta in 1/60th second
// values of ppqn and tempo are found experimentally and may be wrong
_ppqn = 1;
setTempo(16667);

comment:13 by wjp, 6 years ago

I was assuming 'like a jackhammer' referred to speed, not instrument type.

The remaining timing difference with dosbox is fixed as a side effect of my midiparser rewrite at https://github.com/scummvm/scummvm/pull/398 , which is not in git yet.

comment:14 by wjp, 6 years ago

Merged into master, so this should be entirely resolved now.

comment:15 by wjp, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.