I'm looking for good examples of action games which specifically adjust their music according to the level of action onscreen. So as the action ramps up, and you're shooting/whacking more badguys, the musical likewise also ramps up to become more dramatic, etc.

I'm looking for games that do this particularly well and in an artistically tasteful way.

Yes, Journey has been getting quite a lot of rave reviews lately and is being hailed as an art game. I'm not sure how much it adjusts its music to what you're doing. Most of the game is pretty scripted; there are not really any "bad guys" per se.

One game that comes to mind is Portal 2, which has some sections where the music responds to your actions. Beyond that, quite a lot of action-adventure or shooter games have some form of dynamic "music tension". Far Cry comes to mind, although it was fairly unsubtle there. Infamous and Infamous 2 did some amount of dynamic music tension stuff as well, and I'm sure plenty of other games.

Mirror's Edge comes to mind. They have several strips of audio that they piece together to form sort of a dynamic music experience without actually creating megabytes worth of music files. They had several audio files for ambient, combat, and puzzle music for each level. I believe they cross-fade between tracks when it comes time to switch things up.

Take a look at FMOD's webpage. I'm pretty sure most games built using their audio library follows the same pattern since they have supported dynamic audio for quite some time. You can download their SDK and check out their tools to see how it's done. Fairly simple to setup.

So how exactly is this kind of thing accomplished? Is it mainly an artistic challenge, and coding is really secondary to that? Or is it primarily a coding issue?

The way I picture things, is that you'd have some state variable that's calculated from how much action is going on. Then depending on how high the value of this state variable is, then it will cause the extra action music to be played. So that seems relatively simple and straightforward. It's the way you integrate this pieces of music that's the main challenge, and that seems to be primarily an artistic issue.

Yes, I think on a technical level it's mostly just crossfading. Another way might be to have predefined branch points within a music track where it can switch over to another track with an authored transition that makes it sound natural. But then you'd have to have branch points all over the place or the system wouldn't be responsive enough. (On the other hand, maybe a slower response would be good for this sort of thing.) In any case, the challenge seems more artistic than technical to me.