Category Archives: Audio

Jetboard Joust Devlog #58 – Music, Maestro!

Well, the background music’s finally done and it’s taken what seems to be an indeterminable amount of time.

It’s partly because I had to put a proposal together for some contract work in the middle of it – which made the process seem to drag on longer than it should, but also because I decided I had to sort out the ridiculous mess of cabling (of various varieties) that had overtaken my studio and was making it difficult to work. Each of those tasks took at least two days.

I guess 8.5 days total dev time isn’t too bad for the amount of background audio that’s in there but, even accounting for the aforementioned increased in elapsed time, it still seems to have been a rather lengthy and unnecessarily painful process. Here’s how it went down (and sorry for the crackling in some of this audio – seems to be problem with running Windows on a Mac)…

1. Main Theme
I knew from the get go that I was going to utilise the same approach for the background music that I had for the in-game FX, ie all analog synths for the sounds and as few software plug-ins as possible when mixing. I needed to have a rough idea of the style of music I was going for though so started by playing the game alongside a few different tracks to see what worked best. I tried a number of different electronic artists, eventually settling on the ‘Detrimentalist’ album by Venetian Snares as my favourite, with particular reference to the tracks ‘Kyokushin’ and ‘Bebikukorica Nigiri’, the latter featuring a bunch of ‘chiptune’ type sounds which seemed particularly appropriate.

Once I had a general ‘vibe’ in mind I started creating some drum patches and banging out some beats on The DSI Tempest trying to get something that worked, using a combo of the Moog Sub 37 and Mother 32 for bass and lead duties. As often as possible I’d try and listen to what I was creating alongside a recording of the in-game fx so I could try and create sounds that weren’t going to mask and/or fight against each other to much. I found this pretty difficult to be honest.

After about a day I had a simple loop that I was generally happy with and began to work up some variations on it. I probably spent a couple of days playing around with different variations, whilst running into various technical difficulties syncing up all my gear in the process (ah – the joys of MIDI and analog)!

Then I started trying to combine all these variations into a single cohesive piece of music and this is where I started to run into problems. It didn’t work. I think this was partly because my variations were all too different and didn’t ‘flow’ together, and partly because I was trying too hard (and with too little talent) to ape Venetian Snares and the result was too full-on and tuneless.

I was getting pretty frustrated by this point. Four days in and I still didn’t have anything resembling a main theme. Then I remembered a piece of music I’d written ages ago for a J2ME game called ‘Battle Snake’ that I had always been rather fond of. I decided to dust this off and see if it would work for Jetboard Joust – fortunately it seemed like it might!

The (as it stands) final theme is a mash-up of ‘Battle Snake’ (with new sounds) and some of the variations I originally created for ‘Jetboard Joust’. I’m still not entirely happy with all the sounds here, particularly some of the more distorted ‘guitary’ type synth sounds which seem to conflict too much with the in-game fx. I may well replace these with something less harmonically rich.

Thankfully I could also use some of my original variations for the other sections of game audio so that time wasn’t entirely wasted…

2. Baiter Theme
The player has approximately two minutes and twenty seconds to complete each level in Jetboard Joust before the pace is upped and the ‘Bastard’ enemies (equivalent to the Baiters in Defender) start to attack. I thought my original (rather full-on) loop would work better for this section of the game and so created a separate piece of music for this that’s more ‘high-tension’.

3. Lost Life / Level Complete
These are short sections based on the repeated section of ‘Battle Snake’ that now forms the ‘hook’ of the main theme. An ascending progression for ‘level complete’ and a descending progression for ‘lost life’.

4. Planet Ambience
OK so this isn’t a piece of music as such but I wanted some kind of background audio during the ‘quiet’ periods of the game such as at the start of each level before enemies attack and at the end of each level once all enemies are destroyed. I’ve gone for a sort of retro sci-fi spooky ambience here with analog wind effects and vintage ‘sample and hold’ type noises that trigger seemingly randomly. I also added a weird interference loop which was the sound of some of my gear accidentally wired up incorrectly that I kind of liked. I think the planet ambience gives a nice contrast to the more full-on background music.

5. Upgrade Theme
One of the variations on my original theme was a type of minimal ‘spooky’ loop with bell-like synth effects and a lot of vintage delay. In the end this didn’t work as part of the main theme (it was too downbeat) but it seemed to work really well over the upgrade screens. I also added the wind noises from the planet ambience in here too.

