ClassicalCode

I make music and write software

Tag: php

Twitter Bot: UkeChord

Edit (May 18, 2012): This bot is now defunct.

I would like to introduce you all to my new creation UkeChord. UkeChord is an automated Twitter robot who will send you ukulele fingerings for any chord you request. Please share your thoughts or improvements in the comments below.

Goal: To offer Ukulele chord fingerings via text message.

Preparation:

  1. Follow Twitter user “ukechord
  2. Configure Twitter to forward direct messages to your phone.

Getting a chord fingering:

  1. Text Twitter (40404) with: “@ukechord” followed by the chord name.
  2. Receive chord fingering.

Below are the chord names it understands. C can be replaced by any note sharp (#) or flat (b):

Chord Notes
C (Root, major 3rd, perfect 5th)
C7 (Root, major 3rd, perfect 5th, minor 7th)
CM7 (Cmaj7) (Root, major 3rd, perfect 5th, major 7th)
C6 (Root, major 3rd, perfect 5th, major 6th)
C9 ([Root], major 3rd, perfect 5th, minor 7th, major 9th)
Cm (Root, minor 3rd, perfect 5th)
Cm7 (Root, minor 3rd, perfect 5th, minor 7th)
Cm6 (Root, minor 3rd, perfect 5th, major 6th)
Cm9 ([Root], minor 3rd, perfect 5th, minor 7th, major 9th)
Cdim (Root, minor 3rd, diminished 5th, diminished 7th)
C5 (Root, perfect 5th)
Csus4 (Root, perfect 4th, perfect 5th)
C7sus4 (Root, perfect 4th, minor 7th)
Caug (C+5) (Root, minor 3rd, augmented 5th)
C7aug (C7+5) (Root, minor 3rd, augmented 5th, diminished 7th)

It may be able to figure out other chords, but it is guaranteed to understand these.

Refresh Cannon Returns

My simple Refresh Cannon game got picked up by several high traffic websites. Unfortunately the large volume of traffic brought my simple server to it’s knees, so I had to take the link to the image down. Now that the bulk of the traffic seems to have passed, I am reposting the link. You can find it at the original post.

Refresh Cannon

EDIT: Due to an excess of traffic, I have had to take Refresh Cannon off of this page. Please try again later. I am so sorry folks. Feel free to subscribe to the RSS feed. I will post it again when things cool down.

And… were back.

Inspired by the popularity of Refresh Hero, I am continuing in my exploration of the limits of avatar images. Of course the main challenge is developing ways for the user to have meaningful interaction with only their refresh button. The previous game used the element of time in binary fashion: either you got it right, or not. This new game uses time to allow you to adjust two different variables.

Avatar Cannon is the basic trajectory game of angle and velocity. The amount of time you wait before refreshing allows you to adjust these variable and attempt to hit the target. Each time you hit the target a new terrain is generated. The avatar also displays your standing against all other users. A full live high score list is also available.

Finally, if you would prefer to have your score listed next to your nick name, instead of your IP address, you can register here.

If you plan to play, you will get a better response time if you open the image in it’s own window.

Refresh Hero Avatar Game

For a while now I have been interested in trying to create games that can be played in avatar images. People generally think of images as either static or animated, and I enjoy opening peoples eyes to the fact that images can be dynamically generated based on your interactions with it.

Refresh Hero is a play on Guitar Hero. You are asked to refresh the image after a specific number of seconds. The more accurate your timing, the more points you collect. If you miss the time mark wildly, you lose all your point. However, if you need to take a break, gaps longer than 20 seconds between refreshes will be interpreted as pausing the game. Hitting more than one in a row builds your chain, and you can collect chain bonuses for large chains.

To add to the fun, a high score leader-board is displayed at the bottom of the image so you can see your competition. If  you want your name to be displayed on the leader-board instead of your ip address, you can simply enter your name (or nick) at the registration page.

So go ahead, refresh the page and clime the high score list!

Edit: I have added a top 50 high score list.

If you plan to play, you will get a better response time if you open the image in it’s own window.

FMyLife.com + SadTrombone.com Mashup

EDIT (May 18, 2012): FML has changed their API to require a key, I have written them asking for such a key.

After experiencing the joy of following every FMyLife.com entry with a trip to SadTrombone.com I decided to throw together a mash up.

Sad Trombone My Life serves up endless doses of schadenfreude with comedy brass chasers.

Enjoy: Sad Trombone My Life

Play the card game “War” in my avatar

Since my previous avatar DDOSed my router, today I wrote a less popular avatar game. The only game I could think of that has no need for actual user input was the card game war. So I implemented it in my avatar. You can play too, by simply refreshing this image:

Features:

  • Proper handeling of running out of cards during a “war”
  • War cards are show (with appropriate cards face up or down)
  • Independent games for each ip address playing
  • Deck state stored in database between refreshes
  • Special WIN/LOSE screens

You may want to try opening the image in it’s own window.