I don't think parser-based interactive fiction and music are easily mixed. I say that both as a player and as a musician who has made music for parser games, my own and others'. I'm not saying they can never work together, but that they can easily not work together. I decided to gather my thoughts on this topic while preparing to offer a commissioned music prize for IFComp 2019, details of which in my next post.
Probably the first point of parser-music difficulty is that playing parser IF is psychologically analagous to reading. Most people don't read novels with a looping soundtrack cued to the material they're reading in the background, or expecting audio punctuation of particular moments in the text. It can break concentration, or make concentration impossible.
Reading is also about generating the life and world of the material in your mind via the words. It's interpretational. If it's accompanied by music, the audio stream seems to arrive as something literal, and may not gel with what your mind would generate in response to the text if left to its own devices. There is of course a mental space in which to interpret music in its own right, but you tend not to be interpreting music in a cordoned-off area of your brain if it's accompanying a game, the same way you tend not to interpret a film soundtrack in a cordoned-off area of the brain while watching that film for the first time. So I think there are neuroscience issues involved.
Musical taste is also temperamental, and people's gut reaction to music is immediate. In the sole musical space, people can do mental work to go towards music, or try to figure it out, if it's not to their taste. Not everyone can or will do this anyway. So in the context of an IF game, I think this is an additional hurdle players would rather not jump after the others I've mentioned. If they don't think they like the music they're hearing, they'll probably switch it off right away so they can concentrate on the game.
As an author, you can forget about all this and just be an artist and lay down the music you want anyway, but this isn't really a dictatorial triumph if it turns out people turn it off at first opportunity.
The challenge, then, is to have music that works for your game, so people will interpret it positively as part of the experience.
Strategies might fall into two areas: cued and ambient. Neither is foolproof, but here are a few observations.
Cueing music is about attaching pieces of music to particular events in the game. These events can be elements of the game's presentation, or in the game itself.
The title screen comes up: that's an event. (Personally, that's my favourite event at which to place a musical cue, and I think the one ripest for success) You gain points or make progress. You die. You solve a major puzzle. You enter a new area.
I think cueing works well because it's discrete, preventing any particular piece of music or sound from outstaying its welcome, and psychologically it leverages the event itself to make the audio work. The music is perceived as part of the fabric of the event, not as a separate stream of information atop the main one dispensed by the game. Players in general are used to audio cues from other media.
Ambient music is more dangerous in IF, but authors never stop having secret (or non-secret) desires to make it work, and to include a soundtrack for a whole IF game. (Try Robb Sherwin's Cryptozookeeper for example, a correspondingly large download due to the audio content.) When I say ambient, I broadly mean that a piece of music is playing all the time during a period of the game, unconnected to specific game events occurring within that period. This is not the same as the chosen music being considered 'ambient' in genre, though it will generally be true that the less direct and more ambient the piece of music is, the less danger there is of it impeding player concentration.
Ambient music runs into all the dangers I mentioned earlier. If people don't like it and it's going to keep playing, it'll be off. If it at all interferes with their concentration, it'll be off. If it doesn't gel with their view of the gameworld, it'll be off. If it loops too frequently or is heard for too long due to the time required for a particular stretch of the game to be completed, it'll be off.
Of course, there can be contextual allowances and exceptions. If a game is short, or bombastic, or somehow has a looping soundtrack aesthetic, ambient music has a greater chance of success.
If I think of the games I've put music into, I've had a different experience with each, most of which I'll recount here.
Six - Of my own IF games, I think the audio probably worked best in this one. The music and FX are cued to events, but never run very long. There's also enough of them that they're able to impose an aesthetic in the long run. And there's one part of the game that uses the audio for gameplay.
Leadlight Gamma - I included an ambient (approach, not genre) soundtrack in this game which could be controlled from a built-in virtual mp3 player of sorts. I didn't think hard about how it would or wouldn't be used, so in retrospect, I view it as kind of an experiment. Some players found the virtual music player unintuitive, and the soundtrack probably wasn't long enough for something that could be left running and looping. I think the music itself probably ended up a little weirder or bleaker than I'd anticipated, too. The final problem was that the music wasn't handled properly by all IF interpreters, and doesn't run online. Actually, my Leadlight Gamma soundtrack experience put me off making a similar IF music effort again unless the technical situations change.
Andromeda Apocalypse - I created a theme track called Black Giant for Marco Innocenti's IFComp game. It hit a couple of logistic hurdles. One was that it was missing from the initial upload of the game to the 2012 comp. For people who tried this game later, I think the music only plays if you win. Having not heard any music before that point, did you (winners of that game) have the volume on and up at your moment of victory? If so, were you also in the mood for unexpected music at the time? I really like this track as a match for the subject matter, but I don't know how many people heard it, or did listen when it struck. This leads to another lesson about IF music: players have to be introduced to it and/or ready for it in order to receive it.
Kerkerkruip - I created a multi-phased main theme for this rogue-like with an approach inspired by music from the original Diablo. The author's ideal would have been to have a lot more ambient music in the game, but I only had time for this piece. I think the track works well with the game's opening title loop.
Andromeda 1983 - Marco Innocenti made a retro 8-bit graphics version of his sci-fi game Andromeda Awakening, and called it Andromeda 1983. Correspondingly, I made a 1983-style track using the Commodore 64's sound palette. The track was designed to loop, and moves through several relevant moods, so given the affordances of the retro style, I think it worked well.
My next IF game will have only one piece of music, and that will be for the title page.