6. Title Theme
I quite liked this being underplayed as well so stuck to just using the ‘planet ambience’ here with a bunch of samples of the ‘bell’ sounds from the ‘upgrade theme’ triggered randomly (all part of the same minor scale though so not entirely random). Again this has a kind of ‘vintage sci-fi’ feel which I liked. I also added spot fx for ui actions on the menu.

Now that I’ve written all that up it seems like rather a lot of work so I don’t feel quite so bad about it taking eight days or so to complete – bearing in mind I had to code all these into the game as well and managed to fix a couple of other bugs whilst I was at it. I’m bloody glad to be moving on from it though…

Dev Time: 8.5 days
Total Dev Time: approx 109 days

previous | next

mockup_3x
And This Is After I Sorted Things Out…

mockup_3x
The Original Loop – Way Too Loud For The FX!

mockup_3x
Main Theme – Jetboard Joust / Battle Snake Mash Up

mockup_3x
The Baiter Theme – High Tension Using Original Loop

mockup_3x
Upgrade Theme – Minimal And Spooky

mockup_3x
Main Menu And Planet Ambience

Jetboard Joust Devlog #50 – Sound Thinking!

Woohoo – it’s my 50th DevLog!! Sadly no-one is throwing me a party (or any money).

Just been finishing off the final pieces of missing audio for the alpha version. As before I’ve done everything using the DSI Tempest and a couple of fx processors – namely an ancient Boss RV-1000 reverb and, this time, a Pigtronix Echolution 2 on delay duties.

The only one that caused an issues was the ‘combo’ effect – I wanted an arpeggio-style sequence that played for longer depending on how much of a combo was awarded. Pretty easy to build the audio from a series of separate notes and step forward each time another enemy is destroyed in the combo ‘chain’, harder to stop several notes from all playing at once if several enemies are destroyed simultaneously (ie with a single shotgun blast).

So I built a ‘SequenceAudioPlayer’ class that steps forward in the sequence each time Play() is called but that queues notes to be played after a set interval if Play() is called too quickly. This way I get a nice ascending arp even if multiple enemies are dispatched at once.

You can hear a bunch of the new sounds (as well as some of the old ones) in these short gameplay vids.

Dev Time: 1.5 days
Total Dev Time: approx 84.5 days

previous | next

JetBoard Joust Devlog #39 – Pushing The Envelopes

Yeah I know, it’s been a while!

I’ve been working on the in-game audio fx for Jetboard Joust and it’s taken some time. That and I’ve had some time off over the Summer – it’s not often we get much sunny weather here in the UK so when we do you need to make the most of it.

As making music is pretty much an obsession of mine (see here) I am in the fortunate position of owning a reasonable amount of noise-generating hardware and software. For a project like this though one needs to set restrictions so I decided to create all the FX using the DSI Tempest.

The Tempest is billed as an ‘analog drum machine’ but really it’s much more than that. It’s a very flexible, polytimbral, six voice analog synth with a bunch of samples in there for added spice. I wanted a definite ‘retro’ feel to the FX without going down the road of actually emulating a SID chip or equivalent and felt that limiting myself to the six voices and two analog oscillators of the Tempest would give me that.

In addition I used a few outboard fx, mainly the Waldorf 2-Pole analog filter. This is a fantastic little unit and pairs great with the Tempest. The ‘rectify’ function brings a kind of analog bitcrushing type effect and the addition of a resonant high-pass filter means I could get even more gritty than the Tempest can go on its own (which is pretty gritty anyway). The 2-Pole can beef things up really nicely without totally destroying the bottom end (an unfortunate side-effect of the Tempest’s otherwise great-sounding onboard distortion). I also used the Sherman Filterbank 2 but, whilst I love the Sherman, it was really a little OTT for the job in hand and the Waldorf did just fine on its own on the whole.

As an experimental indulgence and for a bit of authentic ‘retro’ feel I purchased a couple of vintage digital fx units on ebay for around £30 each – a Boss RV-1000 reverb and a JHS DX-777 delay. I was really pleased with the way both of these worked out, they both sound really cool in their own way and restricting myself to these two units for ‘aux send’ type fx meant I could mix and record everything ‘live’ through my hardware mixer (a Soundcraft Spirit M12) – no software mixing and plug-ins required!

I think the Tempest worked out great for this task. It’s a machine that tends to get a bit of a slagging off for its (admittedly piss poor) MIDI implementation and arguably underpowered sequencer but there’s plenty to love about it and I don’t think I could have done this on any other single piece of gear. The real beauty of it from a sound-design perspective is its extremely flexible modulation capabilities – five envelopes, three of which are assignable to pretty much any parameter, and an eight-slot modulation matrix offer an awful lot of flexibility. Add to that the ability to sequence and layer different voices and you have an extremely flexible sound design tool.

So I wasn’t designing the FX totally ‘blind’ I’d grab some gameplay footage for the appropriate effect and import this into Logic Pro. I’d then set the tempo and cycle length in Logic to match the tempo and beat duration on the Tempest. This way I could get the Tempest in sync with gameplay footage and tweak away whilst watching.

I’m pleased with the audio so far – it seems to have the full-on, in-your-face, vintage Defender/Robotron vibe I was going for. I still need to work on balancing some of the sounds and there are issues with some sounds cutting off and not playing properly in the MonoGame Windows GL port but think I can finally get back to coding for a bit and stop driving my family insane. You can hear all of the sounds (over sixty of them) here or click the video link on the right to get an idea of how the audio feels in-game.

Dev Time: 6.5 days (at least)
Total Dev Time: approx 52 days

previous | next

mockup_3x
All The Gear And No Idea

mockup_3x
Vintage Digital – Boss RV-1000 and JHS DX-777

mockup_3x
Quick And Dirty Gameplay Footage Grabbed At 30fps With Audio

Playing MP3 Background Music In MonoGame Windows

The process of porting ‘Attack Of Giant Jumping Man‘ to Windows Desktop has been generally painless. One of the things that has given me the most issues though has been getting MP3 background music to play correctly. For some reason the WindowsGL version of MonoGame doesn’t support MP3 files as XNA Song objects to play via MediaPlayer.Play().The solution, as usual with these kind of issues, is to go native. Unfortunately just doing something as simple as playing an MP3 file on Windows is much more convoluted than would seem necessary if you want to avoid including additional dependencies (DirectX, Windows Media Player etc) into your project.

So, here’s some code that will play MP3 files without the need for additional dependencies by hooking into the winmm.dll. Import your MP3 resources using the MonoGame pipeline tool and just set to ‘copy’ with no pre-processing. Code could probably do with tidying up a bit but it works!

#region Using Statements
using System;
using System.Text;
using System.Runtime.InteropServices;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Input;
#endregion

namespace com.bitbull.meat.platform.windows
{
    public class WinmmMp3MediaType
    {
        [DllImport("winmm.dll")]
        private static extern long mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, int hwndCallback);
        private string filename;
        private string command;
// Expects a name like 'yourfile' WITHOUT an extension (just for consistency with Content.Load)
// Expects files to be stored at root of Content directory with no pre-processing 
        internal WinmmMp3MediaType(string name)
        {
            filename = "Content/" + name + ".mp3";
        }

        internal override void Play(int loopcount, float volume)
        {
            StringBuilder retvalue = new StringBuilder();
// You need to stop and close and currently playing files otherwise it doesn't work properly
            command = "stop Mp3File";
            mciSendString(command, null, 0, 0);
            command = "close Mp3File";
            mciSendString(command, null, 0, 0);
            command = "open " + "\"" + filename + "\"" + " type MPEGVideo alias Mp3File";
            mciSendString(command, retvalue, 0, 0);
// I've commented out the code for setting the volume as it's specific to the way I do things but basically this command expects an integer between 0 (min volume) and 1000 (max volume) 
            // float master_volume = MEAT.Platform.MediaInterface.MusicVolume / 100.0f;
            // mciSendString(string.Concat("setaudio Mp3File left volume to ", (int)volume*master_volume*1000), null, 0, 0);
            // mciSendString(string.Concat("setaudio Mp3File right volume to ", (int)volume*master_volume * 1000), null, 0, 0);
            command = "play Mp3File";
            if ( loopcount<=0 )
            {
                command += " REPEAT";
            }
            mciSendString(command, retvalue, 0, 0);
        }

        internal override void Stop()
        {
            command = "stop Mp3File";
            mciSendString(command, null, 0, 0);
            command = "close Mp3File";
            mciSendString(command, null, 0, 0);
        }
    }
}