Menu

Bank Files

Geek Funk Labs

Bank files store sets of patches. Patches contain a large variety of settings that are sent to Fluidsynth when the patch is selected. This includes soundfont, bank, and program settings for each MIDI channel, control change (CC) messages, MIDI Sysex messages or files, FluidSynth settings, and FluidSynth midi router commands. Bank files are stored in an extended YAML format, with some special stylings added for readability.

Structure

The structure of bank files is described below. The example bank file in the repository is also useful and has comments.

  • patches:
  • Patch Name
    • instrument settings for any number of MIDI channels*, given as <channel #>: <soundfont file>:<bank>:<preset>
    • cc: followed by a list of control change messages to send when the patch is selected, specified as <MIDI channel>/<CC number>=<value>
    • sysex: followed by a list of sysex messages.
    • router_rules: - a list of router rules that are set when the patch is selected, after the bank router rules
  • 2nd Patch Name
    • channel specifications, CC messages, router rules, etc.
  • ...
  • router_rules: - list of router rules to apply to all patches, before individual patch rules are set
  • fluidsettings: - a list of FluidSynth Settings that are passed when the bank is loaded, specified as [name]: <value> pairs

Router Rules

A router rule is a mapping of [key]: [value] pairs that describe how MIDI messages should be routed to FluidSynth. The keys can be any of the following:
- type - The type of message to route. The value can be note, cc, prog, pbend, kpress, or cpress.
- par1 or par2 - Parameter 1 and 2 of the rule. The value takes the form <min>-<max>*<mul>+<add>. Message parameters in the range min to max are multiplied by mul, then add is added (- instead of + subtracts). Scientific note names, such as C#4 or Eb7 are also understood.
- chan - Which channels* to route the messages from/to. The value can take the same form as for par1 and par2, but can also have the form <from_min>-<from_max>><to_min>-<to_max>, in which case messages from each channel in the range from_min to from_max will be routed to every channel in the range to_min to to_max.

Sysex Messages

A sysex message is a list where the first element is the port name to send the message to. The remaining elements are either a list of SYSEX bytes to send (as decimal or hex), or the name of a SYSEX file to dump to the specified port.

MIDI channel numbers

MIDI channel numbers in bank files are numbered starting with channel 1, the way they are on virtually all synthesizers, controllers, DAWs, etc. This is in contrast to FluidSynth, which numbers channels beginning with 0. Patcher handles all of the translation between channel numbering schemes.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.