[PD] R: emulating the behaviour of a midi keyboard: trouble with repeated notes