Page 1 of 7

Sound replacement project

Posted: 10 Jan 2008 19:23
by orudge
LATEST DETAILS: see tracker here

We have a successful graphics replacement project going on at the moment, but nobody seems to have thought of that other important thing - sound effects. While currently there is no "new sound" format (with the exception of sticking them in GRF files, I suppose), I did write a very simple "sndcodec"-type program a few years ago that would decompile and recompile the sample.cat file. I'll try to tidy this up and release it soon.

I would suggest, if possible, we try to put together a series of replacement sounds for the default TTD sounds. Some of these can likely be engineered ourselves (eg, some of the UI sounds - the morse code newspaper notification, the "splat" as you place tracks, etc). Others we may need to record ourselves or source from free sound libraries (http://freesound.iua.upf.edu/ is a good place to look - I've spotted a few sounds which may work well for TTD, with some editing, such as a level crossing replacement). I recall reading that the graphics are likely to be licenced under some sort of Creative Commons licence. Seeing as many sound libraries are under a CC licence, it would make sense for our new library to be under the same thing.

If people are interested, then please do volunteer yourselves here! A few words about quality and so on: ideally, all our sound effects should be at least 44,100Hz, 16-bit mono. (Due to TTD's panning of sound effects, any stereo effects would be lost). Currently, the sound engine doesn't support anything more than 11KHz 8-bit, but that can (and will) change. ;)

I hope to post up my "sndcodec" program soon - I have exams next week so it may be a little while. Until then, here's a list of the sound effects we need replacements for. It may be worth transferring this to the wiki somewhere.

Note that the descriptions are those from the sample.cat file itself, mistakes and all. Also, not all of the effects appear to be actually used in the game.

0. Good year
1. Bad year
2. Splat
3. Factory Whistle
4. Train
5. Traing through tunnel
6. Ship horn
7. Ferry horn
8. Plane take off
9. Jet
10. train horn (I think)
11. Mining machinary
12. Electric spark
13. Steam
14. Level crossing
15. Vehicle breakdown
16. Train breakdown
17. Crash
18. Explosion
19. Big crash
20. Cashtill
21. Beep
22. Morse
23. Skid (plane)
24. Helecopter
25. Bus start, pull away
26. Bus start, pull away with horn
27. Truck start
28. Truck start 2
29. Applause
30. Ooooh
31. Splat
32. Splat 2
33. Corrupt sound
34. Car horn
35. Car horn 2
36. Sheep
37. Cow
38. Horse
39. Blacksmith anvil
40. Sawmill
41. Rip
42. Extract & pop
43. Comedy hit
44. Machinary
45. Rip 2
46. Extract and pop
47. Pop
48. Cartoon sound
49. Extract
50. Pop 2
51. Plastic mine
52. Wind
53. Comedy breakdown
54. Cartoon crash
55. Balloon squeak
56. Chainsaw
57. Heavy wind
58. Comedy breakdown 2
59. Jet overhead
60. Comedy car
61. Another jet overhead
62. Comedy car 2
63. Comedy car 3
64. Comedy car start and pull away
65. Maglev
66. Loon bird
67. Lion
68. Monkeys
69. Plane crashing
70. Plane engine sputtering
71. Maglev 2?
72. Distant bird

I've attached the sounds in a decompiled form to this post. (Note that a few of the sounds are in 22KHz form, but are actually played in-game as 11KHz - if you decrease the speed by 100%, you'll get it as it's intended to be). If anybody would like to "claim" sounds to work on, feel free. Alternatively, if anyone has any comments or queries, do post them here!

Edit: Note also that I'm not suggesting we use the sample.cat format in a future version of OpenTTD - the whole sound/music engine really needs a redesign (something which I've conceptually begun doing, anyway). But for now, we can downsample our sounds to 8-bit, 11KHz and stick them in sample.cat for testing purposes.

Re: Sound replacement project

Posted: 10 Jan 2008 19:30
by ev.delen
good idea!

Re: Sound replacement project

Posted: 10 Jan 2008 22:57
by Weazul
I don't have any proper sound recording equipment at the moment but I can possibly offer my services up.. I know that doesn't sound very promising but I have a short commute in which I pass a big airport where planes (jets) fly extremly low right overhead, work just out of detrailment range of a train crossing (trains often block it for 20 minutes at a time :evil: ), and have tractor trailers parking all day, basiclly the shipping/port area.

