copyparty icon indicating copy to clipboard operation
copyparty copied to clipboard

Add support for a MIDI synthesizer

Open Vortron-rd opened this issue 1 year ago • 3 comments

Problem I'm having I have a bunch of MIDI files I'd like to play and it is semi-annoying to have to download them and then open VLC to play them.

Describe the idea / solution you'd like I'd like to have support for a MIDI synthesizer that allows the client to specify a custom soundfont file as well as allow the server-owner to set a default.

Describe any alternatives you've considered Auto trans-code any MIDI to OPUS or MP3 server-side and send that back to the client. (This would be a bad idea, because --as far as I know-- MIDI has to be recorded back in real-time i.e a 1-hour MIDI would take 1 hour to trans-code.)

Vortron-rd avatar Aug 23 '25 23:08 Vortron-rd

before I say anything else -- I'm not sure if/when this will happen! Just airing ideas;

Auto trans-code any MIDI to OPUS or MP3 server-side and send that back to the client. (This would be a bad idea, because --as far as I know-- MIDI has to be recorded back in real-time i.e a 1-hour MIDI would take 1 hour to trans-code.)

the good news is that MIDIs can be rendered much faster than realtime, so this is exactly the approach I had in mind :>

it seems that fluidsynth is available in the Alpine repos, so this is doable -- it would temporarily convert the midi to a wav, and then from wav to the selected transcoding format.

However, regarding soundfont selection, my idea was that the serverconfig would choose one exact soundfont which would be used for all conversions. Would it be very important to be able to change the soundfont, and, if so, how do you imagine this would work? Should there be a folder with soundfonts on the server, and there would be a dropdown in the UI to choose one of the predefined ones?

9001 avatar Aug 23 '25 23:08 9001

However, regarding soundfont selection, my idea was that the serverconfig would choose one exact soundfont which would be used for all conversions. Would it be very important to be able to change the soundfont, and, if so, how do you imagine this would work? Should there be a folder with soundfonts on the server, and there would be a dropdown in the UI to choose one of the predefined ones?

First of all, I'm sorry for the late reply. I had imagined that it would be prudent to allow users to select their sound font per file, share and/or directory. This is because some midi files sound completely different with other sound fonts and users might have in mind which ones that they think go well with certain files. I think just having a default file for each share would work, but you could also make it so the server tries to get SONGNAME.mp3.sf2 for each file before defaulting to the serverconfig. To make it easier to see what I mean, I have attached two files, one that was recorded with the GM windows midi (which at the time wasn't in .sf2 but nowadays you can get it), and another that has a custom sound font for just for it. Both are recording of the same midi file, just with different sound fonts.

WindowsGM.mp3

CustomSF.mp3

Vortron-rd avatar Aug 31 '25 06:08 Vortron-rd

I know this is an old issue, but as someone who collects a lot of MIDI and tracker music, it's nice - yet confusing - that I can play one filetype but not the other. And I very much love the tracker music support :)

my idea was that the serverconfig would choose one exact soundfont which would be used for all conversions

This seems 100% ideal and absolutely fine!

I'd very much like to see this get added, +1

milotek avatar Oct 21 '26 02:10 milotek