# BigBand

### Composing music for small ensembles

W.Boeke
Last updated: febr 2010

Contents:

- Intro
- Gettting started
- Entering, selecting and modifying notes
- Entering, selecting and modifying percussion notes
- The 'annotations, chords' window
- The 'patches' panel: instrument patches
- The 'instruments' panel
- The 'percussion' panel
- Global controls
- File menu
- Settings menu
- Swing feel
- Chord hints
- Exporting an ABC file
- Importing a MIDI file
- Translating from GUS patch to BigBand patch
- Translating from WAVE file to BigBand patch
- Tips and tricks

## Intro

Composing music isn't easy. BigBand is meant to help as much as possible:

- Sometimes it's convenient to enter notes on a normal 5-line staff, instead of on a piano-roll display. This happens in case of a new melody that you already can play on your instrument. At other times it is easier to have a piano-roll display, e.g. if you want to find the chords matching the melody. It should however not be a regular piano-roll showing only the piano white and black keys, as this only helps composing in the key of C. So with BigBand you can switch between piano-roll and 5-line staff, where the piano-roll display can be shifted from 1 to 11 semi-tones.

- To get realistic sound, more or less equal to a real performance of your composition, MIDI output is needed. For fast feedback however, each of the 15 voices can use one of 3 sound sources: a sound generator using samples (GUS patches), an extended FM synthesis sound source, and an organ-like additive sound source.
  The 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).

- Percussion sounds come from samples, as it is not feasable to synthesize these. The percussion notes are entered on a piano-roll staff, where their regular pitch is heard if the notes are on the middle-C staff line. Placing them on a higher line will shift the pitch accordingly and decrease the decay. This means that a single percussion sample can sound like different percussion instruments.

- Each real musical instrument is only playable within a certain frequency range. This range is shown beside the score.

- Many instruments are transposing: written notes are heard at a different pitch. This can be specified in BigBand, but there is an extra facility. You might want to play all voices on your own instrument, in order to hear whether a voice is playable and sounds natural. Thus you need 2 sets of pitch shift numbers, which is provided by BigBand.

- All instruments are depicted on one staff, using different colors, or dark grey if notes coïncede. You can click on a note (while pressing the i key) and get a list of the contributing instruments.
  Each instrument can be disenabled, it is shown in light grey then. So you can enable one or more instruments and listen to their melody and their combined sound.

- Notes are entered as colored lines, their length reflect the duration of the notes. Percussion notes are small dots, indicating the start of the percussive sound.

- On internet a great number of MIDI files is available, from classical to jazz to folksongs to rock. A MIDI file can be imported in BigBand and then be split into different instruments as wanted.

- The patch for an instrument can be tagged as monophonic. Then a warning is issued if you entered a multiphonic note accidently. Slowly decaying notes (e.g. for a guitar sound) in a rapid succession will be coupled together, so no interference of near-by pitches in this case. This coupling is done with a certain intelligence, the result will sound naturally.

- You can export your composition to human-readable scores in postscript format, one score for each instrument or in any combination.

- There is help available to find the chords with a given melody. Suitable chords are listed for the notes which have been selected.

- One composition with all its settings is saved in one file, which in the following is called the project file, normally with .bb as extension. This file is more or less human-readable and can be edited, which sometimes is convenient.

## Gettting started

Supposed 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. You can listen to your first composition.

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 menu 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 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 names button.

There is a demo project in the `tunes` directory. In order to listen to it, go to this directory. This can be done 2 ways: close BigBand, go to the directory, and type:

        bigband dance.bb

or: click menu Settings, click `working dir...`, and type `../tunes` in the dialog panel at the bottom. Then click `load project...` from the File menu, and enter `dance.bb` in the dialog panel.

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 15 patches available, a patch is controlled from panel patches. There are 15 built-in patches, reachable from the Built-in patches menu. You can modify and/or rename them if you want. 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 (beneath the black triangle). If you check the alternative display checkbox, you will get a more distinctive display.

Chord names can be entered in the lower part of the annotations, chords window. These chords can be shown in postscript scores. Annotations (A, B, ...) are entered in the upper part of this window. Clicking is sufficient, no dialog needed.

## 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 2nd mode is valid if the S key has been pressed.

Enter/modify mode
  - 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 instrument panel (at the leftside) is on top (we call this: the current instrument). Don't forget to enable the instrument. If the mouse button is dragged, then a longer note will appear.
    If you click on an existing note, then it will be erased. Dragging 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
  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 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 key: Get info about a clicked note. The alert window will appear, listing the note contents. If checkbox info to terminal has been enabled, then the list is sent to the terminal from which BigBand was invoked.
  - s key: Put note editing in 'select' mode.
  - m key: Move selected notes by dragging the mouse.
  - c key: Copy selected notes by dragging the mouse. The new notes are in selection mode, the original notes not.
  - k key: (keep) Before releasing the mouse: no moving or copying will occur.
  - p key: (paste) Selected notes are copied at the location where the mouse is clicked (so not by dragging it). The copied notes now are in selection mode.
  - n key: (new place) Selected notes are moved to the location where the mouse is clicked (so not by dragging it). The moved notes will be in selection mode.
  - keys 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 postscript score will contain errors. Entering triad notes correctly will need some practice.
  - <ctrl> key: Scroll the window contents horizontally by moving the mouse. This works more accurate then using the scrollbar.

