I also have a question, you obviously know a hell of a lot about game programming
Well, I do work for a game developer. Technically, I don't know a lot about game programming (after all, I'm an artist), but I know a lot about the technological limitations we game developers must work within.
I mean they have gotten better, but they still sound "computer generated" Do they sample engine sounds?
Ah, yes...a very easy question to answer. Here are the typical issues regarding sound in video games:
1) For many years, game developers have treated sound as an afterthought...a way of spicing up a game, but not a necessity. Heck, in the early days, there wasn't even much pressure for hardware makers to put quality sound generators in computers or game consoles. As you noted, things have improved a lot, especially within the last ten years (we've thankfully moved away from FM sound synthesizers and limited General MIDI wavetables). Now that we're in the era of multi-channel digital audio, I do think most developers realize the value of quality sound production. I would guess that anyone making a racing game would sample real engine sounds. Whether Polyphony Digital bothers to record sounds from every single car being depicted is a totally different question...there are more than 500 cars spanning more than 100 years of automobiles in GT4.
2) Streamed audio and MIDI are techniques employed by consoles and PC sound cards to manage digital audio playback. In the past, MIDI could have meant playing cheesy FM synth sounds or poor quality audio samples, but most gaming platforms now offer the ability to upload quality samples on the fly. In the past, streamed audio meant playing canned CD audio, but now its becoming more common to decompress compressed digital audio either into MIDI channels or directly into the audio channels. It's difficult to get a lot of interactivity with streamed audio, so typically music gets streamed while sound effects go through MIDI.
Though MIDI offers a lot of flexibility, it has inherent limitations. Shifting pitch of an audio sample higher unrealistically shortens the clip. Shifting pitch lower increases its length. If you've ever played with digital audio on your computer's sound card or used a sampling keyboard (composing electronic music is a hobby of mine), you've probably noticed this phenomenon. When you’re dealing with looping samples, this may not be as noticeable, but you become more aware of the loop point as the pitch goes up. Game developers use pitch shifting to simulate rising RPMs or the Doppler effect of a cars passing by. Unfortunately, car engines have different characteristics as the RPMs change that can’t simply be pitch shifted. To get around this, sound engineers sample the car’s engine running steady at different RPMs (I’d bet that Gran Turismo sampled the engines at idle, at some middle range, and at redline) and then cross-fade between these samples as the pitch shifts into their respective ranges. If this is done enough times, it should produce very realistic results, but….
3) Game consoles (especially the PS2) and many PC sound cards have a very small amount of memory dedicated to digital audio. Because of this, digital audio must be compressed or downsampled to bitrates and sampling frequencies lower than CD-quality. In Gran Turismo, keep in mind that sounds from as many as six different cars can be on screen at any RPM, so there has to be enough room for all of their engine sounds to fit in RAM at any given time…along with any environmental sound effects (road/gravel/grass/dirt noise, wind noise, tire screeching, fender crunching). Downsampling first loses the higher frequencies, the qualities that give sounds their brightness or percussive punch (it's especially hard on high-pitched percussion instruments like hi-hats). Reducing bitrates tends to reduce the richness (would translate to "throatiness" in car engines). Shortening the loops would lose low frequency variations that tend to naturally occur. Higher compression further diminishes sound quality. In other words, any of the above tweaks can make things sound more electronic…and all of these things are typically done to make sound fit within hardware limitations.
4) Where you "sample" the sound will affect how the sound is perceived. Placing a microphone inside the car next to the driver, behind the muffler, in the engine compartment...each position will produce a very different sound from the same engine. I'd bet that the Polyphony Digital sound engineers record the sound of the engine from the driver's position (for in-car view) and from behind the exhaust (for exterior views). There are things that can be done with effect processing that can help simulate these different locations, but the PS2 doesn't have many real-time sound processing capabilities. At least the PS2 can add reverb to simulate driving in a tunnel...