Version 1.3
Composing music for small ensembles

Last updated: march 2012


Composing music isn't easy. This program BigBand is meant to help as much as possible. The major features are as follows:

Getting started

If you are working from the command line and the executable is in your path, then type:
$ bigband
Then enter some notes in window score: instruments and click the play button at the bottom. Now you can listen to your first composition. If a Jack deamon is running, then this will care for the sound, else the ALSA mixer will be used.

If you want to add drums, then click inside the score: percussion window and enter some dots. Before you can listen to the result, first one or more samples must be loaded. These are supposed to live in directory samples under the current working directory, or, in case checkbox dir: ./samples is off, in /usr/share/bigband/samples. Click the dropdown menu (default: no wave file) and make your choice.

The tabs right from the instrument and percussion panels do not contain names, because BigBand was called without project file. Via menu's, names can be assigned. These (and other settings) will be incorporated in the project file provided that the custom checkboxes have been checked. This is also valid for the patch panel. If you want to see all default names, then click the show/hide names button, to hide them, click again.

There is a demo project in the tunes directory, also available in /usr/share/bigband/tunes. In order to listen to it, click load project... from the File menu, then click the small button with downward triangle next to the dialog widget. Then a file chooser (a movable widget) will pop up, by which you can navigate to the tunes directory. The working directory is always shown in the banner of the window.

When you enter notes, they are from the instrument that is on top in the instruments panel. Each instrument has its own pan and amplitude controls, whereas its sound is dependent of its patch nr. There are about 30 built-in patches available. The first 10 are used for the 12 default instruments, the others are a default patch. A patch is controlled from panel patches. You can modify and/or rename them if you want, they can be saved in the project file. The midi ampl value is used during export to MIDI.

You can get notes displayed also on a regular staff, by enabling checkbox staff display. The black lines form the treble-clef staff, the green lines the bass-clef staff.

Percussion sounds can be controlled from the percussion panel. You can load different sample files, rename the sounds, and control the panning and the amplitude. As stated above, the pitch and the duration of a percussive sound is dependent of the vertical position of the dot. If you don't want this, place all dots on the middle-C line (right from the black triangle). If you check the alternative display checkbox, you will get a more distinctive display.

At the upper right side there is a window that becomes visible if checkbox show annotations is checked. Chord names can be entered in the 2nd part of this annotations, chords, meter, key window. These chords can be shown in the printed scores. Annotations (A, B, ...) are entered in the 1st part. Clicking is sufficient, no dialog needed. The meter and the key (which will be displayed in printed scores) can have new values further-on in the composition.

Entering, selecting and modifying notes

The operation of the mouse buttens can be in 2 different modes: for entering/modifying notes, or for selecting notes (the latter mode is active if the s key has been pressed).
Enter/modify mode (default)
  • left button: Clicking and releasing the button has the effect that 1 note unit is created. The color and the associated instrument is dependent on which one is on top in the instrument panel (we call this: the current instrument). Don't forget to enable the instrument. If the mouse button is dragged to the right, then a longer note will appear.
    If you click on an existing note, then it will be erased. Dragging to the right also works, the erasing action will stop at the end of the note.
  • middle button: The same operation, however when the button is released after dragging, a staccato note is created. This is indicated by a somewhat modified note unit at the end.
  • right button: Similar to the operation of the left button, the only difference is when an existing note is clicked: all colors will be erased (if enabled), not only the selected color.

Select mode (s key pressed)
Notes can be selected, which is indicated by a white spot inside them. The selected notes then can be copied, moved, recolored or deleted.
  • left button: With the cursor on a (multiple) note, select the current instrument component of this note unit and of the note units to the right, until white space or until a note unit is staccato.
    If the cursor is on an already selected note, then this will be unselected until its end.
    If the button is clicked on a place where there is no note, then all notes above and below will be selected. Dragging the mouse also works in this case.
  • middle button: All notes to the right side of the cursor, until the end, will be selected, provided that they are enabled. Thus if only one instrument is enabled, then only notes that belong to that instrument are selected.
  • right button: Similar to the operation of the left button, the only difference is that all enabled notes are affected.

