Important if you want to make a sound set!

Browse FAQ, ask other guys for help with your issue or post a hint here.
Post Reply
User avatar
Garbre
GeneRally Trackmaster
Posts: 181
Joined: Sat Jan 09, 2010 10:12 am
Location: Magyarország(Hungary)

Important if you want to make a sound set!

Post by Garbre »

I've seen that a few other people found it strange how the sounds sound in GR1.10. I've made a little research with a sound editing program called Sound Forge. Here's what I've found out:

It looks like the new version increases the whole sound set's pitch which means the file's lenght will be divided by 2. My engine file's lenght is 16,741 seconds, but when I play it sounds like its pitch has been increased by 12 which means the length becomes 8,37 seconds. Of course you can hear the difference the best when you go with full throttle or don't move an inch. The game bends the sound's length to emulate a real engine's behavior. His doing that by playing with the pitch.

The sample rate difference can couse the same effect! The original GR1.05 and GR1.1 sound files have a sample rate of 22050 Hz. GeneRally 1.05 and 1.1 do the same thing with the engine sound(bends its pitch between -12 and +12). This only happens to the engine's sound file. The skid, damage and "yeah" only get some filters when you play GR. The ding.wav file is different. The game plays it four times. The first three's pitch is increased by 2, and the last one's is by 6.

I've checked my custom sounds sample rate. It wasn't 22kHz. After I've used a resample(which doesn't effects the length) the sounds sounded exactly the same during the game like if you just played them from their library. There is still a little difference between the 1.05 and 1.1 engine sounds though. I've tried out the original GR engine sound with both versions(same car, same track) but in the 1.1 version already at the start the engine sounds faster(which means the pitch is higher). There's a solution for that! I've set the engine's pitch 12 units down and then it sounded like in the 1.05 version.

You may experience this the same, or not. This worked on my brother's computer which has SoundBlaster Live!, and on my own with RealTek HD Audio. It looks like there is a problem with the version and with the sound sets too! I don't know about coding but if this could be solved this much easy by a user then I think the problem with the version isn't that big. :roll: I hope this helps! :sweatdrop:
Always sign your every work in GR! Or use .txt files to inform us about ownership!
*My tracks* Contact me on garbregr1.2@gmail.com
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
User avatar
Trigger Happy
GeneRally Trackmaster
Posts: 7134
Joined: Sat Dec 26, 2009 9:54 pm
Location: CZE
Contact:

Re: Important if you want to make a sound set!

Post by Trigger Happy »

Great work, Garbre. :bg:

I hope, that James will read it and take in consideration option of retuning the 1.10 to make the great soundpacks from past compatible with 1.10. :nod:
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

Thanks for the info - will look into it :) As mentioned in the other thread, Hannu re-wrote the mixer for the SDL version, so I'll have to investigate why this change occurred. I can't imagine it being deliberate/fundamentally necessary... but who knows. Maybe we'll delay the bugfix release to fix this if it takes a while :)
User avatar
Garbre
GeneRally Trackmaster
Posts: 181
Joined: Sat Jan 09, 2010 10:12 am
Location: Magyarország(Hungary)

Re: Important if you want to make a sound set!

Post by Garbre »

I think what happened was everybody downloaded GR1.1 and just changed the sounds folder. Probably becouse of the new code the old custom sounds folder don't work right anymore with the same sound specifications. After I did a resample on all of my files except in the default and funny folders, even the WTCC series worked correctly. So I don't think it's a big deal, but I don't know how are we going to edit all the files the users have. We can't teach everyone how to edit their sounds(even if it's just 2 clicks :D ). Maybe we should do a sound database like Longbow's Palette Archive. Hmm. We'll see.
Always sign your every work in GR! Or use .txt files to inform us about ownership!
*My tracks* Contact me on garbregr1.2@gmail.com
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

Well, I think I've found what I need to change - but I'm not at home, so no compiler nearby :) I'll look into it when I'm back home tomorrow. Changing it back seems like the most sensible option for now, at least until we make a more comprehensive sound system (on the 'maybe' list for the future) :)
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

Markku and I have been working on this one for a number of hours over the past two days, and it turns out that this problem is mostly related to how SDL does/doesn't convert different sound samples. SDL imports the sounds, and converts them to the desired frequency by re-sampling... in this case, our target frequency is 44,100hz. What this means is that, in order to sound 'as original', GR sounds must be 44,100hz, as there may be small changes (such as heard in the 'ding' sound in 1.10 vs. 1.05) during the re-sampling process.

