The Bullet Animation – Music Issues

Making the music for the The Bullet Animation was definitely one of the more fun aspects. I had a general tune going, I’d made a rhythm track and mucked about with the instruments.

Playing it back, it didn’t sound right. Sure, the tune was fine and the timing was correct, but there was something definitely NQR. It wasn’t until I played it back on my phone that it twigged: The instruments sounded tinny.

Timbre

No, not what one calls when a tree is cut down. I’m talking the quality of sound, the richness. If the sound coming out was colour, it would be a pastel, muted shade, not a rich, vibrant one. The instruments used sounded very much like those I was playing with back on the ol’ 386, probably because (and please correct me if I’m wrong) they were the same ones.

The ‘instruments’ used to play the midi file were the issue. Windows comes with a set of sounds that can be used to play midi files which is, well, average. So the piano, the harpsichord, the bass guitar, all sound like they’re supposed to. Kind of. Ish. If you squint.

“OK,” I reason, “It’s just a matter of getting a better quality set of instruments.”

In a way, yes. Only the correct term is Soundfonts. You can think of it like text-fonts. You’ve got your standard set of Arial, Times New Roman, Courier, Helvetica. Throw Comic Sans into that mix. They serve a purpose, they’re a good, vanilla set, and you can make them bold, italic, underlined, yeah, but they aren’t particularly interesting. Now you can get a whole bunch of fonts, of all different shapes and themes to suit a bunch of purposes. Different fonts make things interesting.

SoundFonts

The default Windows soundfont is decidedly average. In Anvil, it was the default midi synthesizer. I looked through the help and it seemed easy enough to add other synthesizers as well, and with the free version of Anvil, I can have up to two. Hey, I’ll settle for one good one.