Keyboard keys
Some keys that have been pushed ahead of a mouse click invoke a specific action.
  • i : Get info about a clicked note. The alert window will pop up, listing the note contents. If checkbox info to terminal was enabled, then the list is sent to the terminal from which BigBand was invoked.
  • s : Put note editing in 'select' mode.
  • m : Move selected notes by dragging the mouse.
  • c : Copy selected notes by dragging the mouse. The new notes are in selection mode, the original notes not.
  • k : (keep) Before releasing the mouse: no moving or copying will occur.
  • p : (place) Selected notes are copied at the location where the mouse is clicked. The copied notes now are in selection mode.
  • n : (new place) Selected notes are moved to the location where the mouse is clicked. The moved notes now are in selection mode.
  • v : Paste the notes from the copy/paste buffer (see below).
  • 1, 2, 3 : To enter triad notes. First select the kind of triad in the triad mode panel. Then press the '1' key to enter the first triad note, etcetera. Triad notes must be consecutive, else afterwards the printed score will contain errors. Entering triad notes correctly will need some practice.
  • <ctrl> : Scroll the window contents horizontally by dragging the mouse. This works more accurate then using the scrollbar.
  • <ctrl> p: Print the current patch to the terminal. This can be copy/pasted into the source code to create a new built-in patch.

The pushbuttons
You can check checkbox staff display. Then it is easier to read the notes from the screen and play them on your instrument. Flat and sharp notes are indicated with a kind of small extensions. You can enter (or remove) sharp or flat notes by pressing the up or the down key before clicking the mouse. Moving or copying of selected notes is not supported in this mode.

Entering, selecting and modifying percussion notes

Similar to instrument notes, however the notes are single note units.

There are 2 display modes: regular and alternative. If in regular mode, then percussion notes are entered on a piano-roll background, so their pitch and duration can be altered. In alternative mode, moving or copying is not supported.

The annotations, chords, meter, key window

This window is made visible by enabling the checkbox. If you click into the upper part of this window, a letter 'A' will appear. If you click again left from this, then the 'A' will appear at this point, and the former letter will be modified to 'B', etc. These letters will appear as annotations in the printed scores, and are used by musicians to refer to certain parts of the composition.

The 2nd part of the window is for entering chords. One measure can contain 2 chords. Chord names are entered at the dialog box bottom-left, and can appear in printed scores.

The 3rd part is meant to enter the meter of the piece. You can give it a different value half-way down the piece. If you click in the window, the meter value will be set to the value of the meter slider.

The 4th part is for specifying the key, which might change later-on in the piece. This is only relevant for the printed score. If you click in the window, the key value at that point will be set to the value of the key slider.

Similar to the score windows the content of the annotations window can be shifted. Clicking with the middle mouse button will select the area at the rightside. Clicking with the right button will shift this area such that it starts at the clicked point.

The patches panel

For each instrument a patch can be choosen. There are 4 modes, dependent of the active tab. Settings are valid from the start, they cannot be modified programmatically during the course of the piece (which is a limitation for the sounding result but also a convenience).
FM synth
The sound of a patch is divided in a startup phase, a steady phase and a decay phase. The FM parameters of the startup phase are controlled by the 2-dimensional slider freq1/mod1. The FM parameters of the steady and the decay phase are controlled by freq2/mod2. The duration of the startup phase can be choosen with the startup slider, the amplitude is controlled by the attack slider. Short notes will get a shorter startup and attack time.

The frequency of the modulating wave can be detuned slightly by the detune slider. The modulating wave can be modulated itself by means of the mmod depth/freq 2-dimensional slider.

Checkbox monophonic sets the patch in monophonic mode. If checkbox short sinus is checked, then the basic waveform of the FM-modulated signal will not be a pure sinus, but a shorter waveform. This can yield interesting sounds especially for low frequencies. Checkbox short notes will turn the steady phase to nearly zero, which is good for piano-like sounds.

With the Options menu several parameters can be choosen, e.g. a suitable patch name.

