Re: Fluidsynth: map each channel to individual jack audio output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 26, 2016 at 09:49:43AM +0200, Lorenzo Sutton wrote:
> As I also wrote on the Fluidsynth dev list I'm essentially after two 
> possible use cases:
> 1. Record different instruments from a "general midi" soundfont (on 
> different midi channels) independently e.g. in Ardour on a track per 
> instrument.
> 2. Record drums from a drum soundfont independently to their own track 
> in the DAW (Ardour). In that case I would be sequencing each drum on its 
> own (MIDI) channel.
> 
> I'm not sure if / how -L might help on 2. as there still doesn't seem to 
> be a way to route a (midi) channel to an audio output.

The follow example shows a possible preset. For simplicity, I use only
a drum kit but you can select multiple drum kits and/or other samples
(also from different soundfonts).

The drum kits in FluidR3_GM.sf2 are:

sh> echo -e "load /usr/share/sounds/sf2/FluidR3_GM.sf2\ninst 1" \
    | fluidsynth 2>/dev/null | grep 128-
128-000 Standard
128-001 Standard 1
[...]
128-042 Brush 2
128-048 Orchestra Kit

The format of a line is "bank-prog name".

For example, with 10 stereo outputs (kick, snare, 3toms+floor, crash,
ride, closed and open hihat), you can create a simple config file:

sh> cat my.cfg
load /usr/share/sounds/sf2/FluidR3_GM.sf2
select 0 1 128 0
select 1 1 128 0
select 2 1 128 0
select 3 1 128 0
select 4 1 128 0
select 5 1 128 0
select 6 1 128 0
select 7 1 128 0
select 8 1 128 0
select 9 1 128 0


where the syntax of "select" (from "help event") is:

    select chan sfont bank prog

Start fluidsynth with:

fluidsynth -a jack -L 10 -f my.cfg

Now the standard kit is used for the ten stereo outputs
and you can play, for example, the follow samples:

|--------------+--------+---------------|
| midi channel | sample | jack output   |
|--------------+--------+---------------|
|            1 | kick   | l_00 and r_00 |
|            2 | snare  | l_01 and r_01 |
|            3 | hhc    | l_02 and r_02 |
|            4 | hho    | l_03 and r_03 |
|            5 | floor  | l_04 and r_04 |
|            6 | toml   | l_05 and r_05 |
|            7 | tomm   | l_06 and r_06 |
|            8 | tomh   | l_07 and r_07 |
|            9 | crash  | l_08 and r_08 |
|           10 | ride   | l_09 and r_09 |
|--------------+--------+---------------|
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux