Saturday, 26 December 2015

The year that was, 2015

In what is becoming something of a tradition, it's time for me to take stock of the creative "things" I've done this year as a reminder to myself that I do more with my free time than just play games and eat chocolate.
Not to mention that I completely rewrote my CV - does that count as creative?

2016 is coming. Now I don't have to write a weekly RPG any more, it's time for some exciting new projects.

Friday, 2 October 2015

Simple Arduino

I've been meaning to learn something about microcontrollers and hardware prototyping forever but there just never seemed to be the time. Fortunately, time was created at a recent PLIBMTTBHGATY meetup when a friend offered to bring a load of unused Arduino "bits" for me to play with. Interestingly, everyone I know owns at least one Arduino but only two of them actually know how to use it properly.

Getting going turned out to be quite easy, which was a relief as starting from pretty much no knowledge (I learned some basic electronics at school a long time ago but that's about it) is usually a pain. A huge thanks to Neil for answering some of my very basic questions. I'm intending to write a few "getting started with hardware stuff" posts as I continue learning and I'll write up some of what he taught me in the hope it will help others get going.

Box moving in a rectangle

My first creation of interest was a box moving in a rectangle on an LCD screen.

This was mostly a programming exercise as wiring up the circuit was just a case of following a diagram exactly but it was useful to learn the basics of syntax and how to push a program to the Arduino.

Building blocks to make this:

Button switches between LEDs

Next up, a circuit which switched from a red light to a green one while a button was depressed.

This was the first circuit I designed myself, using the knowledge gleaned from a few other tutorials.

Building blocks to make this:

Bouncing box game

Finally, I was challenged to make a simple pong-style game. The box travels left to right. If the button is pressed as it reaches the end, it bounces back and the player gets a point. Repeat until the button is not pressed correctly and the game resets.

A more complicated circuit here, requiring a second breadboard and many of the Arduino's pins.

Quite a lot of work went into coding the logic of this game. The initial version allowed the player to keep the button pressed down and the box would bounce indefinitely so I changed it to have the game reset if the button is pressed too early as well as too late.

Building blocks to make this:

Saturday, 25 July 2015

iPhone to Android - apps impressions

The last major change is with the new apps and app store. As I said before, I really like being able to install apps from a desktop web browser but how are the apps themselves? Well, in no particular order...

The default Android calendar app is nice. Not amazing, but definitely more usable than the iOS calendar.

The notes app on the G4 seems ok, but saves its notes to a hidden folder in Google Drive. This fills me with fear for the time I want to migrate to a new notes application. I want to be able to see my backups in plain text somewhere so I can reuse them - migrating from Apple to Android has really shown me the benefit of thinking about that up front. iOS notes was sync'ing to GMail and I wanted something which would do the same. It took some searching, but I turned up GNotes which not only syncs in the same way, but when I gave it access to my Google account pulled all my old iOS notes through. Impressive. At some point I will have a look at Google Keep, but this has got me started.

Shazam seems slightly better designed on Android, although that could be my imagination. Annoyingly (but not surprisingly) I had to buy the ad-free upgrade again. I was hoping it would let me log in cross-platform to avoid that repeat charge, but alas not.

Having Chrome on my phone is lovely. Rather than messing around with bookmarks in Safari they are just sync'd from my desktop. I could have done this on the iPhone of course.

Mailbox isn't quite as nice as the iOS version. Functionality is the same, but I keep opening mail when I am trying to swipe - something I don't remember doing before. It's still by far the best mail app I've used though.

Textra is a great text message app. Not much more to say on this except that I've coupled it with SMS Backup+ which is sync'ing my text messages with GMail to avoid the horror experienced when trying to save them in a readable format from iOS.

The Flickr app. Hmm. Photo uploading was always going to be a big difference between the two operating systems because it demonstrates a major difference in the underlying ideology. In iOS to upload to Flickr you fire up the Flickr app, select your photo, edit it and upload - it starts from the application to upload. In Android you start from the picture, open it in the editing program of choice and push it to another app to handle the uploading. The change takes a little getting used to (change is change, even though the Android setup makes a lot more sense) and would be much better except for one important fact - the Android Flickr app is awful. Significantly worse than the iOS version. It seems to be missing several key features for editing (auto-correct, most of the effects) which makes it only useful for uploading and unless you want to post to Twitter at the same time, the Bot for Flickr is actually a better option for uploading as you can queue a load of pictures to automatically upload next time you connect to a wifi connection.

Photo uploading also highlights a security feature in Android which hasn't fully been adopted by the app developers yet. Resources on the SD card from one application cannot be modified by another application unless permission is given. When you take a photo, the image is a resource owned by the camera so you can't modify it with an editing application. Instead, the editor needs to save a copy but the apps I've used do not switch to this new version on save so I've had to edit, save, back out of the picture, and go into a different picture stream in order to find the saved file for uploading. There is some explanation of the underlying problem in this thread.

The upshot is that uploading photos involves an annoyingly convoluted workflow. It's not the end of the world, but could definitely be better and this is using the (otherwise excellent) Android / LG gallery app.

So far, I'd say none of the apps seem different enough to make a huge difference to anyone's life. I was surprised how easy it was to switch between operating systems and either keep the same apps or find easy substitutions.

Thursday, 23 July 2015

iPhone to Android - LG G4 first impressions

Enough of getting out of Appleville - what is it like in the world of Android?

Initial impressions were a little shaky. I hate unclipping molded plastic. No matter how well it is made, it always feels like it is going to break so getting the back off the phone was fraught. Of course, the fact I could get the back off at all is a point in its favour as this handset has a replaceable battery and expandable memory.

Putting in the micro SD card was a bit odd - it felt like it wasn't locked securely into place. It turned out that it wasn't so I needed to open it up again to fix it but it needed a bit more of a push than I was initially willing to give. Still, having it open let me switch the back for a Qi wireless charging enabled case which clipped into place and Just Worked. I don't need wireless charging in my life but it was one of the little things I was excited to try - it feels like I'm in the future. Yes, I'm a child.

Next, loading it up. Key noises. Argh. First task on any new device - silence the system noises. The Android ones seem particularly obnoxious to me. Also, the default Android (or possibly LG?) keyboard is pretty irritating. Why doesn't it auto-complete for me?

Powering through the horrible sounds and annoying keyboard, I put in my Google account details and ... that's it. The phone thinks for a few moments and EVERYTHING WORKS. Calendar, email, contacts, music, files in Drive, sync - the list goes on. I'm very, very impressed. It's not quite as good as a fully iCloud Apple device, but it's much cleaner than I'm used to using non-Apple services on an iPhone.

It gets better from there. Everything that is annoying can be changed. Keyboard? Swiftkey please. Sounds? Change them. Turn them off. Whatever. Text messaging not great? Install an entirely new text message application (Textra). And so on. If you can't be bothered to do it on your phone, just log into Google Play on your desktop and tell it to install stuff to your phone from there. I think you can do this on an iPhone but since it involves firing up iTunes I'd rather add the applications directly to the phone's hard disk using a magnetised needle.

Out of the box I'd say iOS has the edge. It's more refined, snappier and has much better defaults. But Android gives me options iOS users can only dream about. Arguably far too many configuration options, but it really didn't take too long to go through the ones I cared about and by the end I have something which works very well and is tailored to the way I use the phone. It's still doesn't feel quite as snappy as a new iPhone but it's much more than fine and the personalisation definitely makes up for it.

The LG G4 is a lovely device. Much bigger than the iPhone 4S, but it really didn't take very long to get used to the change. The screen is quite beautiful - quad HD with a great colour definition -  and the camera is fantastic too. The battery started out frightening - I struggled to get a full day out of the charge - but a friend told me they gain life after a day or so of use and he was right. Last time I looked, the indicator said I had 75 hours remaining. My usage has dropped off a bit as I've stopped fiddling with it but not that much.

Android tells me things about the battery. How much it's using and which applications are consuming the power. Why didn't my iPhone tell me this information?

So - first impressions weren't great. Almost every other impression since then has been brilliant. I've been using the system for a little over a week now and it still gives me actual pleasure - it has been a long while since I could say that about a phone.

Saturday, 18 July 2015

iPhone to Android - iMessage

My phone number is attached to iMessage so any incoming texts will disappear into the Apple servers and be delivered to my iOS devices. This was great when using an iPhone but now basically means texts are delivered to my iPad.

This was something that hadn't even occurred to me until a friend complained I wasn't reading his messages. A quick hunt online turned up Apple's Deregister iMessage tool which is very easy to use. I had already put my SIM in my new phone by this point and couldn't be bothered to dismantle everything so I used the SMS deregister and it worked immediately.

I think I'm free now?

Thursday, 16 July 2015

iPhone to Android - music

After the horror of extracting my SMS data from my iPhone, I moved on to music. Currently I have my music in iTunes with Match so I can stream to my device. A little reading showed me Google Play is:

  • bigger (stores at least twice the number of tracks)
  • not using iTunes
  • cheaper (free!)
  • not using iTunes
  • web accessible
  • not using iTunes
The setup was easy, led through by a well designed website. It pushed me to the Chrome app which seemed to have trouble reading my music but then I found the desktop version. I pointed it at my (iTunes) music folder. It scanned it and about 2 hours later I had an online library of around 2500 songs. I am struggling to find the words to express quite how easy it was.

Now, I have a very fast internet connection here but I was also watching stuff on YouTube and talking on Skype while it did its thing and didn't notice any problems. It even handled the multi-artist albums which iTunes sometimes struggles with (albums with "artist featuring another artist" on it). I've not dug through my online library in too much detail yet but I'm yet to find a mistake.

I'm impressed.

Wednesday, 15 July 2015

iPhone to Android - contacts and SMS messages

I want to retain as much data as possible from my iPhone, most importantly my contacts list. In theory my phone contacts should have been sync'd with my Google contacts but that doesn't seem to have worked completely. Instead I made use of Contacts Sync by Playa Apps (a name that inspires trust). The interface was very simple and, although it cost me a couple of quid, it let me push all my iCloud contacts to Google contacts in a few minutes. There was probably a free way to do this but really it wasn't worth finding.

On to SMS messages and this is where I'm reminded one of the reasons I want to escape Apple control. These messages are my data and they are backed up into my iCloud account but can I get at them? Or can I download the iCloud backup and pull them out? Of course not. Cue an hour of hunting around for something which would help me and not try to charge me $20+ for the privilege of extracting my own data. 

Finally, there is light at the end of the tunnel. If I manually back up my iPhone via iTunes (like in the Olden Times) then I can extract the SMS messages using AllYourTexts which is simple to use and free. Finally, I have a folder of my message history, freed from the Apple Prison.

I'm expecting the Android import to be significantly easier but even if it isn't I now have the data saved.

iPhone to Android

After seven years as an iPhone user I have decided to give Android a go. Going into this, my expectations are:
  • significant financial saving on the handset
  • expandable memory on the device
  • pain in the switch over
  • better integration with the services I already use (basically the Google suite)
My first hope was immediately dashed - somewhere along the lines, the handset manufacturers decided to start selling premium phone at premium prices. Fortunately, and unlike the Apple world, prices fluctuate massively so I eventually found an LG G4 for under £400 which was a significant enough saving to be worth a go. It also seems to be one of the few front-runner phones which offers replaceable battery and memory expansion - it seems these features are dying out which is disappointing.

I'm expecting switch over pain. It's a new operating system so there is no way it will be a seamless transition. Also, the handset I've bought is much bigger than my old phone so I'm expecting it to take some time to get used to that.

There wont be any comments on speed here. I'm coming from an iPhone 4S so the new phone will be faster, but it's hardly a point of comparison.

A collection of thoughts and experiences through the change over:

Sunday, 5 April 2015

The Year in Pictures

A few years ago I was involved with 12 Cakes - a project which put up a cake recipe every month for a year. It was a nice, simple idea and got me thinking about doing something similar using photos. So, after a year of messing about and not finishing the site, I've create The Year in Pictures. Along with five friends and family, I am selecting one photo each month which says something about that month and putting them together on a website.

There is no real goal for this. By the end of the year I'll have 12 months of photos for 6 people which could be used for a variety of things but for a change I'm not worrying so much about the end game and just enjoying watching it grow. Three months in, there is now enough to look at that it's worth being seen beyond the six contributors so I'm going to start mentioning it on Twitter when a new month is uploaded.

If you're interested in the technical details, the website is static HTML generated by Jekyll and styled using Foundation. The photo pages are created using a Jekyll generator (combining a photo and some metadata from a YAML file to produce a full page) and most of the rest is done with macros. The code is on Github if you would like to see how it all works - it was creating using my Jekyll bootstrap project.

Tuesday, 3 February 2015

Streaming gameplay with two sound cards

Another post on this. I'm not convinced my previous suggestions work very well and I've found a better way to do this by making use of a few pieces of free software.

So; round two.

The setup

I've been through this in detail on a previous post, so this is just the highlights.
  • game audio through primary soundcard (the default Windows device)
  • Skype audio through secondary soundcard
  • input from a microphone

The problem

All the streaming software I've seen mixes microphone input into the Windows default sound. I need to also mix the output of another sound card to capture game audio along with both sides of a Skype call during multiplayer gaming.

The solution

The outline is:
  • create a virtual input sound device
  • mix microphone and Skype output into that device
  • set the virtual input sound device as the "microphone input" in the streaming software (in my case, XSplit Gamecaster but this should work with any similar software)

But... how?

To create the virtual audio device we need some extra software. I used VB-Audio Virtual Cable (a donationware alternative to theVAC which costs $25 upwards). Find the downloader (there is a download link under the "VB-Audio Virtual Cable" heading) and install it and magically you'll have some new audio devices appearing in your Windows Sound dialogue.

Next you want AmaMix. The download contains a load of visual stuff, but you only need to worry about AmaMix which lets you route audio to different devices. Make sure you run it as Admin or it will just crash with no indication as to why.

AmaMix is pretty easy to set up. Hit Config and it will give you a dialogue which lets you choose both the secondary sound card output and the microphone output as sources and the new VB-Audio device as your target. There are also options for boosting the inputs and generally fiddling with them until the levels are as you want them.

If you can't find the output of your sound card go to the Sound dialogue and select the Recording tab. Right click and enable disconnected and disabled devices and it should appear.

Finally, in your game streaming software select the VB-Audio device as your microphone input. Now, when you want to stream (or record) you just need to remember to fire up AmaMix along with your streaming software and everything should be ready to go.

I hope this helps someone!

Wednesday, 21 January 2015

Streaming your game with multiplayer audio using XSplit and two sound cards

Catchy title, no?

When streaming a game, XSplit Gamecaster allows me to take the sounds from that game and mix in a single vocal input, however I have two sound cards to allow me to use a mixing desk to manipulate the levels of a Skype call against the game sounds (I posted before about the details of my audio setup on my gaming machine). The XSplit options work for me when streaming or recording single player footage with commentary, however there are problems when it comes to capturing multiplayer gaming along with the group conversations as essentially there are two vocal sources (my voice and everyone else's voice). This leaves me having to choose two of the three audio sources and ending up with either the game sounds plus friends talking to a silent me or the game sounds plus me apparently chatting to nobody.

Why XSplit and Skype?

I am sure there are better capture programs than XSplit Gamecaster (the more-featured Broadcaster, for example) but they require more work to set up and at a quick glance do not offer the required additional options to solve this particular problem. Whatever its shortcomings, Gamecaster does a fantastic job of getting streaming and recording set up with minimum fuss.

The choice of Skype for communication is because that's how my regular group communicates. Again, there are probably better options but this works for us at the moment. For this problem, it shouldn't actually matter as it is basically conversation out of a secondary sound card, which can be done with any chat program.

Also it is worth noting that this is all done on Windows 7.

My requirements

I game a lot but at the moment I record rarely, so any solution needs to both be easy to fire up (to encourage me to do it) and non-intrusive (so my normal gaming doesn't get any worse).

  • low impact on my normal gaming once set up
  • easy to turn on when desired
  • records game sounds and both parts of the Skype call
  • I don't have my own voice echoed back to me through my headphones
  • allow me to keep my current hardware configuration

How to do it

First, we need to get at the output of the second sound card. For Creative Cards, this will be a device called "What You Hear". The RealTek equivalent is "Stereo Mix". Hit the start button and look for "Sound". On the dialogue that appears, select the "Recording" tab. If the device isn't there, right click and enable disconnected and disabled devices. It should appear. In XSplit, select this device as Microphone Input.

At this point, if you are playing a multiplayer game with a Skype call you'll record game sounds and your friends' voices but your own voice will be missing.

Next, go back to the Recording tab on the Sound dialogue. Find your microphone, right click, properties and select the "advanced" tab. Disable exclusive mode (both boxes). Finally, go to the "listen" tab. When you install XSplit it creates a device called XSplit Stream Audio Renderer. Select it from the drop-down and check "listen to this device".

Done! Now, when you record again you'll find your voice is included in the mix.

If you look at the audio options in your system tray you'll see that you can set the levels on the XSplit Stream Audio Renderer which will let you balance your recording.

What is going on?

XSplit seems to create a software audio device (i.e. it doesn't physically exist) and record the output of that. Behind the scenes it mixes the Default Audio output and whatever is specified as the mic input into this device. All we have done here is add an additional audio stream to that device using native Windows options. I added the microphone to the XSplit device by hand and let XSplit handle adding the rest of the Skype call, but I assume it would work just as well the other way around.


If you aren't using XSplit or you don't want to mess with one of its components you may want an alternative.

I am trying to mix three audio channels (game, mic and other vocals) when XSplit only allows me to specify two sources (default sound and mic input). In practice, XSplit lets me select any Windows audio input device as the "microphone input" and this gives me the option of creating a new (software) sound source and pre-mixing the microphone input and other vocal output. This requires additional software (such as AmaMix (free) or VAC) which is why I went with the above solution which only uses standard features of Windows.

Friday, 9 January 2015

Controlling your gaming audio through a hardware mixer

I play a lot of multiplayer games and getting the balance between communication and game sounds so both can be heard is very important. Alt-tabbing out of a game to fiddle with the Windows mixer is a pain and is potentially a one-way trip so I've been looking for a better solution.

My requirements

I have three different audio sources on my computer which need balancing:
  • game sounds
  • communication (my group uses Skype, I don't see why this won't work for TeamSpeak)
  • music (from time to time)
And I want to be able to change the levels without leaving my game.

The problems

There are two problems - both with fairly simple solutions: how to separate the audio streams, and how to re-combine them after the levels have been set.


First, I separated communication. A second sound card solved this problem - Skype can be configured to use any audio output device. Like most gamers, I have a PCIe sound card (Sound Blaster X-Fi for me) which means I have an unused sound card integrated into my motherboard. Re-enable that in the BIOS, point Skype at it and we're away.

For music, I cheated. A while ago I switched the music systems in my house to Sonos - I've written about moving music to a NAS and getting it tagged properly in the past - and this means that it is already a separate stream. The problem with the Sonos output was actually mixing back it into the others so I could listen to music while gaming with headphones.

This leaves my game sounds coming out of the primary sound card in my computer. Three separate audio streams - done.


To re-combine the audio, and also allow me to fiddle with the levels while in-game, I went for a mixing desk. I chose a Yamaha MG124C which is a bit over the top but I really wanted faders (the sliders) for volume control, not just pots (the twiddly knobs) and this was one of the smallest desks available with that feature. I've also used this desk in a radio station in the past so I know it makes a decent sound, is well made and isn't covered in useless features which are likely to break.

Setting up the desk was straightforward - the stereo output from the main sound card and Sonos go into the main stereo channels and the Skype soundcard goes into one of the secondary stereo channels. Some decent cables are also required; I'm using a variety of Adam Hall cables like this. The different channels are routed through the group fader so I can switch between output to the amp and output to the headphones with ease.


And that's it. Now when I'm gaming if I can't hear my team-mates I can simply reach over to the desk and turn up the Skype channel, or turn down the game channel. I can add in music as I choose, or mute it at the touch of a button if things are getting hectic. I can easily make ongoing adjustments to these settings without ever leaving the game.

Hopefully someone will find this useful. The biggest problem I've encountered so far with this setup is how to record game play along with the communication channel. I will cover the solution for that in the next post.