MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Support for MIDI output

Open koshisan opened this issue 4 years ago • 2 comments

Hi!

To my understanding currently MPD has two ways of playing back midi files - both of which rely on software synthesizer implementation.

I would love to see "real" midi support implemented, where the file is parsed by MPD itself and written to an alsa sequencer device...

While in theory it should be "easier" than the implementation already in place, since nothing needs to be interpreted, I am unsure how much work would really be required to implement such a feature, since it seems that MPD itself is only meant to handle PCM...

Or is there already a workaround I just didn't find?

koshisan avatar Jul 19 '21 04:07 koshisan

This would be similar to something like MP3 pass-through for Shout/HTTP output (which has been requested for years). However, implementing this would be a lot of work, because everything inside MPD is about passing buffers of PCM data around.

MaxKellermann avatar Jul 19 '21 06:07 MaxKellermann

If it is any help - winamp has support for native MIDI playback. The support is implemented not as an output/audio renderer plugin, but as an input plugin. So the plugin basically knows which file is requested and just plays it on its own - while ignoring the rest of the pipeline. It could also deliver silent/empty PCM data back if that is required to keep the rest of the framework happy. The only problem would be commands like stop/play/pause and displaying the position. My guess is winamp has some kind of communication implemented with input plugins for this case.

koshisan avatar Jul 21 '21 03:07 koshisan