Friday, November 19, 2010

Clap control for Music PC

When I set up my FreeNAS server, I lost only one program I actually missed: iTunes. Now dont get me wrong, I absolutely hate iTunes as its a restrictive, bloated, and useless peice of crap. However, the Remote app on my iPhone is fucking fantastic and even after trying out alternatives (Namely songbird), the remote control apps just dont cut it.

So ive resurrected my old Compaq (for the 4th or 5th time now), and installed my nLite XP SP3 disc.

Ive installed iTunes 10 on it from a archive site as the lates iTunes refuses to work properly (the remote app wont connect period) but the 10.0 release worked fine. I imported a directory from my NAS into the setup and got it working well with the Remote app. After connecting this setup to the external speakers i set up for my TV, i was able to play some music just fine in the TV area.

However, iTunes doesnt really auto-add new tracks in the folder like i want it to so i bought iTunes folder watch from here. Its a really great app if your going to suck it up and use iTunes. The registered program sits in the background, scans your watch folder and auto-imports the tracks into the iTunes db. Its got quite a few more featuers as well.

However, one thing i was a bit 'meh' about was getting home after a stressful day at work and fiddling around on my iPhone to get it to play music. As it had a internal mic i thought i might be able to work something out.

I then settled on working on being able to play/pause via a clap (i have done voice recoginition programs a long time ago but found them to be fucking frustating when they pick up your voice during conversations). I found a nice and simple freeware program (here) that detected clapping and would run your selected program/action/whatnot.

After a short fiddle around with that awesome program autohotkey, i had 2 .exe files to control iTunes - one for play/pause, one for next song.

All it took was to set up the clap program to run the .exe's upon clap detection and presto! I did rip the microphone and super-glue it facing outward on the exterior of the laptop shell (this compaq is literally falling apart, so it wasnt really a issue)
Now i can walk into the lounge and clap once to start playing music immediately.