I went online and downloaded VirtualMIDISynth (http://coolsoft.altervista.org/en/virtualmidisynth), which acts as a virtual midi endpoint, something that can render the midi files. By itself, it’s just an empty sound studio – I needed to fill it with instruments (I needed to download a soundfont).

Back to the web I went, seeking out this new ‘soundfont’ beast. Turns out they come in all shapes and sizes (just like normal fonts) and range from a few megabytes to a few hundred. What’s the difference? Well, I started with the ‘few megabytes’ option and ended up with a single instrument, a piano. It sounded nice, a lot better than what I had, but I was after a lot of instruments, not just one.

Have a look on the VirtualMIDISynth webpage for links to soundfonts. I eventually went with the Fluid Soundfont (http://www.synthfont.com/soundfonts.html), after trying a bunch of others, and I got a tiny glimpse into the world of sampled sounds.Anvil4 If time permits (Ha!) I’d love to revisit this and play around with some of the really cool soundfont sets I downloaded.

To use it, I opened up VirtualMIDISynth and chose the Fluid GM Midi soundfont set to use. Then, inside Anvil, I went into the synthesizers tab, chose to import a new synthesizer and picked my VirtualMIDISynth. After that, it was only a matter of selecting the instrument for the track and listening to how much better it sounded.

If only I could have done the same kind of thing for my sound effects.

Other Complications

Not really a complication in a technical sense, more so that when I finished composing the main tune, I played it against the animation. Who would have guessed? It was too long. I had the choice of either upping the tempo, which made it sound ridiculous, or removing a slab of twiddly bits from the middle.

It wasn’t a complicated task, removing some notes and pushing the ones over that side to over this side, except that the twiddly interlude bit that got ripped out was a sort of bridge between two different keys. Playing the resulting set revealed a dissonance that highlighted the rift between the two parts. In the end, I highlighted the offending section and, using the power of Anvil, shuffled them down a tone or three. Job done.

Anvil3I wanted the musical piece to run from a simple tune and get incrementally built up to a crescendo. The short animation time meant I was left without a lot of run-up space, so I broke the music into parts and added the rhythm track and the accompaniments in varying stages, putting it all together at the end.

The accompaniment tracks started off sounding very boring and flat: Just a single note played for each beat. To spice it up, and to allow a bit of dissonance as it progressed, I changed them to alternate between Oom-pa-pa and (rest) Ba-da-ba.

So they go Oom-pa-pa, (rest) Ba-da-ba, Oom-pa-pa, (rest) Ba-da-ba. Then, as I like, I can adjust one pa to bring the piece up to another key, or replace an Oom-pa-pa with a Ba-da-ba to add a bit of urgency. I’m sure there’s a musical term for this, can’t tell you what it is so don’t ask.

Lastly, by the time we get to the last phrase, there wasn’t enough behind the crescendo. Sure, it hit the high notes (better than I could!) but because everything had gone up by an octave or so, there was no bass left. To round it out, I inserted some simple bass notes to keep the whole thing grounded.

Whew! How about that! Music is done. Now what? Well, in my next post, I’ll show you how I brought it all together.

The Bullet Animation – Music

Having moving images and sound effects for the animation wasn’t enough. After toying with layering sounds upon sounds to build to a crescendo, I figured out that what was needed was not more crappy sounds, but music. Actual music. It sets the scene, it binds the flow together, it lends to the atmosphere of it all.

Recording

First, I came up with a tune. It’s one that’s been stuck in my head for ages, I don’t know if it’s an actual song or not, but it’s what I chose to run with. So I sang it. Ha! Bad move. Firstly, singing in the shower is one thing, singing into a microphone is something else. In fact, I did try recording it in the shower. It didn’t turn out much better.

There were a few problems. Firstly, I had no musical backing, no metronome, no drums or pianos or violins or guitars. OK, I thought, I’ll just hum it out as a chorus and layer my voice over itself in Audacity. Yeah. Nah. Not good. After a few solid attempts tucked away in the garage, I recorded myself a few times in different keys, mimicked a ‘pom pom-pom’ for the beat and opened the recordings in Audacity.

While it wasn’t terrible, it wasn’t great. It wasn’t even good. Passable might be a stretch. I adjusted the pitch and tempo to get two tracks into line, which helped a bit, but the overall result was underwhelming and unsuitable. Why? Because of a second, larger problem.

While Audacity allows one to increase or decrease the apparent tempo, there’s only so much it can stretch before it starts to sound distorted. So unless I fluked it and got my recorded tune to be pretty close to the timing of the animation, I would have to record it all again. And I was still without instruments.

Phooey.

Midi

Back in the day, when we first got a Sound Blaster, I was introduced to the world of Midi. This topic is pretty huge, but the concept is pretty straightforward. In a similar fashion to Vector versus Raster graphics, using Midis frees one from actually having to play or, in my case, sing a song. Rather one provides instructions for playing the song. Consider a record player versus a sheet of music. A record player plays the record placed upon it. It cannot play an abstract piece of music unless that music is encoded onto a record.

A sheet of music, on the other hand, is similar in that a tune may be derived from it, yet it cannot be used to create that song. Instead a musician, acting as an interpreter, and an instrument, upon which to play the tune. Give the musician a different instrument, and you get a different sound. Up the tempo, change the key, and it’s just a matter of the musician playing the same tune differently.

Not only that, you can give different sheets of music to different musicians and, hey, presto, you’ve got yourself a band. OK, not exactly the same thing, but you get the idea. It allows musical plebs, like yours truly, to slowly create a piece of music, assign instruments, even put in a rhythm track, and make music. You can use your midi to ‘talk music’ to devices like electronic keyboards and sample pads.

Nuts. I don’t have my Sound Blaster anymore. And Midi-mapper, a tool that one could use to define the output device for playing midi files, that used to be in the control panel of Windows 3.1 just isn’t there in Windows 8. A bit of poking about on the web, reading up on a few sites, yep, it’s gone. No! Surely not!

Anvil2Fret not! For midi, as I came to find out, is alive and well and not going anywhere soon. As with everything else about this whole project, it took a bit of reading of forums, blogs and how-tos to get my head around it all, but I’m glad I did.

I downloaded a few nasty midi composers, not to my liking. They were too clumsy, or they wouldn’t even install properly. Finally, I settled upon a great piece of software called Anvil Studio (www.anvilstudio.com) that enabled me to, from scratch, knock up a tune, add a rhythm track, add a couple more tracks for harmony and, tada! Music!

Alright, maybe it wasn’t that easy. First I had to fish out my old music books and remember things like ‘Middle C’, 4/4, 3/4, 2/4 time, rests, quavers, semi-breves, sharps, flats, chords, staccato, keys. After struggling for a solid hour, I discovered that Anvil doesn’t force you to do things solely with sheet music. For example, I found that there is a ‘view’ of a ‘piano roll editor’, shown on the right here, that let’s you mark out your tune in a graphical format. Purists, look away!

Anvil1Not only that, if you’re a guitar buff, you can plot your music on a tablature view.

With each track, I can pick an instrument I want to use to play that tune. It’s kind of cool, really, to see how a song sounds when played with a piano, or a guitar, or a glockenspiel. Best of all, no need to re-record.

What about percussion? I added a rhythm track. First, I played with adding some bass and a crash symbol, just to see how a backing rhythm would sound, then proceeded to fill that in all the way across the tune. Whoa, there’s a better idea. Loops.

Anvil allows me to make a loop, of the various percussive sounds and I can then instruct it to play that over the next portion of a tune. Now that’s handy. No copy and paste errors, and no tedious filling out of a rhythm.

So that’s great news! I had got a veritable orchestra at my disposal, right? Right. Almost. It certainly solved most of the problems outlined above. I can adjust the tempo of the song to fit into the timing of my animation. I have a musical score that I can tweak. I can apply musical instruments to different tracks.

Above all, I don’t have to sing. You can thank me later.

So why ‘almost’? That comes back to how the midi files are rendered. I’ll get onto it in the next post.