GUS patch
Standard GUS (Gravis Ultra Sound) patch files are used by MIDI sound programs like Timidity. Each GUS patch contains the startup waveform of one instrument, usually for several different pitches. After the startup period a part of the waveform is looped, until the note is released. Then the amplitude is decreased gradually to zero. A similar approach is used for BigBand, reading patch files with extension .bb-patch. These can be located in directory samples under the current working directory if the choice box ./samples is checked, else in /usr/share/bigband/samples. A small program gus-patch is provided to translate GUS patch files to the .bb-pat format.

The dropdown menu (default: no gus patch) opens a list of the available patches. The checkboxes monophonic and short notes, as well as the slider decay operate the same way as for FM synthesis. If checkbox info only is on, then information about the patch is shown in an alert window, or it is written to the terminal if the according checkbox has been checked.

The window harmonics shows vertical bars, blue or red, denoting the harmonic components of the generated waveform. The red bars are used during the attack phase of a note, they can be modified with the right mouse button. The blue bars are used during the rest of the note, they are modified with the left button. The frequencies to which the harmonics are tuned are not exact, in order to get a more natural sound. The relative frequency differences are dependant on the pitch, such that lower notes are less exact then higher ones.

Similar to the FM synth, the duration of the startup phase can be choosen with the startup slider. Rise time of the amplitude is controlled by the attack slider. With the soft clip slider some nastyness can be added to the sound. Slider vibrato controls the amount of vibrato. The frequency of this effect is the same for all similar instruments, this is controlled by the vibrato frequency slider at the bottom of the window.

Normally each harmonic consists of a pure sinusoid, but this can be modified. The window excite shows black vertical bars, modifiable with the left mouse button. They denote the spectrum to which each single harmonic is expanded. Thus it is possible to create rich sound spectra. In general, if more then one line in the excite window is used, then less lines in the harmonics window can be used.

Slider triggered has the effect that the waveform will be not continuous if the slider value is non-zero. The waveform will consist of short bursts. At low pitches these bursts have constant width, at higher pitches they become shorter. This way the sound of lower-pitched reed instruments can be approximated.

Checkboxes monophonic and short notes work similar like for FM synthesis. Checkbox noisy will introduce a small random frequency modulation.

Mono synth
This is more or less a mini-Mini-Moog, containing the following building blocks:
  • 2 oscillators, vco1 (pulse) and vco2 (sawtooth).
  • 1 low-frequency oscillator, lfo, used for modulation.
  • 2 envelope generators, eg1 and eg2, used for amplitude and filter control respectively.
  • 1 output filter, 24db/octave, modes: lowpass, bandpass, highpass.

There is a small display window, showing the frequencies of vco1 and vco2, plus the cutoff frequency of the filter. This is meant to show what you are doing when trying a new sound.

Vco1 can be detuned slightly. Vco2 can be detuned also, however in big steps (factor 0.5 -> 4). The outputs of the vco's can be mixed. Vco2 can be used to modulate the filter. The lfo can be used to modulate the frequency of vco2, or the filter cutoff frequency.

The envelope generators are controlled graphically. The ADSR (attack-decay-sustain-release) curve can be modified with the mouse. The 1st point is fixed, the 2nd point can be shifted horizontally, the 3rd an 4th points can be shifted horizontally and vertically, the last point can be shifted horizontally. Notice that the actual delays are an exponential function of the depicted delays.

The ADSR window can be scrolled with the left mouse button when the <ctrl> has been pressed.

You may wonder why this synth is only mono. This has the big advantage that long decaying notes from one instrument don't interfere with each other.

The patches panel contains an Options menu, containing the following items: The Built-in patches menu can be used to get you started when creating a new patch. A choice of 12 of the first 15 items are used when the program is started without a project file.

The instruments panel

You can choose a specific patch with 2 sliders with 1 name: patch nr. The left one increases the patch number with 10 per step. The panning position and the amplitude are controlled with 2 sliders. The midi amplitude has its own slider.

The Options menu opens a list with the following items:

If custom is checked, then the instrument settings will be saved in the project file.

The percussion panel

The Options menu opens a list with the following items: The WAVE file that BigBand uses when it plays a percussion note, can be choosen via a menu (default: no wave file). If checkbox ./samples has been checked, then the .wav files in directory samples (under the working directory) will be shown. Else, directory /usr/share/bigband/samples will be listed.

