Bug 492702

Summary: Play MIDI files on information panel
Product: [Applications] dolphin Reporter: gabriel.cannabrava
Component: panels: informationAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: gabriel.cannabrava, kfm-devel
Priority: NOR    
Version: 24.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example MIDI file

Description gabriel.cannabrava 2024-09-06 03:12:22 UTC
Created attachment 173375 [details]
Example MIDI file

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I want to play MIDI files on the Dolphin information side panel, like how you can do with .mp3 .wav .ogg and other music files, but nothing plays. Running from the terminal gives this:

[00007ad3a0011970] smf demux: Track name: Ravel Rigaudon
[00007ad3a0011970] smf demux: Track name: Piano R.H.
[00007ad3a0011970] smf demux: Track name: Piano L.H.
ALSA lib pcm_dsnoop.c:567:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:404:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:404:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_a52.c:1036:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:481:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:481:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
[00007ad3a0010140] fluidsynth decoder error: sound font file required for synthesis
[00007ad3a0010140] main decoder error: MIDI synthesis not set up
[00007ad3a0010140] main decoder error: A sound font file (.SF2) is required for MIDI synthesis.
Please install a sound font and configure it from the VLC preferences (Input / Codecs > Audio codecs > FluidSynth).

[00007ad3a0010140] main decoder error: Codec `MIDI' (MIDI Audio) is not supported.
[00007ad3a0010140] main decoder error: Codec not supported
[00007ad3a0010140] main decoder error: VLC could not decode the format "MIDI" (MIDI Audio)
[00007ad3a0011970] smf demux: Track name: Ravel Rigaudon
[00007ad3a0011970] smf demux: Track name: Piano R.H.
[00007ad3a0011970] smf demux: Track name: Piano L.H.

It seems to need a path to a soundfont file (which I have set up in VLC, but I guess the settings don't transfer over to Dolphin for some reason)
It should either:
-Detect the soundfont setting from the system installed VLC settings, or
-There should be a setting in Dolphin to change the soundfont path, which then gets passed to VLC when it's invoked by Dolphin, and/or
-Have a soundfont bundled with Dolphin/KDE that Dolphin will use to play files. This will give really nice out-of-the-box functionality, and depending on the soundfont wouldn't need to take much space at all since these kinds of things were designed to play music back in the 80's, and they can be very small. Perhaps we could use this: https://github.com/arbruijn/TimGM6mb/blob/master/TimGM6mb.sf2 (it was previously used by MuseScore) 

STEPS TO REPRODUCE
1. Select a MIDI file with the Information panel open
2. Try to play it on the information panel

OBSERVED RESULT
No audio

EXPECTED RESULT
The music to play

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Arch rolling
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION