AVFoundation misidentifies certain MIDI patch information

Originator:shikisuen
Number:rdar://47942347 Date Originated:February 10 2019
Status:OPEN Resolved:NOT RESOLVED
Product:macOS + SDK Product Version:10.14.3
Classification: Reproducible:Always
 
Summary:

	Since recent macOS versions, it is the new AVFoundation which handles the default MIDI playback in the macOS system (not the one shipped with QuickTime Player 7 anymore). However, at least in macOS High Sierra and macOS Mojave, there is an issue that when playing certain MIDI files (written for Sound Blaster) the AVFoundation may misidentify certain instrument patches as percussion patches, leading to unwanted playback result in those apps which utilize AVFoundation (AVMidiPlayer).

P.S.: This may need to be reclassified as an issue of CoreAudio, according to your investigation.

Steps to Reproduce:

	1. Prepare a MIDI playback software which utilizes AVFoundation (AVMidiPlayer) for MIDI Playback. It can be "Sequences (sold on Mac App Store)", "MinimalMidiPlayer (available on GitHub)", or the DLSMusicSynth Audio Unit in Logic Pro X.

	2. Use the application mentioned above to play these MIDI files from the Windows 95 version of Chinese Paladin (仙剑奇侠传) or its DOS version (MIDI extractable from MIDI.mkf): 017/034/039/040.mid

Expected Results:

	Only the MIDI channel 10 should be played as percussion track.

Actual Results:

	Some of the other channels are playing percussion patches. Such behavior is not expected.

Version/Build:

	macOS 10.13.6 High Sierra (latest) running on a Hackintosh.
	macOS 10.14.3 (18D109) running on MacBook Pro 15-inch mid-2017.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!