If you only want to listen to the available sounds, then first check the listen checkbox.

The pan, amplitude and midi ampl sliders act as expected.

Global controls

At the top: At the bottom:

Menu File

Menu Settings

Chord hints

In a simple and effective way was proposed to match melody and suitable chords. A short description, taken from the site:
Here's the pattern in constructing the scales from the chords. Start with the chord tones in the scale. Those will obviously be the most consonant. Now add the note one whole step above each chord tone. Whenever this results in consecutive minor 2nds in the scale, lower the new note by a half step. That's it.
This has been implemented in BigBand. The idea is as follows:

You have entered a nice melody and maybe 1 or 2 other voices. Now, what are suitable chords to be played by the piano or the bass? First select the relevant voices and select the relevant notes. Then click button chord hint. A list of fitting chords will be printed. If checkbox info to terminal has not been checked then this info is displayed in an alert window, else it is sent to the terminal from which Bigband was called. The list looks like:

chords (key F):
   [1-3-5-b7]      G7    (2) scale:[1-2-3-4-5-6-b7]     "Mixolydian"
   [1-3-5-7]       FM7       scale:[1-2-3-b5-5-6-7]     "Lydian"
   [1-3-5-7]       CM7   (5) scale:[1-2-3-4-5-6-7]      "major"
   [1-b3-5-b7]     Dm7   (6) scale:[1-2-b3-4-5-6-b7]    "Dorian"
The key is that of the piece, as choosen with the menu Settings->key... The first column is an enumeration of the chord, relative to the base tone of the chord. The chord itself follows, where 'M' means major, 'm' minor, 'b' means flat, and '#' sharp. The 3rd column is its degree relative to the key. The scale column is an enumeration of the fitting scale relative to the chord. The last column is the scale name as known from basic chord theory.

What if no fitting scale can be found? Then the program searches for scales that would fit if one pitch was omitted from the selection. Then (if output to terminal) the list could look like:

chords (key F):
   [1-3-5-b7]      C7    (5) scale:[1-2-3-4-5-6-b7]     "Mixolydian"   avoid:7
   [1-3-5-b7]      G7    (2) scale:[1-2-3-4-5-6-b7]     "Mixolydian"   avoid:b3
   [1-3-5-7]       BbM7  (4) scale:[1-2-3-b5-5-6-7]     "Lydian"       avoid:b2
   [1-3-5-7]       FM7       scale:[1-2-3-b5-5-6-7]     "Lydian"       avoid:4
   [1-3-5-7]       CM7   (5) scale:[1-2-3-4-5-6-7]      "major"        avoid:b7
   [1-3-5-7]       FM7       scale:[1-2-3-4-5-6-7]      "major"        avoid:b5
As you can see, an extra avoid: column is printed. The pitches that should be avoided are again relative to the chord. If still no match was found, then the search is repeated for the case where 2 pitches were avoided. You could use the avoid-pitches on the weak beat, in order to add some tension.

The selection of chords and matching scales is built-in, and oriënted to chords that are most often used in jazz. The available items will be printed to the screen if info to terminal has been checked. At that, if keyboard key a was pressed, then all possibilities are shown, with 0, 1 or 2 avoid notes.

If key i was pressed before clicking chord hint, then all built-in chords are listed. This list also can be used if the chord progression was given beforehand and you want to investigate the suitable pitches.

The backend: ALSA, Jack or MIDI bus

Under Linux, sound is a complicated issue. For low-latency audio often Jack (the Jack Audio Connection Kit) is used, however if the Jack deamon is running, then other applications (e.g. Firefox or Timidity) usually will be silenced. This happens because there is only one hardware port per sound card.

When BigBand is started it figures out whether Jack is running. If so, then the radio button at the bottom will be in 'Jack' position, and Jack will be used for sound. If you kill the Jack deamon, and put the radio button in 'Alsa' mode, then ALSA will be used. Notice that many other programs which are using Jack will crash at the moment when the deamon is killed (because they get signal SIGPIPE). The aim was to make BigBand robust in this respect.

If Jack is not running, you could start it e.g. with:
$ jackd -r -d alsa -dhw:0 -p512 -n2 -r41100 -S &
which means: non-realtime, driver alsa, hardware port hw:0, buffer size 512 samples, 2 periods, sample rate 44100Hz, samples 16 bits.

