xsynth - MIDI Musical Keyboard

[Source Code]


Introduction

xsynth is an X-Windows application which interfaces to the soundcard's FM synthesizer and the MIDI port. It has a Motif GUI which provides a keyboard like interface with 49 piano style buttons. The features are:

Main Keyboard Section

The main keyboard section consists of 49 piano style keys. There are 29 white keys and 20 black keys. These keys can be activated in several ways:

The computer's keyboard also serves as input the synthesizer. The following is a map between the computer's keyboard keys and the synthesizer notes. The keyboard supports four octaves. The octaves can be transposed by pressing the Shift key and pressing the computer keyboard key.

Channel Selector Channel buttons are used to associate instrument patches to channels in the FM synthesizer. The FM synthesizer is capable of 18 simultaneous channels. In other words, 18 instruments can be simultaneously played. In order to achieve stereo separation on channels, the following allocation of channels to the left, right and center stereo output is shown below:


Instrument Loading

In order to play a sound on the synthesizer, you have to first load an instrument on one of the 18 channels. Basically, any channel can be loaded with any of the 128 Instruments. To obtain a list of the instruments available to the synthesizer, press the Show button. This will pop up a window with a list of instruments ordered In General MIDI specifications. To load an instrument, you must select a Channel by toggling it on and then entering the number of the instrument on the numeric keypad. Once the Instrument is loaded, the instrument number appears on the channel. Now pressing any keyboard key will sound the Instrument.

Load - This button will load an instrument patch map File called sbi.def. This file specifies the position where the instrument should be loaded and the file name of the Instrument patch. The instrument patch is stored in a format called Audioware/6000 instrument (files with a ".sbi extension). The format of sbi.def is as follows:

<Patch Number> <Instrument Name> <SBI File Name> e.g.: 25 Weird wierd.sbi


Patch Number a number from 0 to 255. Instrument Name is the descriptive name of the instrument (no spaces in the name) and SBI file name is the name of theUNIX file containing the .sbi format patch. Note that the new instrument patch map will override any of the preprogrammed entries.

Show - This button pops up a scrolled window containing the numerical list of Instrument patched currently loaded. To close the Instrument list, press the Show button again (use the window manager to move the popup show window to uncover the Show button).

In order to load an Instrument on an FM channel follow the steps below:

  1. Select a channel (left, right or center) from the Channel Selector section.
  2. Now enter the selected Instruments number on the Numeric Keypad. Press Enter on the keypad and observe that the number appears on the channel selector button. Pressing the Cancel button permits the user to rectify errors while entering Instrument numbers.
  3. Repeat steps 1 and 2 for different Instruments and different channels. You may program up to 18 instruments on the synthesizer. Depending on the FM channel number, the instrument is sounded on the left, right or center audio output channel.


Recording and Playback

This section contains buttons to record notes so that they can be played basic in arpeggio form or simply backing sound. This section has various gadgets to reset the synthesizer and display system messages and a power-off button.


Keyboard Control

The keyboard control section allows the user to change the characteristics of the keyboard. There are four modes for playing notes on the keyboard. The default mode Is similar to a piano In which the note remains voiced while the key Is pressed. As soon as the key is released, the note Is tuned off. In the polyphonic mode, each note Is played on a different FM channel. Hence It is possible to play chords In this mode. In the Drag mode, the user must simply drag the mouse over the keyboard keys to play the note. This mode enables the user to play a piano roll. In the resonance mode, the note remains voiced even after the key is released. The note will remained sustained or will gradually decay depending on the characteristics of the instrument. The octave transpose buttons enable the user to set the keyboard octave. The keyboard supports 4 octaves at any given time. Hence the first White key will set the octaves for the rest of the keyboard.


Effects Control


MIDI Control

The MIDI control allows the user to read MIDI data directly from an attach MIDI keyboard and play the notes on the FM synthesizer and playback MIDI files on the FM synthesizer or the Wave-Table synthesizer.

To play a MIDI file follow the steps below:


Rhythm Programming

This section permits the user create basic rhythm patterns using 5 percussion instruments on a 16 beat grid. The drum programmer is interactive and can be dynamically changed while the rhythm is playing. The tempo control slider can be used to speed up or slow down the tempo of the rhythm. The volume control slider can control the volume of percussion instruments. Finally, the drum pattern can be reset by a single press of the reset button

In order to play the percussion instruments, follow the steps below:

You may change the pattern dynamically. The drum programmer will follow the pattern set In a round robin manner. To close the drum programmer grid, press the Program button again. To reset all the percussion Instruments, press the Reset button and this will erase the pattern from the grid.