|Subject:||[fluid-dev] How to change the instrument:channel assignment when playing a MIDI file|
|Date:||Tue, 9 Jul 2013 19:05:46 -0700|
Fluidsynth newbie here. But thanks to some help from the wonderful folks in this group (especially GrahamG), and thanks to the excellent software design, I’ve been able to programmatically create mp3’s.
I’m stuck on what is probably a trivial task, but I haven’t found the solution. I can play a midi file using a standard Soundfont from the command line, as follows:
“fluidsynth fluidr3_gm2-2.sf2 mymidi.mid”
But this uses the default channel:instrument assignments, which for this particular soundfont is “Yamaha Grand Piano” for all channels except the drum channel 9. I am trying to figure out how to programmatically change the instrument assignment.
I created a simple configuration file, as follows:
prog 0 10”
This assigns the “Music Box” instrument to channel 0. If I execute the following command: “fluidsynth –f fluidconfig.txt”, I can see that channel 0 is in fact changed (by using the “channels” command.
But if I try to BOTH change the instrument assignment AND play the midi file from the command line, i.e. “fluidsynth –f fluidconfig.txt mymidi.mid”, the midi file plays but the instrument assignment doesn’t occur, it still uses the default Yamaha Piano for channel 0.
Is there a way to do both?
|[Prev in Thread]||Current Thread||[Next in Thread]|