I always found the sound effects in transport tycoon to be much to harse to actually have on, hopefully we can all do something about that.

Re: Sound replacement project

Posted: 10 Jan 2008 23:03
by Nudel
A quick test manufactured in Modplug.

0. Good year
1. Bad year

What would the "new-sound" format be like in the future? Could it be beneficial to use mp3 or ogg?

Re: Sound replacement project

Posted: 11 Jan 2008 06:33
by orudge
Just so people know, I've spent this evening writing a new sound engine for OpenTTD. Well, more specifically, I've spent the evening nicking the engine from ScummVM and adapting it for our use. It seems to be working pretty well, I've just been working on porting bits of my old new music system patch. Tomorrow (well, "today"), after I've had some sleep, I will hopefully publish an initial patch for the new sound system (without new music capabilities for now).
Nudel wrote:What would the "new-sound" format be like in the future? Could it be beneficial to use mp3 or ogg?
It's quite probably just going to be WAV, or perhaps Vorbis, inside a tar file, or something similar. For now, if samples can be posted in WAV (or perhaps FLAC if you want them compressed), it should be fine. :)

Re: Sound replacement project

Posted: 11 Jan 2008 07:49
by CMircea
orudge wrote:Just so people know, I've spent this evening writing a new sound engine for OpenTTD. Well, more specifically, I've spent the evening nicking the engine from ScummVM and adapting it for our use. It seems to be working pretty well, I've just been working on porting bits of my old new music system patch. Tomorrow (well, "today"), after I've had some sleep, I will hopefully publish an initial patch for the new sound system (without new music capabilities for now).
Nudel wrote:What would the "new-sound" format be like in the future? Could it be beneficial to use mp3 or ogg?
It's quite probably just going to be WAV, or perhaps Vorbis, inside a tar file, or something similar. For now, if samples can be posted in WAV (or perhaps FLAC if you want them compressed), it should be fine. :)
Hey! You stole my idea with .tar archives! :P

Okay, I'll go dig some info on FLAC and see exactly how much it is supported.

Re: Sound replacement project

Posted: 11 Jan 2008 09:30
by XeryusTC
Owen, it might be useful to support OGG Vorbis as it is somewhat the new MP3 without the extra strings attached and a better compression. I think it might be quite useful if you support it next to WAV.

Re: Sound replacement project

Posted: 11 Jan 2008 10:07
by WWTBAM
There is a link to a page hidden away on the TTDPatch site with a package of tools related to TTD and one of them extracts the .cat files. http://ttdpatch.net/tttools.zip

Re: Sound replacement project

Posted: 11 Jan 2008 20:52
by orudge
XeryusTC wrote:Owen, it might be useful to support OGG Vorbis as it is somewhat the new MP3 without the extra strings attached and a better compression. I think it might be quite useful if you support it next to WAV.
Vorbis is supported, yes, as is MP3. FLAC will likely be supported too. Anyway, a patch for the new sound mixer only is available here. It still uses the existing sample.cat, and doesn't affect music playback. Try it and let me know how it goes. I'm currently working on new music support, taking bits from my old patch and integrating it in with this new one. It's really only GUI stuff left to do. When that's ready (I do have exams soon so I won't be able to spend too much time on this), I'll post it up too.

Re: Sound replacement project

Posted: 12 Jan 2008 02:22
by lobster
orudge wrote:hey, lobster, you're a soundy kind of person, [is it of]a ny interest to you, perhaps?
it is most certainly. i'll look into my databases for sounds, especially if this new sound system things work. who wants to work with 11.025 Hz and max. 1.8 seconds of that* anyway.

(*about estimates)

Re: Sound replacement project

Posted: 12 Jan 2008 02:23
by orudge
Cheers, that would be appreciated. As I say, we're looking for 44.1KHz 16-bit audio for our replacement effects. :)

Re: Sound replacement project

Posted: 12 Jan 2008 10:51
by Ben_K
Great idea Orudge and nice to see some work on it. Sound is a part of it OTTD that I guess many of us overlook in terms of updating.

Re: Sound replacement project

Posted: 12 Jan 2008 19:10
by orudge
I have started work on a wiki page here for this little project. It would be good if we could get a few more people interested in this - OpenTTD will never be a truly "free" game until we remove the dependencies for the sound effects as well as the graphics!

Nudel: I had a little listen to your wav files there. They're certainly not bad, but I'm not entirely sure the first one will "fit" into the game quite properly. I'm trying to think how to describe it really. In a way, consider how the original TTD graphics are quite "cartoony" - in many ways, so are the sounds. The original 00.wav does have a bit of "character" to it, whereas your replacement feels a bit more "generic". That's just my opinion, though, others may think differently! Your help is appreciated nonetheless! :)