The push buttons
  - unselect : If one or more notes have been selected, then this button has been colored rose. When clicked, all selected notes will be deselected and the button color returns to light blue.
  - delete sel : All selected notes will be removed. If only a single component (one color) is enabled, then only this component will disappear.
  - recolor sel : The selected notes will be assigned to the current instrument.
  - add to sel : The selected notes will be augmented with the current instrument.
  - chord hint : See chapter Chord hints.

You can check 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.

Two 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' window

When you click into the upper part of this window, a letter 'A' will appear. If you click again at the left of 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 postscript scores.

The lower 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 postscript scores.

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: instrument patches

For each instrument a patch can be choosen. There are 3 modes, dependent of the active tab.

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 FM f1/mod1. The FM parameters of the steady and the decay phase are controlled by FM f2/mod2. 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 MM depth/freq 2-dimensional slider. The amplitude in the startup phase is controlled by the start-amp 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.

  There are 2 menu buttons. With the first one a suitable name for the patch can be choosen. Menu Built-in patch opens a list of 15 built-in patches which might be used as a start.

GUS patch
  Standard GUS (Gravis UltraSound) 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 in case checkbox dir: ./samples is on, or, if it is off, in `/usr/share/bigband/samples`. A small program gus-patch is provided to translate GUS patch files to the .bb-pat format.

  The GUS patch file menu 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 is on.

harmonics
  A window with vertical bars will be shown, denoting the harmonic components of the generated waveform. The height of the bars can be controlled with the left mouse button. The attack and decay sliders are for the control of the start and the end of a note. Checkboxes monophonic and short notes work similar like for FM synthesis. With 2-dimensional slider chorus a second voice is added with a slightly detuned pitch. Checkbox noisy is to switch on the use of a noisy waveform instead of a pure sinus for the harmonics. This can yield interesting sounds especially in the low registers. The chorus setting has no effect in this case.

There is an Options menu, containing the following items:

- name... : The name of this patch.
- copy patch... : To clone an other patch.

## The 'instruments' panel

You can choose a specific patch with slider patch nr. The panning position and the amplitude are controlled with 2 sliders. The Options menu opens a list with the following items:

- name... : Will be displayed in the tab button.
- short name... : Used in postscript scores.
- transpose... : Used in postscript scores, for transposing instruments (e.g. saxophone).
- alt transpose... : Alternative transpose value.
- clef : 'treble' or 'bass', used in postscript scores.
- midi instr... : Mapping to a specific MIDI instrument. The number is according the General Midi (GM) standard.
- range : Controls the narrow rectangle at the right side of the score window. You will need this when you compose for real musicians. If the range is 0,0 then no rectangle will be drawn.
- combine : For postscript scores: combine this instrument with another. A temporary window will be shown, containing a matrix with small red dots in a diagonal. By clicking you can re-locate one or more dots.

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

At the bottom of the panel there are 2 checkboxes. If add chords is checked, then the chords from the annotations, chords window will appear in the postscript score for this instrument. If slashed notes is checked, then no normal notes are drawn in the postscript score, but slashed notes. E.g. bass players are accustomed to these.

## The 'percussion' panel

The Options menu opens a list with the following items:

- name... : Will be displayed in the tab button.
- midi nr... : Used when a MIDI file is created. As known, in the GM standard percussion instruments are mapped to certain numbers (from 35 to 81).
- abc symbol : Choice of the symbol used in an exported ABC file. An example of a suitable symbol is:
  `^g,up`
  The first character specifies the form of the note head:
  '^' will create a cross (indicating e.g. a foot-controlled hihat),
  '_' will create a circled cross note head,
  '=' will create a diamond-shaped note head (indicating e.g. a ride cymbal). If no such first character is present, then a normal round note head will appear.
  The 2nd character specifies the vertical position of the note. Useful values are C, D, E, F, G, A, B, c, d, e, f, g
  The word after the comma specifies the stem direction: 'up' (stem will be upwards), 'do' (stem will be downwards).
  The duration of the notes is calculated by the program, it will be quarter or 1/8 or 1/16.

The WAVE file that BigBand uses when it plays a percussion note, can be choosen via menu Wave file. The contents of directory `samples` (under the working directory) will be shown, or, if not found there, in `/usr/share/bigband/samples`. If you only want to listen to the available sounds, then first check the listen checkbox.

