NodeJS midi generation algorithm experiment