added midi mechanism