Hello, Gentle ping ... anyone?
I've search for days, and can't find, any where on the web, a single example on how to change the instrument of a midi channel using the fluidsynth 'low level' api's. Many thanks, David ;; -- > Hello, > > this is a newbie quiz > I am totally new to fluidsynth, soundfonts and midi > > I am writing a fluidsynth bindings for the guile scheme language, > currently have low level bindings to the types, settings, audio and > synth API's. > > I can load a sf2, create a synth and play a note, using the following > calls, fwiw [1]. > > But I fail to understand what series of api calls I should place to > change a midi channel instrument. I tried this: > > (fluid_synth_program_select_by_sfont_name $7 0 "Celesta" 0 0) > > but I get this error message: > > fluidsynth: error: There is no preset with bank number 0 and > preset number 0 in SoundFont Celesta $18 = -1 > > However, if I call fluid_synth_get_program, passing the appropriate > args, then access the sfont_id, bank_num and preset_num, I get > > 1, 0, 0 > > Can someone kindly paste the exact series of low level api calls I > should place to change a midi channel instrument, given that I load > the FluidR3_GM.sf2 file. > > Many thanks, > David > > ;; below, a guile scheme read eval print lop mini session > > ;; procedure calls result are 'associated' to a $xx id, which can be > ;; re-used in succeeding cals ..., so for example, the synth instance > is ;; in this case in the $7 variable > > > scheme@(guile-user)> (new_fluid_settings) > $6 = #<pointer 0x55a06b63f9b0> > > scheme@(guile-user)> (new_fluid_synth $6) > $7 = #<pointer 0x55a06b6679b0> > > scheme@(guile-user)> (fluid_synth_sfload $7 > "/usr/share/sounds/sf2/FluidR3_GM.sf2" 1) > $8 = 1 > > scheme@(guile-user)> (new_fluid_audio_driver $6 $7) > $9 = #<pointer 0x55a06b905010> > scheme@(guile-user)> fluidsynth: warning: Failed to set > thread to high priority > > scheme@(guile-user)> (fluid_synth_noteon $7 0 60 100) > $10 = 0
pgpkQAzvFipdy.pgp
Description: OpenPGP digital signature
_______________________________________________ fluid-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fluid-dev
