Scripting - Improved waitBeat function

It would be great if this function could also take into account tempo changes when host is in playback. So it would wait specified number of beats even if the host tempo changes during that time. Maybe sync to host ppq. It would make scripting tempo synced arpeggios much easier.