[linux-audio-dev] audio routing in a multi-timbral instrument

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] audio routing in a multi-timbral instrument
From: Paul Kellett (paul.kellett_AT_maxim.abel.co.uk)
Date: Sat Jul 22 2000 - 17:39:10 EEST


Some thoughts on how I think a sampler should be wired up (but still
applies if the sampler grows into a whole 'audio enviroment' with
several sound generation methods).

________

The simplest way is to have one big keymapping table:

  |--K
  |--K
  |--K
  |--K
  |--K
  |--K
  |
  |--FX
  |--FX

Where K is one keymap entry and FX is a global effect. Everything feeds into
the output and FX busses (imagine the vertical line is several busses).

All incoming notes are checked against each K for a matching MIDI channel,
key range and velocity range. If a match is found, a voice is initialised
with that K's settings and starts playing. The voice output is mixed onto the
busses (the level for each bus is in the K settings). When all voices have
been mixed onto the busses, the FX busses are processed by the effects and
their output is mixed onto the output busses (and maybe onto other FX
busses).

This structure is good enough for many hardware synths and samplers. (a patch
might consist of several K's, so these are grouped together in the editor for
convenience, but to the engine they are all the same).

So what are the problems with this structure?
 - as all voices are mixed straight onto the output bus, you can't apply
insert effects. To get the same result you have to turn the output level down
and use a pre-fade FX send to process though one of the global effects.

 - many K may have the same output and FX bus levels, so it would be more
efficient to mix them together first than to add each voice to each bus
individually.

________

So the next stage is to pre-mix all voices with the same routing settings 'R'
before adding them to the output and FX busses:

  |--R--|--K
  | |--K
  |
  |--R--|--K
  | |--K
  | |--K
  |
  |--FX
  |--FX

This solves both the problems above, as one or more plug-in effects can be
applied at each R before the signal is mixed onto the busses.

It also makes sense to use the same structure for control data - each R could
be set to only let a particular MIDI channel through to it's K's.

________

The next step is to allow routers (R) to be placed anywhere. This allows the
structure to be more logical, and more like you would want things to appear
in an editor:

  |--R--|--K (kick)
  | |--K (snare)
  | |
  | |--R--|--K (closed hat)
  | |--K (pedal hat)
  | |--K (open hat)
  |
  |--R--|--K (bass)
  |
  |--R--|--R--|--K (piano C2)
  | | |--K (piano C3)
  | | |--K (piano C4)
  | |
  | |--R--|--K (strings C2)
  | |--K (strings C3)
  | |--K (strings C4)
  |--FX
  |--FX

Now if the top branch is a drum kit, the hats have their own router so can
have a different FX send level to the kick and snare. If maximum polyphony
is set at each R, the 3 hat samples can be made mutually exclusive.

Further down, multisampled piano and strings are overlayed - but they can
have their own routing settings and plug-in effects as well as overall
ones.

I can imagine more extensions to the above (FX allowed to be placed
anywhere, plug-in effects on individual voices, more plug-ins before each
hardware output) but it's already more complex than most users need!

Paul.

-- 
paul.kellett_AT_maxim.abel.co.uk
http://www.abel.co.uk/~maxim/


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Jul 22 2000 - 18:14:48 EEST