No midi in this on going project of mine, but similar idea using a cheap keyboard -
EDIT - post has been updated a lot - so not a repost. Code is still in need of a tidy up before I publish it, but I can send it to anyone who wants to try it.
Current features are - arpeggio record and play back with adjustable speed, 4 waveforms and transpose
Duane B