First working version, before "cell-oriented" API for midi clip