Playing with Android Inventor: A very simple drum pad

I mentioned before that I’ve been playing with Android inventor now that it’s on MIT’s servers. The first thing I tried to do with it was to make something vaguely musical. Well, ok, not that musical to be honest. I thought I’d try and do something like a little drum pad to start with.

It works, sort of, but it really isn’t too useful sadly, as the drum sound only triggers when you take your finger off the button and not when you press it. So I really need a new way of getting that to work.

Processing day 2: A little dot is going to follow you around the screen

[processing width=”480″ height=”120″ file=”http://www.ashleyelsdon.com/wp-content/uploads/2012/03/spot_follows_mouse_movement.jar” method=”inline”]Load the applet[/processing]

All this applet does is follow the mouse around with a tiny spot. That’s all, but it’s day 2 of my look at processing and tracking the mouse. Here’s the code for it.

void setup() {
size(480, 120);
fill(0, 102);
smooth();
noStroke();
}

void draw() {
background(204);
ellipse(mouseX, mouseY, 9, 9);
}