Prototype python solution - sold my Roland TR-6S, so left the code here in case anyone wants to pick it up