Monkey Island 1 - high frequency tone problem

Ask for help with ScummVM problems

Moderator: ScummVM Team

Farge-TV
Posts: 5
Joined: Wed Aug 15, 2007 6:37 pm

Monkey Island 1 - high frequency tone problem

Post by Farge-TV »

Hello!
After successfully ripping the music tracks from the Monkey Island 1 CD and converting them to compressed audio files, I should have no problem hearing the music properly. Except I can't. All the tracks have a very high frequency tone running constantly in the background. This is especially apparent during the intro music. I have tried two different MP3-converting programs (Windows Media Player and CD-ex), I have also converted the tracks to OGG-files using CD-ex, but the problem is identical. When listening to the audio files outside ScummVM, they sound all right.

I am using ScummVM version 0.10.0, and the audio tracks have a constant bitrate as far a I can tell.
Any help would be appreciated.

Best regards,
Bård

Farge-TV
Posts: 5
Joined: Wed Aug 15, 2007 6:37 pm

Post by Farge-TV »

Anyone?

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3319
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

I haven't heard of any problem like that before, though my computer speakers probably aren't all that fancy.

Does this happen in both windowed and fullscreen mode? (I've sometimes had monitors making high-pitched noises at some resolutions, and I just want to make sure it isn't some simple explanation like that.)

Farge-TV
Posts: 5
Joined: Wed Aug 15, 2007 6:37 pm

Post by Farge-TV »

Yes, the noise is there regardless of which mode I run the program in. It sounds almost like the sound of crickets (the insects, not the game).
I hear it both through my internal laptop speakers and when I have my headphones connected

User avatar
PsYcO
Got 2 warnings
Posts: 513
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

maybe scummvm use's a different sound output than most media players, and maybe its a hardware thing with whatever scummvm use's.

what OS are you using?

maybe for some reason the in game sound isn't working cause the sound emulator is buggy or something, try re-installing scummvm, and if that doesn't help re-download the installer, and re-install.

if that fails i recommend filing a bug, in the bug tracker.

User avatar
Kaminari
Posts: 274
Joined: Mon Oct 24, 2005 2:25 am
Location: Paris, France
Contact:

Post by Kaminari »

Are they encoded in 44 KHz?

User avatar
Noelemahc
Posts: 178
Joined: Sat Jul 07, 2007 2:24 pm

Post by Noelemahc »

Could you upload a sample of the MP3s you are using for testing by someone else on their rig to see if it's a file-dependent or system-dependent problem?

Trying the SVN version might also be a way out.

User avatar
PsYcO
Got 2 warnings
Posts: 513
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

Noelemahc wrote:Could you upload a sample of the MP3s you are using for testing by someone else on their rig to see if it's a file-dependent or system-dependent problem?

Trying the SVN version might also be a way out.
that would be a violation of forum rule #0, i think.

Farge-TV
Posts: 5
Joined: Wed Aug 15, 2007 6:37 pm

Post by Farge-TV »

They are encoded in 44khz, yes, and I am using Windows XP. I have not tried to reinstall Scummvm, but I shall try that.

What is the SVN version?

Thanks

EDIT: I have now tried to reinstall the program, but the noise is still there. Guess I'll file a bug report, then

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3319
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Farge-TV wrote:They are encoded in 44khz, yes, and I am using Windows XP. I have not tried to reinstall Scummvm, but I shall try that.
Does it make any difference if you change the Output rate setting (on the Audio tab of the Options dialog) to 44 kHz? That way, ScummVM won't have to resample the music to play it.

Some of the values listed in the setting are approximations, some are exact:

8 kHz = 8000 Hz
11 kHz = 11025 Hz
22 kHz = 22050 Hz
44 kHz = 44100 Hz (this is what audio CDs use)
48 kHz = 48000 Hz

You may have to restart ScummVM for that setting to take effect, I don't remember.

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3319
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

PsYcO wrote:that would be a violation of forum rule #0, i think.
You wouldn't need an entire track. A few seconds should be enough to demonstrate the phenomenon. I don't know if that would qualify as fair use, but in my opinion it should.

Farge-TV
Posts: 5
Joined: Wed Aug 15, 2007 6:37 pm

Post by Farge-TV »

First of all: The problem disappeared when I changed the output setting to 44 khz. Great! But as you said, eriktorbjorn, CD music is sampled in 44 khz, so why should it make a difference?

(Not that it really matters now that the music is in working order)

Thank you so much!

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3319
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Farge-TV wrote:First of all: The problem disappeared when I changed the output setting to 44 khz. Great! But as you said, eriktorbjorn, CD music is sampled in 44 khz, so why should it make a difference?
When ScummVM "connects" to the sound driver, it specifies which audio format (sample size, format of the sample, number of channels, sample rate) it wants to use. Most sounds in the games that ScummVM supports are either ~22 kHz or ~11 kHz, so by default we use ~22 kHz on most systems.

When the output sample rate and the sound sample rate do not match, ScummVM has to resample the sound to the desired rate. Since this happens in real-time, there is of course a trade-off between audio quality and processing speed, but however you're doing it you're either throwing data away (downsampling) or making up new data (upsampling). The result isn't always ideal, but should usually be good enough.

I don't know why you hear noises where I don't. Maybe you have better ears, better speakers, or less noisy computer than I do, since you hear it even without headphones. Apparently, one of the Summer of Code projects may possibly improve on the current resampling algorithm. I haven't been following it, though.

User avatar
PsYcO
Got 2 warnings
Posts: 513
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

eriktorbjorn wrote:
PsYcO wrote:that would be a violation of forum rule #0, i think.
You wouldn't need an entire track. A few seconds should be enough to demonstrate the phenomenon. I don't know if that would qualify as fair use, but in my opinion it should.
well be careful, from what ive read about LA they are very protective

and wouldn't a few second track not work with scummvm? im not sure how it works, but i assume it wouldn't

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3319
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

PsYcO wrote:and wouldn't a few second track not work with scummvm? im not sure how it works, but i assume it wouldn't
It works. Each of the compressed audio files represent one track on the CD. The game script can tell ScummVM to "play track A, B times, starting at point C, ending at point D". If B is 255 it means "repeat indefinitely", and if D <= C it means "play until the end of the track".

The only case I'm aware of where Monkey Island 1 doesn't ask to play a track from start to finish is during the second part of the intro. For whatever reason, that music is at the end of 17. (The first part of that track is the first part of the intro music, but they could easily have split it into two separate tracks and saved us the tedious testing to make sure the music wasn't cut off too early or too late.)

When testing with a short clip, it's probably best to use a piece of music that loops forever, e.g. the SCUMM Bar music; track 8. And of course, if you want to remove any shadow of a possibility of infringement on LucasArts's music, you could just as well use some other sound. As long as it's encoded the same way, and exhibits the same problem.

Post Reply