More Music: How it Works and the Biggest Mistake I Made


Welcome to our second devlog about the music of Love & Country! This is Guhuhu’s in-house composer Zachary Pinkham. Last time, we talked about the aesthetic of the music and its historical influences. This time I would like to focus on the most unique aspect of music: how the music actually works! I would also like to tell you all about the biggest mistake I made working on the music; a mistake that ended up costing weeks of time that I hope to save you all from by sharing knowledge I learned the hard way.

Something that immediately stood out to me when I first read the script of Love and Country was how quickly the game’s tone can change. A conversation can go from jovial to seductive to somber in a very short period of time. I also noticed how continuous the action was—the events of the entire game take place in a compressed period with very few jumps in time at all. Taking all of these elements into account, it became clear that writing a series of tracks would likely be an ineffective way of scoring the action, as you wouldn’t be able to react to changes in tone and scenery as necessary. The solution was to develop a system that would allow the music to track the text and react as dynamically as possible. This was also more in keeping with the historical references I was working with, as most of the early 20th-century works that served as influences on the score were large, multi-movement pieces of music that took a couple of ideas and ran with them over stretches of time. If the music was tracking the script, then I would be forced to work in very large measurements of time as well, but would be unable to rely on repeating a static loop for the duration of an entire scene since it would eventually clash with the desired tone of the scene.

So, how do you tackle this? After weeks of trial and error I ended up finding inspiration in my background in musical theater. If you’ve ever been to a musical before, then at some point in the show there was a moment someone was talking above music, but instead of launching straight into a song when they were done with their lines, they waited for a moment for the music to catch up. That is called a “safety vamp”, a small little loop meant to repeat as many times as necessary; long enough for the actor to have plenty of time to complete their lines without the music getting too monotonous, but short enough so that if the actor completed their lines too early on in the loop the audience wouldn’t get bored waiting for the song to start. 

I decided to structure much (though not all) of the music around this idea. Occasionally, the music does run on a more traditional loop that can be organically interrupted, but the majority of the music in the game is meant to progress bit by bit with sections designed to loop as many times as needed without getting boring, ultimately anticipating they may only play once or twice and still sound complete. I would read the script, time out how long it would generally take for someone to make it to the next line that required a change in the music, and then write something that can comfortably fit in that span of time. It took quite a while to get comfortable writing music with that kind of structure; it was not uncommon for me to have to rewrite a section five or six times early on because it had a terrible, rigid flow or sounded too erratic because changes were taking place too quickly. For the longest time, the music was held together by spit and tape and was fairly easy to break altogether and hear something hilariously anachronistic…now I’m happy to say it’s held together by spit, tape, and glue! Eventually I got the hang of it and felt like I was able to develop a system that was malleable enough to suit the game with the side benefit of giving it a unique feel.

Unfortunately, the byproduct of this is meant I had to write a lot of music. A LOT of music. The final runtime came up to four hours and 11 minutes of music, as each route is unique. The themes are present in each—some more present in each route than others of course, depending on what you chose. Certain pieces of music are intentionally very evocative of others with changes made to suit the situation (or occasionally very, very similar because the situations were nearly identical), but no piece of music in the entire game ever reappears exactly the same way.

Now, remember how I said I made a huge mistake? This was a technical error. For most video games, you implement the music using a piece of software called middleware (like Wwise or FMOD), but because we used Ren’Py as our game engine, that was not an option because they are not compatible with it. Ren’Py has a music system that I can most charitably describe as “limited”. You can only ask the music to do one of three things: start playing music (optionally with a fade in), stop playing music (optionally with a fade out), or play this piece of music after that last piece of music. There’s no real access to musical layers—a mainstay of video game composition—so if you ever hear something that sounds like it, that was faked using traditional linear writing. If a piece of music is going to loop (and not everything does!), things get even more complicated. That’s where the problem came in.

Have you ever noticed how, if you are in a really large space like a tunnel or a cathedral, your voice echoes? That’s called reverb, and the same thing occurs in any room when any kind of sound is made, there’s just a lot less of it in a small space. Even with music made primarily using samples and not real musicians, there is reverb in the recording from the rooms those players were recorded in originally. A problem occurs when you go from one clip of audio to the next: that little bit of reverb (a “reverb tail”) can prevent you from getting a seamless loop because either it gets cut off by the next clip, or, it makes the transition awkward by forcing some silence to wait for the tail to play out in its entirety because you would expect the next piece of music to have already started. This is solved by first playing a piece of audio where you’ve cut off that reverb tail, then playing a second piece of audio where you have superimposed it onto the beginning. Then the transition sounds smooth because that reverb never went away, it just occurred somewhere else. This means that every looped piece of audio needs two audio clips to play out right.

I knew this at the very beginning of the process of writing the game’s music and acted accordingly. I did not realize that there’s one more element to this. When you suddenly chop off part of a bit of audio, if the audio doesn’t fall at what is called a “zero crossing” (where the audio falls on the zero axis as represented by a wave form—thanks Steinberg for the definition!) you get a horrible popping sound, often very loud and very noticeable. This means that every time the audio moves to a new clip, instead of sounding seamless, you get hit with an obnoxious noise. I spent weeks trying to identify the source of the sound, only figuring it out when I threw on a random YouTube video as background noise and heard somebody explicitly mention it. The solution is to add a tiny microscopic fade to the end of the audio to create a zero crossing so that the audio fades out really quickly as opposed to popping out. If the fade is small enough, it will not be perceptible. Note that you need to add a fade not only to the end of the main clip, but also to the start of the reverb tail too, as the clip can come from starting off of a zero crossing as well. 


After figuring it out, I had to go over all of the game’s 4+ hours of audio and add all of these little fades each and every time. It was terrible! I did not have a fun time with it! But it was entirely necessary to make sure the game’s audio was as it good as could be.

I hope this was interesting to any of you who might be wondering why there was so much music in the game and it felt different from the average visual novel. If any of you are game composers who will not be able to use middleware for whatever reason, I hope this cautionary tale helps save you hours of work.

Most of all, I hope you all enjoy Love & Country when it releases on June 20th!

Files

LoveandCountryDEMO-3.0-mac.zip 476 MB
Jun 13, 2024
LoveandCountryDEMO-3.0-win.zip 481 MB
Jun 13, 2024

Get Love & Country

Buy Now$14.99 USD or more

Comments

Log in with itch.io to leave a comment.

(+1)

Musician here, but performer, not composer. This looked like so much effort! I loved what I heard in the demo, and I am so so SO hyped for release, thank you for all your hard work!!!

Thank you so much! Yup, it was a ton of work, we appreciate your patience waiting for it to come out and we hope you enjoy it!