Original python version of the java piano