Re: Sound replacement project

Posted: 12 Jan 2008 21:01
by LordAzamath
Hello.. Nice to see this Replacement Project too :) I was just thinking about it that when we have graphics, we definitly should replace sample.cat too. :)
If I have time, I can make something (simple ding-dong for example if needed) in Soundtracker or LMMS program. My brother is a pro, but I can handle them pretty good too :). So if I have time and skill, I'll try to make something perhaps.

Thank you orudge for this :)

Re: Sound replacement project

Posted: 12 Jan 2008 23:54
by Nudel
orudge wrote:Nudel: I had a little listen to your wav files there. They're certainly not bad, but I'm not entirely sure the first one will "fit" into the game quite properly. I'm trying to think how to describe it really. In a way, consider how the original TTD graphics are quite "cartoony" - in many ways, so are the sounds. The original 00.wav does have a bit of "character" to it, whereas your replacement feels a bit more "generic". That's just my opinion, though, others may think differently! Your help is appreciated nonetheless! :)
Thanks! I'm just an amateur, and wasn't happy with (especially) the first one either, the "cartoony"-feeling is missing as you say, and it is too long. Anyway, I just threw it together in a couple of minutes to have a couple of sounds for testing purposes, if it is needed. Use them for whatever you want, or not at all. (They are 44.1khz and 16bit mono btw ;) )

On the other hand I have always disliked the original 00.wav (and to some extent 01.wav), and would prefer more subtle sound effects which is still easy to recognize. The original 31.wav and 32.wav are excellent examples of this, and fits the game really well imho.

Are you considering to maybe add more sound effects than those in sample.cat? Sound when breaking, loading etc?

Re: Sound replacement project

Posted: 13 Jan 2008 00:38
by MJS
I remember Patchman programmed bridgesounds at some point - does that mean there might be points in the Patch itself where sound hooks are already in place?

Re: Sound replacement project

Posted: 13 Jan 2008 02:04
by orudge
Nudel wrote:Are you considering to maybe add more sound effects than those in sample.cat? Sound when breaking, loading etc?
That's certainly possible in the future. For now, I think it may be better to concentrate on replacing the existing ones, but if you come up with sounds you think would be good elsewhere in the game, by all means post them! :)
MJS wrote:I remember Patchman programmed bridgesounds at some point - does that mean there might be points in the Patch itself where sound hooks are already in place?
I believe TTDPatch has support for various new sounds in newgrfs (as does OpenTTD) - not sure how or where you can use them in game though. The wiki probably will tell you.

Re: Sound replacement project

Posted: 13 Jan 2008 14:46
by Ben_K
I can probably record airport sounds at work, should we need them. You can probably get many online, but if you can't, let me know. If you do want me to, let me know what sounds you want as I can record anything really.

Re: Sound replacement project

Posted: 16 Jan 2008 18:47
by Gramble
What about new music? Those midi files are very funky and would sound even better if it were recorded with real instruments. Unfortunately, I don't get my friends to record a "live" version.
What about copyright violations, if the new recordings would be a jam of the old ones?
Maybe I'll find the time to record a funky, TTD like, guitar tune for OpenTTD. Maybe I could add VST's or someone else add another recording of his instrument....

Re: Sound replacement project

Posted: 16 Jan 2008 19:53
by orudge
Various people have created high quality versions of the originals - take a look at this for instance. Also have a listen to the attached file - it was posted on the forums a few years ago, recorded with real instruments - rather nice I think.

Not sure on the legality of still using the same songs (even if recorded separately) in OpenTTD though. (Oh, and note that my new sound/music patch will support file formats such as MP3 and Vorbis, so we're not limited to MIDI files!)