The pan and amplitude sliders act as expected.

## Global controls

- tempo : Indicates the number of quarter notes per minute.
- meter : The number of note units between the dark-grey vertical lines in the score windows.
- nupq : Number of note units per quarter note.
- key : The position of the 'white keys' lines in the score: instruments window.

## File menu

- load project... : For loading a new project file.
- save project... : To save your composition.
- export WAVE file... : A 44100Hz, stereo file in WAVE format will be created. The start of it is equal to the left side of the score windows. Only the enabled instruments and percussion instruments are used.
- export MIDI file... : To create a MIDI file according to the GM standard. Again, the start point is equal to the left side of the score windows, and only the enabled instruments and percussion instruments are used.
- export ABC file... : See the according chapter.
- export ABC file (alt transpose)... : The 'alternative transpose' value will be used.
- import MIDI file... : See the according chapter.

## Settings menu

- working dir... : Useful if BigBand was called by clicking its icon.
- title... : Will appear at the top of postscript scores.
- author... : That's you.
- key... : Key used in postscript scores.
- skip first rests... : Used for postscript scores. If value is `yes`, then, if the first measure of a voice only contains a rest, this measure will be skipped. The measure numbering is not affected.
- invisible perc rests... : Used for postscript scores. If value is `yes`, then the symbols for rests in percussion scores will not be visible.

## Swing feel

Swing feel (as opposed to straight feel) can be set for instruments and/or percussion. In this case the notes starting at the 2nd half of a beat will be delayed a small amount. The effect is also valid for MIDI output, not for postscript output.

## Chord hints

In www.fromthewoodshed.com/blog/2007/10/05/constructing-jazz-scales-from-chord-tones/ 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 catchy 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 chord hint. A list of fitting chords will be printed. If checkbox info to terminal has not been enabled 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 avoid-pitches e.g. on the weak beat, in order to add some tension.

If the a keyboard key has been pressed, then all possibilities are shown, with 0, 1 or 2 avoid notes.

The selection of chords and matching scales is built-in (file: bigband.cpp), and oriënted to chords that are most often used in jazz. The available items will be printed to the screen if key i has been pressed. This list also can be used if the chord progression was given beforehand and you want to investigate the suitable pitches.

## Exporting an ABC file

The ABC format is a well-known textual representation of music scores. For info go to abcnotation.org.uk. BigBand uses a slightly extended format, which can be read by a ABC-to-postscript translator program, e.g. abcm2ps (moinejf.free.fr). 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 postscript 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, which often yields a better 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. 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:

    X:1
    T:Kitten's Dance
    C:W.Boeke
    M:4/4
    L:1/8
    K:C
    %%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
    V:sopr
    [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, you can try option -h 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:

    format=4

    # 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:

    format=4

    # 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.

## Translating from GUS patch to BigBand patch

Maybe you wonder why the standard GUS patches aren't used by BigBand. The reason is that these contain much control data that is 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 freepats.zenvoid.org.

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 'aplay', 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 -o 68-BaritonSaxe.bb-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 68-BaritoneSax-hard.bb-pat -sel 0

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

## 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 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, it is sync'ed with the position of the slider(s). At the bottom there is a play button. When you click it, the sound will start 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. Three loop modes are available: normal (for sounds with a stable spectrum), pingpong (for noisy signals and a longer loop), and up/down (sometimes better then pingpong). 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 mode 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. The print spectrum button is for writing the frequency peaks to the screen. There is also an info window, displaying values that you might be interested in.

Wav2patch should 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: www.freesound.org.

## Tips and tricks for BigBand

- The score panels are displaying only a small part of a complete score, so it is difficult to inspect the score at 2 different places. In this case it is convenient to use 2 BigBand programs next to each other, one of them in read-only mode. If you type `bigband -h` you will see a usage message, showing a.o. the option to get this read-only mode.

- If you want to modify the order of the instruments in the instrument panel, or of the percussion instruments in their panel, then do the following:
  - Open the project file in a text editor, search for keyword `Instruments` or `Percussion`. After this there is a list of custom instruments or custom percussion instruments, each line starting with `nr=`.
  - After e.g. `nr=0` insert e.g. `order=3`, then save the file.
  - Re-read the project file. Now the former first instrument will appear at place 3, and in the score the notes of this instrument have the color belonging to instrument 3. You can modify the order of some or all instruments at the same time. Take care that there are no duplicate numbers.
- Nowadays most Linux audio applications can interface with Jack and with LADSPA plugins. This could easily be added to BigBand also, however that would make the program less portable. At that, BigBand is designed to operate stand-alone. If you want to postprocess the audio then use the MIDI output.
- There is a useful and inspiring web site for composers of all ages: Young Composers. You can send your compositions to them, and receive comments, praise or critique.