Joystick controlled music machine.

So I'm a noob and I've been working on this project for quite a while now, but I haven't really made that much progress. I'm making a little machine that is controlled by a joystick where when you point the joystick in different directions and a little speaker plays a tone. I've figured out how to make the tone I want play and I've looked at some website that gave me code that detected what the joystick does, but I can't seem to put those together.

Also, I don't know if this will be helpful but I have a breadboard, some wires, a small speaker, a joystick and an arduino.

One of the examples that comes with the Arduino IDE is 'toneKeyboard'. (Under Examples->02.Digital)
It reads some input and plays different tones depending on the state.

Have a look at that. It will probably give you ideas on your project.