function init()
{
    this.rotationX= 0;
    this.rotationY= 0;
}


function update(dt)
{
}

function render()
{
    gl.Rotate(this.rotationX,1,0,0);
    gl.Rotate(this.rotationY,0,1,0);
    gl.Scale(2,2,2);
    gl.Color(1,1,1);
	gl.CubeSimple();
}

function midiNote(note)
{
    if (note.msg.length == 3)
    {
        if (note.msg[1] == 9)
        {
            this.rotationX = note.msg[2]/128 * 180;
        }
        if (note.msg[1] == 5)
        {
            this.rotationY = note.msg[2]/128 * 180;
        }
    }
}
