Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preload presets in fluid_player before playback (if using dynamic sample loading) #371

Closed
wants to merge 2 commits into from

Conversation

mawe42
Copy link
Member

@mawe42 mawe42 commented Apr 23, 2018

As discussed in the mail thread, the idea behind this pull request is too much of a hack and most likely not even needed. Will be closed in a few days*

This PR implements the preset sample preload function discussed in
http://lists.gnu.org/archive/html/fluid-dev/2018-04/msg00000.html

Preloading is always active on the MIDI player if dynamic sample loading is enabled.

This feature is best tested with a MIDI file containing lots of program changes and a fairly large SF3 Soundfont like the FluidR3_GM.sf3 from MuseScore, as uncompressing the Vorbis samples takes quite a wihle, even on fast computers.

Here is an example MIDI file that cycles through 10 presets in quick succession: progchange-fast.zip

It should output a steady stream of notes. Without preloading, the playback is interrupted quite often.

This change modifies the fluid_player to scan through each MIDI file
and preload all used presets in the file before starting playback.
@jjceresa
Copy link
Collaborator

As discussed in the mail thread, the idea behind this pull request is too much of a hack and most likely not even needed.

Despite the fact that "sample preload idea" is too much specific to the need of each application it is an interesting idea that could be applied also in application for live performance "preset preloading" as the program changes needed for each song (among others things) could be prepared and saved in MIDI files.

I just wanted to thanks for the works done and the useful examples given by this PR.

@mawe42
Copy link
Member Author

mawe42 commented Apr 28, 2018

it is an interesting idea that could be applied also in application forlive performance "preset preloading"

Well, I guess we could implement the preloading, but only as API and Fluidsynth shell functions. Leave out the hackish MIDI scanning. And then again... nobody has expressed an interest in that feature yet. Probably better to wait until someone really needs it.

@jjceresa
Copy link
Collaborator

Leave out the hackish MIDI scanning. And then again... nobody has expressed an interest in that feature yet. Probably better to wait until someone really needs it.

I understand this. As an example i don't usually use internal fluidsynth sequencing and MIDI file because i use MidiShare library for theses jobs. I really think that preloading should be an application functionality. However dynamic samples loading is a fluidsynth nice feature. Good job.

@mawe42
Copy link
Member Author

mawe42 commented Apr 30, 2018

I really think that preloading should be an application functionality.

Yes, but for an application to be able to control preloading, we would need an interface for it.

Anyway, I'm closing this now as announced. I'll keep the branch locally, just in case someone comes up with a need for it.

@mawe42 mawe42 closed this Apr 30, 2018
@mawe42 mawe42 deleted the preload-presets branch April 30, 2018 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants