Two way mapping of midi to a grid with state stacking.