Menu

#5970 SCI: LB1: Clock chime is too fast

SCI: Laura Bow 1
closed-fixed
None
5
2013-09-21
2012-02-12
No

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.

Discussion

  • Johann Walter

    Johann Walter - 2012-02-12

    1st part is DOSBox, 2nd part is ScummVM

     
  • digitall

    digitall - 2012-02-15

    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...

     
  • Johann Walter

    Johann Walter - 2012-02-15

    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.

     
  • digitall

    digitall - 2012-02-15

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

     
  • Johann Walter

    Johann Walter - 2012-02-15

    Save near the clock

     
  • Johann Walter

    Johann Walter - 2012-02-15

    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.

     
  • Willem Jan Palenstijn

    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.

     
  • Willem Jan Palenstijn

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

     
  • Filippos Karapetis

    • assigned_to: nobody --> wjpalenstijn
    • labels: --> 388875
    • status: open --> closed-fixed
     
  • Filippos Karapetis

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

     
  • Willem Jan Palenstijn

    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.)

     
  • Filippos Karapetis

    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);

     
  • Filippos Karapetis

    • status: closed-fixed --> open
     
  • Willem Jan Palenstijn

    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.

     
  • Willem Jan Palenstijn

    • labels: 388875 -->
    • status: open --> closed-fixed
     
  • Willem Jan Palenstijn

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