The only limitation here is that in the current version of SDL (1.2), conversions are only valid from 88,200hz or 22,050hz - all other conversions are ignored. What this means is that unless your files are 22khz, 44khz or 88khz... they will not be converted. The upshot of this is that GR tries to play those sounds, then, at the desired frequency and you get a higher-pitched/sped-up sound.

With this in mind, we are not going to be counting this as a 'bug-fix' because it is simply the behaviour of the SDL libraries. Unfortunately, in the past, GR must have offered a greater number of conversion options (automatically) and this meant that you could add practically any sound at any frequency and have it work. I think by recommending that people create 44khz sounds in their sound-sets, we actually achieve a standard going forward. What I would suggest is that someone from the community either makes a tool or a guide available for converting sounds to 44khz (most sound-editing software can achieve this) with re-sampling. It is possible that, in the future, SDL will support more conversion methods (and this feature will, automatically, work in GR when we update the DLL) but short of writing our own conversion functions (which we're not going to do), there's not a lot we can do about this except suggest that old sound-sets are re-sampled.

Sorry I can't be of much more help - it's just the way things are :) If you find any other information (or we've misunderstood the issue), please do let us know... it may change how we handle certain things in the future!
User avatar
Rich Nagel
GeneRally Wizard
Posts: 138
Joined: Sat Jan 02, 2010 10:58 am
Location: Out in the woods of Crystal River, Florida!
Contact:

Re: Important if you want to make a sound set!

Post by Rich Nagel »

James Burgess wrote:What this means is that unless your files are 22khz, 44khz or 88khz... they will not be converted. The upshot of this is that GR tries to play those sounds, then, at the desired frequency and you get a higher-pitched/sped-up sound.
Just for clarification; if your engine sound files' sampling rates are 22,050 *OR* 44,100 the pitch will sound correct within the game, correct?
Rich ¥Weeds¥ Nagel
www.richnagel.net
¥Weeds¥ GeneRally Stuff - ALL broken links FINALLY fixed!
¥Weeds¥ File Archives - Music, stuff, and more.
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

Rich Nagel wrote:Just for clarification; if your engine sound files' sampling rates are 22,050 *OR* 44,100 the pitch will sound correct within the game, correct?
According to the SDL documentation, that should work, yes (the engine uses 44,100hz internally - and converts GR's default sounds from 22,050hz). Also, theoretically at least, 88,200hz files should work... but that's an uncommon frequency for simple audio files, anyway.
User avatar
Rich Nagel
GeneRally Wizard
Posts: 138
Joined: Sat Jan 02, 2010 10:58 am
Location: Out in the woods of Crystal River, Florida!
Contact:

Re: Important if you want to make a sound set!

Post by Rich Nagel »

Thanks for the info, I gave it a test previously, and it sounded like that it worked... just wanted to make sure :)
Rich ¥Weeds¥ Nagel
www.richnagel.net
¥Weeds¥ GeneRally Stuff - ALL broken links FINALLY fixed!
¥Weeds¥ File Archives - Music, stuff, and more.
User avatar
Garbre
GeneRally Trackmaster
Posts: 181
Joined: Sat Jan 09, 2010 10:12 am
Location: Magyarország(Hungary)

Re: Important if you want to make a sound set!

Post by Garbre »

Egamad mentioned something about a screeching sound in another topic. I think I know what he meant. I hear it too but it doesn't bother me that much, I'm getting used to it. When a sound data is re-sampled there is an option to use antialiazing on it. SDL looks like don't do that so we can hear a quite sound around 100-1000Hz. I think there's a workaround here too but I don't want to explain it now, the sound's author could do something about it or the settings of the speakers can help it.

Another thing which was mention by Longbow in the same topic was about the "ding" sound which sounded like a strange echo as he described. Using some old sound set which I think was made by Masa where the "ding" sound has a small voice at the end I could hear something like this. That must comes from the SDL's sound convertion method. Longbow thought too that until the duration of the ding sound ends the game plays the data on and on. But because of the sample rate's incompatibility the sped up data can be played more than four times while the time runs out. I think he was right. This can be helped by using the correct sample rate, I've tried it. :nod:
Last edited by Garbre on Fri Feb 25, 2011 10:06 pm, edited 1 time in total.
Always sign your every work in GR! Or use .txt files to inform us about ownership!
*My tracks* Contact me on garbregr1.2@gmail.com
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
User avatar
LongBow
GeneRally Wizard
Posts: 619
Joined: Mon Dec 28, 2009 2:20 pm
Location: Slovenia
Contact:

Re: Important if you want to make a sound set!

Post by LongBow »

James Burgess wrote:According to the SDL documentation, that should work, yes (the engine uses 44,100hz internally - and converts GR's default sounds from 22,050hz). Also, theoretically at least, 88,200hz files should work... but that's an uncommon frequency for simple audio files, anyway.
It looks like the sounds issue was cleared out. The only thing that keeps bothering me is the (ab)used ding sound as I have already described. I guess this wont be fixed but Ill try to make (when I get some free time :sweatdrop: ) some tests with different sounds/sample rates to see if I learn something out of it.
BTW do you have any "good" link to that documentation about the SDL sound mixer for future reference?

@ Rich Nagel: all this looks like a good excuse for you to finally update your soundsets pro pack by adding all those soundset that are not included at the moment ;)
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

I'm still looking into the interference and 'ding' sound problems - don't have any ETA or leads on this. Markku has been able to reproduce the background noise once but not again - so we're trying to work this one out :)
User avatar
Garbre
GeneRally Trackmaster
Posts: 181
Joined: Sat Jan 09, 2010 10:12 am
Location: Magyarország(Hungary)

Re: Important if you want to make a sound set!

Post by Garbre »

I've just read that in SDL 1.2.14 they fixed the sound quality problem when converting between 22kHz and 44kHz. Here's the link for the release notes: SDL 1.2.14 Release Notes
Always sign your every work in GR! Or use .txt files to inform us about ownership!
*My tracks* Contact me on garbregr1.2@gmail.com
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

We're already shipping v1.10 with 1.2.14 - which is why we need to investigate further, as it's not caused by SDL conversion. :)
User avatar
Rich Nagel
GeneRally Wizard
Posts: 138
Joined: Sat Jan 02, 2010 10:58 am
Location: Out in the woods of Crystal River, Florida!
Contact:

Re: Important if you want to make a sound set!

Post by Rich Nagel »

LongBow wrote:It looks like the sounds issue was cleared out. The only thing that keeps bothering me is the (ab)used ding sound as I have already described.
Here's my take on the Ding.wav thing:

It sounds to me like that pre v1.10 GeneRally would play the Ding.wav at the start of the race four times (of course). In the older versions of GR, the playback of the Ding.wav sound would halt/stop before it would immediately be played again (e.g. when the lights start their countdown flash; 1 - 2 - 3 - GO!).

In v1.10 of GeneRally, the Ding.wav file continues to play for it's full duration even while it is triggered again to play... in other words, if the Ding.wav file is, say, 10 seconds, it will play once for the first light. Then, it will immediately start playing again for the second light *WHILE* the first instance is still finishing playing, and so on.

Pre-1.10 versions would stop the playback of the first as soon as the second one started to play.

That's the problem, I think.

LongBow wrote:@ Rich Nagel: all this looks like a good excuse for you to finally update your soundsets pro pack by adding all those soundset that are not included at the moment ;)
That's exactly what I was thinking as well :) I have a TON of other ones that I had uploaded to RSC, but had never added to my old GR Stuff web page. Being that I now have broadband, uploading would be quick and painless, and I could combine the whole schmear into one single SPPro :)

