First working version with chunk midi event extraction