Alternatively you can use other programs to generate sound, via the ALSA MIDI sequencer bus. Then MIDI messages can be sent via the sequencer bus to a software synthesizer (e.g. Timidity or any soft-synth), to a drum sequencer (e.g. Hydrogen) or to a MIDI soundcard. Notice that all connected programs must use the same backend: ALSA (direct or via PulseAudio) or Jack.

When the radio button is set in 'MIDI sequencer' position, then the dialog box will ask for a port number. If e.g. a Timidity daemon is running, then the appropriate port can be found by command aconnect -o. Alternatively you can make a connection with Qjackctl or Alsa-patch-bay, which have nice GUI's. In this case you do not have to respond to the dialog box, or alternatively you can specify an empty port (0:0).

The selection of tune starting-time and the enabling of instruments will act as expected. The MIDI instrument- and percussion numbers can be specified with the Options menus.

As known, MIDI signals are assigned to channels, ranging from 1 to 16 (internally coded from 0 to 15). MIDI-controlled programs often support only a limited range of MIDI channels. E.g. an organ-emulating program might listen to channels 1, 2 and 3, for the 2 manuals and the foot pedals, whereas a single-channel polyphonic synthesizer may only listen to channel 1. Normally BigBand uses MIDI channels 1 - 9, 11 - 12 for the instruments, and channel 10 for percussion. These numbers can be decreased from the Settings menu, item sequencer out: max channels. If e.g. the value 3 is choosen, then the normal channel numbers modulo 3 will be sent to the sequencer bus, however channel 10 will always be used for percussion. This is in accordance with the GM specification. Programs where you can choose the channels that they listen to make things easier. Notice that some programs number their channels starting from 0.

Some programs only listen to channel 1 (e.g. the one-voice polyphonic synthesizer amSynth). In order to get different patches while running, the radio button MIDI program change can be set to 'while running'. Then in the white area of the MIDI program changes panel you can click and subsequently enter in the dialog box a desired new MIDI program number. Notice that these program numbers range from 1 - 128, however many programs use the range from 0 upwards.

If the active button of the MIDI program changes radio button is in 'while running' mode and it is clicked a 2nd time, then no program change events will be sent. In this case patches should be choosen manually in the output program.

If more then one program has to be controlled via the sequencer bus, then more output ports are needed. The number can be choosen via the Settings menu. Notice that the sequencer port number choosen with the dialog box only is valid for the first output port.

If the playing is stopped by re-clicking the play button, then a MIDI signal 'all sounds off' is sent to the sequencer bus. Not all programs can handle this signal, thus one or more notes then will stay on. Hopefully the program has a 'all notes off' button for this case.

Midi notes are sent with a 'velocity' value (from 1 to 127), to indicate the note volume. Some programs have an exponential curve (e.g. Timidity), which conforms to the GM standard. Other programs have a linear curve. BigBand expects an exponential curve.

For a quick test you can do the following (supposing that Jack and Timidity is not running):
- start a Timidity daemon (alsa out, increased output volume):
$ timidity -iAD --sequencer-ports=1 -A200,200
- start Bigband:
$ bigband
- click output -> MIDI sequencer
- click ok at the dialog box
- click play

Exporting an ABC file

The ABC format is a well-known textual representation of music scores. For info go to BigBand uses a slightly extended format, which can be read by a ABC-to-postscript translator program, e.g. abcm2ps ( A somewhat modified version of this program is included in the BigBand distribution. In order to prevent confusion it has been renamed to abbc2ps.

Only the notes for enabled instruments and percussion instruments are present in the printed scores. Each instrument gets its own staff, the percussion gets one staff (with a percussion clef). Eights notes followed by an eights rest are drawn like a quarter note with a dot above or below the note head, in order to improve readability.

If only one instrument is enabled, and all percussion instruments are disenabled, then the score is supposed to be meant for one musician, so the name of the instrument is shown clearly beside the title of the composition. Also, consecutive rest-measures will appear in the form of a thick horizontal line with a number above it. If all instruments are disenabled, and one or more percussion instruments are enabled, then the score is supposed to be meant for the drummer. Then only the measures that are different from their foregoing measure will contain notes. All other measures are empty. This yields a score that is easy readable.

The meter will depend on the nupq and meter slider values. The key is dependent on the value of the key slider. Normally the generated ABC file can be used as is, however for special whishes it could be edited before being fed to abbc2ps. An example ABC file:

T:Kitten's Dance
%%staves [sopr alt1 alt2 tenor barit tromb bass perc]
V:sopr nm="soprano sax" snm="sopr" clef=treble
V:alt1 nm="alto sax 1" snm="alt1" clef=treble
V:alt2 nm="alto sax 2" snm="alt2" clef=treble
V:tenor nm="tenor sax" snm="tenor" clef=treble
V:barit nm="bariton sax" snm="barit" clef=treble
V:tromb nm="trombone" snm="tromb" clef=treble
V:bass nm="bass guitar" snm="bass" clef=bass
V:perc nm="drums" snm="drums" clef=perc
[K:C]z8|z1AFA cedc|A2z6|z8|z1AFA ce-ed-|dcAz1 z4|ef-fg cd-de| ....

Especially the %%staves item is interesting. If you modify it, then the order of the voices can be altered, or voices can be omitted or combined.

Program abbc2ps can take several options, option -h is for help. Also a so-called format file can be read.

Importing a MIDI file

Usually in a MIDI file the data for one instrument is mapped to its own 'track'. You will want to map a track to a certain BigBand instrument. Thus if you import a fresh MIDI file, a default mapping file will be created. Via the dialog widget you will be invited to edit this mapping file. A generated mapping file might look as follows:


# channel nr | track name | mapped instr | (transpose)
# midi perc nr | perc name | mapped perc instr

1   "Alto Sax"           0
2   "Tenor Sax"          0
3   "Baritone Sax"       0
6   "Trumpet"            0
7   "Trombone"           0
8   "Electric Guitar (jazz)" 0
9   "Acoustic Grand Piano" 0
11  "Acoustic Bass"      0
42    "Closed Hi Hat"      1
40    "Electric Snare"     2
38    "Acoustic Snare"     2
57    "Crash Cymbal 2"     1
36    "Bass Drum 1"        5
49    "Crash Cymbal 1"     1

Listed are 2 kinds of data: names of tracks, with their default mapping to BigBand instruments, and names of MIDI percussion instruments, with their default mapping to BigBand percussion instruments.

You are supposed to edit the 3rd column. Instruments range from 0 upto 11, percussion from 0 upto 7. The default mapping of percussion instruments is such that lower sounding MIDI percussion instruments are mapped to higher-numbered BigBand percussion instruments.

You can add an extra number indicating a shift (in octaves), which would be useful if the MIDI file contains frequencies outside the range as supported by BigBand. Don't alter the order or the number of lines. The line 'format=4' specifies the version of this mapping file. Files with format 3 are still supported.

The modified mapping file might look like:


# channel nr | track name | mapped instr | (transpose)
# midi perc nr | perc name | mapped perc instr

1   "Alto Sax"               1
2   "Tenor Sax"              2
3   "Baritone Sax"           3
6   "Trumpet"                5
7   "Trombone"               6
8   "Electric Guitar (jazz)" 10
9   "Acoustic Grand Piano"   7
11  "Acoustic Bass"          11
42    "Closed Hi Hat"      0
40    "Electric Snare"     2
38    "Acoustic Snare"     2
57    "Crash Cymbal 2"     6
36    "Bass Drum 1"        4
49    "Crash Cymbal 1"     6

Now click the dialog okay button, after which the imported tune will be shown.

During import of a midi file, the program tries to map start- and end times of the notes as good as possible. If needed, a note unit can be subdivided into 6 small parts. If you don't want this, an extra command norm-time can be specified after the format statement.

Companion program: Gus-patch - translating from GUS to BigBand patch

Maybe you wonder why the standard Gravis Ultra Sound patches aren't used by BigBand. The reason is that these contain much control data that's not supported, at that a dedicated format leaves the possibility to extend it in the future.

The command-line translation tool is called gus-patch. First locate the directory where the patch files are located. This could be /usr/share/midi/freepats/Tone_000/. If these files are not present on your system then you can get them from

First create a directory wave-files under your working dir. Then call gus-patch e.g. as follows:
$ gus-patch /usr/share/midi/freepats/Tone_000/067_Baritone_Sax.pat
Now the contents of the control part of the patch file will be listed to the screen, and also the provided wave forms are written as WAVE files to directory wave-files. You can listen to them e.g. with playing program, or investigate them e.g. with Mhwaveedit.

Now look at the information written to the terminal. Especially the item root freq is important. These root frequencies should spread across the pitch range of the instrument that is emulated. If everything is okay and gus-patch doesn't complain, then a .bb-pat file can be created, e.g.:
$ gus-patch /usr/share/midi/freepats/Tone_000/067_Baritone_Sax.pat \

The number 68 denotes the GM (General Midi) instrument number for this instrument. You can move (as root) the .bb-pat file to /usr/share/bigband/samples/, where Bigband is expecting them.

If you want to use only a selection of the available root frequencies, then use option -sel, e.g. as follows:
$ gus-patch /usr/share/midi/freepats/Tone_000/067_Baritone_Sax.pat \
  -o -sel 0

In this case a patch for a rough sounding bariton sax will be created. The parameter of -sel can be a comma-separated list of numbers.

Companion program: Wav2patch - from WAVE file to BigBand patch

A 44100 Hz, mono WAVE file can be translated into a BigBand patch file. The sound data inside the input file is split into overlapping chunks, and e fast Fourier transform (FFT) is applied to each of them. This is to get an impression of the harmonic spectrum of the sound, and also to derive the fundamental frequency. The result is displayed in the upper window, with small triangles indicating the calculated frequency peaks.

Beneath the spectrum window 1 or 2 sliders (depending on the size of the input file) are present for choosing an audio chunk. Its content is displayed in the lower window titled fft window. Going to the next or the previous chunk also can be done by clicking the left or right mouse button inside the spectrum window. The middle window depicts the complete wave. Here you can select the start of an audio chunk using the left mouse button. The position of the slider(s) is sync'ed with this starting point.

At the bottom there is a play/stop button, decorated with a triangle. If you click it, the sound will be starting at the choosen audio chunk.

For the creation of a patch 3 timing marks are needed, which can be choosen with the mouse inside the lowest window. The left button sets the start of the patch. The middle and the right buttons set the begin and the end of the sound loop. Two loop modes are available: normal (usable for sounds with a stable spectrum) and pingpong (good for noisy signals and longer loops). Fine-tuning of the end of the loop is done with the 2 small buttons labled shift end-line. The sound of the patch can be heard after the choice box play has been set to 'looped patch'.

Slider freq mult is for listening to the patch at different scanning speeds, in order to get an impression of the sound as it will be used later. The basefreq div slider serves a different purpose: sometimes the base frequency is calculated wrong, which might occur if the 2nd or 3rd harmonic is much stronger then the fundamental.

The patch will be written to a file after the write patch... button has been clicked and a file name has been entered in the dialog box. Notice that the base frequency that is written to the file is equal to the value that is shown in the info window, so it may be relevant which sample is visible in the fft window.

The report spectrum button is for writing the frequency and the amplitude of the spectrum peaks to the terminal. There is also an info and a loop info window, displaying values that you might be interested in.

Wav2patch uses Jack for sound if the Jack daemon (jackd) is running, else Alsa will be used. The program can be called from the command line:
$ wav2patch [options] <wave-file>
The options:

-win n FFT window = n samples. Values between 512 and 8192, default: 2048. If the given value is not a power of 2, then internally it will be rounded to the next-higher power of 2.
Small values yield better timing accuracy, bigger values yield better low-frequency accuracy.
-th n Threshold for spectrum peaks, default: 0.2 (the red dotted line in the spectrum window).
-h Print usage info and exit.

In directory src/samples one WAVE file sax-g3.wav is present to try out this program. Good starting values: -win option: 1024, loop 554, 2286, 2371 (patch-start, loop-start, loop-end: see the info window).

An interesting site to collect samples:

Tips and tricks