I'll prolly end up canning the "SOX" utility, and simply provide the uncompressed WAV files... so's the installer batch file will be a lot easier to create. Still will need the installer though, as A LOT of the WAV files are te exact same (duplicated) within the entire installation (don't wanna bloat the ZIP too much <grin>).
Rich ¥Weeds¥ Nagel
www.richnagel.net
¥Weeds¥ GeneRally Stuff - ALL broken links FINALLY fixed!
¥Weeds¥ File Archives - Music, stuff, and more.
User avatar
Rich Nagel
GeneRally Wizard
Posts: 138
Joined: Sat Jan 02, 2010 10:58 am
Location: Out in the woods of Crystal River, Florida!
Contact:

Re: Important if you want to make a sound set!

Post by Rich Nagel »

Rich Nagel wrote:
Rich Nagel wrote:That's exactly what I was thinking as well :) I have a TON of other ones that I had uploaded to RSC, but had never added to my old GR Stuff web page. Being that I now have broadband, uploading would be quick and painless, and I could combine the whole schmear into one single SPPro :) I'll prolly end up canning the "SOX" utility, and simply provide the uncompressed WAV files... so's the installer batch file will be a lot easier to create. Still will need the installer though, as A LOT of the WAV files are te exact same (duplicated) within the entire installation (don't wanna bloat the ZIP too much <grin>).
P.S. Working on it as we speak :) Hehe, gonna take me a while though... 'tis a real "career" trying to sift thru all of my crapola to find all of the files, as well as creating a suitable installer. A lot of the files are duplicated, and I'm gonna swap out the "RKAU.EXE" and "SOX.EXE" utilities in favor of "WavPack v4.60.1".

I'll simply include the higher pitched versions in the ZIP (verses using SOX to create them during installation), and use Wavpack instead of RKAU for compressing the WAV files. It doesn't compress as well as RKAU, but it's LOSSLESS! :)

Anyhoo, gonna be quite the monster, hope everyone has broadband <grin> :) I'm guesstimating about 20 megs for the ZIP with the installer, and a little over 50 megs installed.

P.S. Here's what yer gonna get (subject to change though... I might just omit the "Mono" packs to conserve on the download ZIP filesize (once GR v1.1x has stereo support, the stereo sets will sound GREAT!), and I ned to make a few higher-pitched ones as well for the sets that don't currently have them):

Code: Select all

SoundPackPro 1 Mono
SoundPackPro 1 MonoP
SoundPackPro 1 Stereo
SoundPackPro 1 StereoP
SoundPackPro 2 Mono
SoundPackPro 2 MonoP
SoundPackPro 2 Stereo
SoundPackPro 2 StereoP
SoundPackPro 3 Mono
SoundPackPro 3 MonoP
SoundPackPro 3 Stereo
SoundPackPro 3 StereoP
SoundPackPro 4 Mono
SoundPackPro 4 MonoP
SoundPackPro 4 Stereo
SoundPackPro 4 StereoP
SoundPackPro 6
SoundPackPro Blank
SoundPackPro Diesel
SoundPackPro MM Buggy
SoundPackPro MM F1
SoundPackPro MM Heli
SoundPackPro MM Sports
SoundPackPro MM Tank
SoundPackPro MM War
SoundPackPro PC Indy
SoundPackPro PC Stunts
SoundPackPro RC Elec
SoundPackPro RC ElecP
SoundPackPro RC GasP
SoundPackPro Sailboat
SoundPackPro Warhead
SoundPackPro ZipZaps
SoundPackPro ZipZapsP
Rich ¥Weeds¥ Nagel
www.richnagel.net
¥Weeds¥ GeneRally Stuff - ALL broken links FINALLY fixed!
¥Weeds¥ File Archives - Music, stuff, and more.
User avatar
James
GeneRally Trackmaster
Posts: 283
Joined: Thu Dec 31, 2009 7:26 pm

Re: Important if you want to make a sound set!

Post by James »

Rich Nagel wrote:as well as creating a suitable installer.
Even with the duplicates, I'd ditch the installer - a well-compressed .zip is going to be fine for anyone on a broadband connection. And I don't imagine there are many around here left on dial-up (you were the last one holding out :P ).
User avatar
Rich Nagel
GeneRally Wizard
Posts: 138
Joined: Sat Jan 02, 2010 10:58 am
Location: Out in the woods of Crystal River, Florida!
Contact:

Re: Important if you want to make a sound set!

Post by Rich Nagel »

James Burgess wrote:
Rich Nagel wrote:as well as creating a suitable installer.
Even with the duplicates, I'd ditch the installer - a well-compressed .zip is going to be fine for anyone on a broadband connection. And I don't imagine there are many around here left on dial-up (you were the last one holding out :P ).
Hehe, prolly true, but I just HATE software bloat LOL!
Rich ¥Weeds¥ Nagel
www.richnagel.net
¥Weeds¥ GeneRally Stuff - ALL broken links FINALLY fixed!
¥Weeds¥ File Archives - Music, stuff, and more.
Post Reply