-
Can fluid load a soundfont from a binary array? Same with a MIDI file. It would help fix #1356. Like this: rmid_loader_t* rmid;
unsigned char* sfont_binary;
unsigned char* midi_binary;
// extract things from rmid
rmid = load_rmid("test.rmi");
sfont_binary = rmid->get_sfont();
midi_binary = rmid->get_midi();
fluid_settings_t* settings;
fluid_synth_t* synth;
fluid_player_t* player;
// init
settings = new_fluid_settings();
synth = new_fluid_synth(settings);
player = new_fluid_player(synth);
// load the sfont
fluid_synth_sfload_bitstream(synth, sfont_binary, rmid->sfont_len);
// play the midi
fluid_player_add_bitstream(player, midi_binary, rmid->midi_len);
fluid_player_play(player); |
Beta Was this translation helpful? Give feedback.
Answered by
derselbst
Aug 11, 2024
Replies: 1 comment 1 reply
-
MIDI file yes: https://www.fluidsynth.org/api/MIDIPlayerMem.html SF sort of: https://www.fluidsynth.org/api/fluidsynth_sfload_mem_8c-example.html |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
spessasus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MIDI file yes: https://www.fluidsynth.org/api/MIDIPlayerMem.html
SF sort of: https://www.fluidsynth.org/api/fluidsynth_sfload_mem_8c-example.html