audacious-media-player / audacious

A lightweight and versatile audio player
https://audacious-media-player.org
Other
865 stars 115 forks source link

Playing MIDI files with FM. #833

Closed Audacious-Bot closed 6 months ago

Audacious-Bot commented 6 months ago

Author Name: Carlo Bramini Original Redmine Issue: https://redmine.audacious-media-player.org/issues/696 Original Date: 2017-01-21


I'm wondering if it would be possible to play MIDI files also with FM OPL2/3 like waveforms in addition of using SoundFonts. Perhaps it would be also useful as safe mode, if the user tries to play such files without configuring an SF2 bank into amidi plugin, because in this condition the player does not emit any sound. Thank you very much.

Sincerely.

Audacious-Bot commented 6 months ago

Original Redmine Comment Author Name: Michael Schwendt Original Date: 2017-01-23T23:00:08Z


Making this a topic in the discussion forum would have been a better idea.

Anyway, hardly anyone still has OPL3 (or OPL2 or AdLib) audio hardware installed, and when you refer to "waveforms" it seem you've got emulation in mind. Native support for the OPL3/OPL2/AdLib chips would not be worthwhile, IMO. Emulation engines do exist, but one would need to use/create something that also emulates the MIDI instruments.

The amidi plugin uses FluidSynth as a backend library. You could fetch some of the OPL3 emulation soundfont banks.

Audacious-Bot commented 6 months ago

Original Redmine Comment Author Name: Carlo Bramini Original Date: 2017-01-25T20:11:37Z


Well, this is not needed. Everything we need already exists. The good plugin is Adplug-XMMS, already included in Audacious. Adplug is already able to play MIDI file with an FM software synthesizer. Here, you can enable it by adding the various MIDI file name extensions to this plugin so that it could be selected as possible candidate, after you disabled the amidi plugin in the configuration dialogbox. But a complete fix needs a little more code, in my opinion an alternate solution could be to build Adplug as an external dynamic linking library that it could be called by Adplug-XMMS plugin (so no code changes here) and to be used also by Amidi plugin: if no SF2 banks are selected, it will play the MIDI through Adplug, otherwise let's use Fluidsynth. The biggest change seems to be in the build system rather than in the source code.

Audacious-Bot commented 6 months ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2017-01-29T19:26:13Z


No. The adplug code is extremely poor quality, has a history of potential security issues, and does not see regular releases. I do not want to enable it for any formats that are already supported by a different plugin. In addition, it simply does not work for many MIDI files since it reads only the first "MTrk" section.