H filtering and exporting to midi file