implemented method for midi or pdf only, to fix: midi only
same as previous commit