MidiSynth Controller User Guide

v0.04 26/11/2024

Contents


Overview

This program is a front end for the MIDI Support driver version of the MIDI Synthesiser module. It has two main functions. A controller for the operation of the synth and an editor for the instruments and waveforms.

The Editor contains sections for Instruments and Waveforms.

Clicking Select on the iconbar icon opens the Synth Control window.

Iconbar Menu

SelectionAction
InfoSoftware version etc.
ControlOpens the Synth Control window.
Editors->InstrumentsOpens the Instrument Editor window.
Editors->WaveformsOpens the Waveform Editor window.
HelpOpens this file.
QuitQuits the program.

Contents


Synthesiser Control

This window provides control of the overall operation of the Synthesiser.

ControlDescription
Bank OverrideThis sets the bank to use in preference to that contained in any Bank Lo message, and overrides the "Allow all Banks" option. Values between 1 and 127 set the bank to use. A value of 0 disables the override.
Drum Kit OverrideThis has the same purpose as the above bank override but for Drum Kits. It controls the Drum Kit Program number to use in preference to that contained in a MIDI Program message on the drum channel, and overrides the "Allow all Drum Kits" option.
Glide scalerThis controls the Portamento time constant. It has not been clearly defined in the MIDI spec, and some software synthesisers don't implement it. Many midi files get around the problem by using pitch bend. A value of 100 is the default where the law matches the rather small graph provided in the MIDI 2 spec. There is no maths in the spec to back it up. Not all midi equipment and midi files comply so an adjustment is provided. Values between 0 and 1000 can be entered. Smaller values speed it up, larger slow it down. Some files require a value of 10 or less. A value of 0 disables portamento.
Portamento parameters are loaded any time before being needed so to hear the effect of changes made here, the file or score may have to be restarted.
PolyphonyPolyphony is the number of notes that can be played simultaneously. It can be set to any value between 4 and 64 inclusive. CPU loading increases almost linearly with polyphony, the default is 32.
Sleep TimeoutTo reduce unecessary cpu loading the synth will go to sleep after a period of inactivity, This period can be set between 1 and 3600 seconds. A value of zero disables the timeout and it will never sleep. The inactivity counter is reset every time a MIDI message is received.
Default Drum channelThe default MIDI percussion channel is 10. This default can be changed to any channel between 1 and 16.
Current Drum ChannelThis displays the current percussion channel. It can be different from the Default setting above if it has been changed by a MIDI message when "Bank Hi selects Drum channel" has been set.
Sample RateThis displays the current system sample rate, which will be the same for the synth. Select a rate from the drop down menu. Best to have as high as possible.
VolumeControls the MIDI Master Volume. It reflects changes made by received MIDI system exclusive Master Volume messages.
BalanceControls the MIDI Master Balance. It is unaffected by the "Mono audio" and "L/R Channel Swap" options, and reflects changes made by received MIDI system exclusive Master Balance messages.
Fine TuningControls the MIDI Fine Tuning to a maximum of plus or minus a semitone. It reflects changes made by received MIDI system exclusive Master Fine Tune messages.
Coarse TuningControls the MIDI Master Coarse Tuning in semitones from -64 to 63. It reflects changes made by received MIDI system exclusive Master Coarse Tuning messages.
Mono audioMono or Stereo audio output.
L/R Channel SwapFor stereo audio, swaps the left and right channels. Has no effect for mono.
Allow all BanksWhen this is not selected, Bank Lo messages are ignored and only bank 0 (GM) is used.
Allow all Drum KitsThis has the same purpose as the above switch, but for Drum Kits. Drum Kit 0 is the GM kit.
Bank Hi selects Drum ChannelWith this selected, a Bank Hi message set to 127 will set the percussion channel to that of the received message. When not selected Bank Hi is ignored.
Program actions Bank messagesWhen selected, received Bank messages are not actioned until the next Program change message is received. When not selected Bank messages are actioned when received.
CSV bank map excludes instrument numbersNormally, when a CSV bank map is saved, all instrument references will have their instrument number saved with them. This number is only used if the CSV file is loaded back into the synth, and is needed for the synth to create a sound set. If the bank map is purely for reference, this option can be set so instrument numbers are not included.
Patch list excludes drum kitsNormally the Patch list includes Drum Kits. When this option is set Drum Kits will not be included.
Patch list by bank first then programNormally the Patch list order is to list all Banks within each Program. When this option is set the order is to list all Programs within each Bank.
Reset SynthResets the synth. Similar to the MIDI Panic button. Does not clear the editor's instrument.
Reset TuningResets both the Coarse and Fine Tuning settings to zero (A440).
Save ChoicesSaves the displayed options, excluding sample rate. The synth module will restore the choices when it is next loaded, and will attempt to obtain a sample rate nearest to 44100 as this is optimum for it.

If a bank is being used that contains no instrument for a particular program number, then selection falls back to bank 0, the GM standard bank. The same applies to Drum Kits and if Banks and Kits are selected that do not exist or contain no instruments.

Control Menu

HelpOpens this file.
QuitQuits the program.

Contents


Instrument Editor

Operation and Setup

This is an editor for the sounds that the synthesiser produces. The synthesiser holds all the sounds, or instruments, and their mapping in a data file called the Sound Set. The Sound Set is equivalent to the Sound Font that Wavetable Synths use although the format is totally different and the size is tiny compared to Sound Font files.

When an instrument is being edited it has to be played to check the sound it produces. However, the copy of the instrument used for editing cannot be accessed by the normal MIDI commands. This means normal Note On and Off MIDI commands don't work.
The editor does not provide a music keyboard itself and the !MidiKey program must be used. It has an option to send keys to the editor which should be enabled. Special Note commands will then be sent directly to the synth module instead of normal MIDI commands.

Ensure Midi Support is running and that the MIDI Synthesiser is loaded. The synth's MIDI routing connections do not need to be set for the editor to function. It talks directly to the Synth and does not use MIDI messages.
Start !Midisyn and !MidiKey.
Select the option in the !MidiKey Keyboard menu, "Send keys to Editor"

The instrument editor displays a copy of the current instrument as selected by the patch number. The displayed instrument copy is called the user instrument and all user parameters are displayed in a number of window panes. The controls are grouped into blocks that control the main parts of a generator. The Generator Block Diagram may help. The group labelled 'Instrument' does not control parameters and is described below. In the following table 'user' refers to the currently displayed instrument parameters for editing.

If you are in the middle of editing and accidentally quit the program before saving the edit, the edit is not lost. All data is held within the synth module so if you restart the MidiSyn program, the edited version will still be displayed.

Controls

Control Function
Patch The current instrument patch number. The 'user' is loaded with it. It's name and bank are shown beneath. The name is part of the instrument definition and can be edited but is not a real parameter.
InstrumentThe instrument number of the instrument used for this patch. Instruments can be selected by using either the Patch number or the Instrument number. If the instrument number is used to scroll through the store, the displayed patch, program, bank etc. corresponds to the first patch that is encountered in the store that references that instrument.
Reload Reloads 'user' with the current instrument. The button changes to "Restore" so that the next time it is pressed, the edited version is restored back into 'user'.
Whilst editing, this can be used to toggle between a modified version and the original.
Clear Clears 'user', i.e. the current edit.
Save Saves 'user' in the current instrument.
Save New Saves 'user' in the next free bank above the current instrument.
This is useful when creating variations of an instrument.

Variable parameters are adjusted by slider controls, most have a logarithmic law. If the slider resolution is not good enough, values can also be entered directly using the writable icons associated with each slider. Switches are controlled using option buttons.

It is impossible to break anything by fiddling with the parameters in the editor. However it is very easy to end up with no sound at all. Start with a stored instrument that is near what you want and tweek it a bit. The key is to only make small changes. When you're happy with the result, select "Save New" and before exiting the application save the SoundSet, SynthMenu->SoundSet->Save. This ensures that everything will be restored next time. Your new instrument will be saved in the next free bank up from the source instrument. If there was no free bank a new one will be created. You can rename your new instrument and it's new bank if one was created.

Until "Save" or "Save New" are selected, moving to another instrument overwrites any changes that have been made. SoundSet files of any name, as long as they are filetyped data, can be dropped on the window or iconbar icon to load them. The Bank name and Sound Set name are not part of an instrument definition and any changes that are made to these, once "Return" has been entered, will update those names without selecting "Save" or "Save New". The save buttons only apply to the instrument definitions. However, until the whole Sound Set is saved, nothing is permanently changed.

An instrument can be referenced at more than one bank location. If that instrument is edited, all the bank locations which point to it will be affected. The instrument will also appear more than once in the patch list that the editor uses.

Instruments can also be selected by using their instrument number. This is an internal number and is the index to the instrument store, used to reference the instrument in banks or drum kits.

Instruments, Banks, and the Sound Set must have a name and names are a maximum of 23 characters. The Sound Set name and Bank name are updated when changed, but the Instrument name will not be updated until the Instrument is saved.

While the editor has the input focus, the PageUp and PageDown keys select the next and previous instrument patch.

Menu

SelectionAction
Instrument->Create->Opens the "Create Instrument" dialog.
ControlDescription
MelodicThe instrument will be saved in a bank and program location and is expected to be a pitched instrument.
PercussionThe instrument will be saved in a Drum kit program and key (note) location and is expected to be a non pitched instrument.
Program/KitThe Program number for melodic (pitched) instruments or the Drum Kit number for percussion instruments.
Bank/KeyThe bank number for melodic instruments or the key number for percussion instruments.
CreateCreates a new instrument and a patch reference where specified. This could involve creating a new bank or drum kit. This is similar to the "Save New" button except that the instrument can be saved to any location.
CopyCreates an additional bank reference to the original unedited instrument at the selected patch location.
MoveMoves the instrument from the current patch location to the selected patch location. If the current patch is invalid this operation has no effect.
If the destination location already references an instrument you will be prompted to confirm overwriting it.
Instrument->Delete->Clear Bank Ref onlyClears the Bank reference to the current Instrument but doesn't affect the Instrument or any other references to it.
Instrument->Delete->Delete Instr & all RefsPermanently deletes the Instrument and all bank references to it. If this results in an empty bank, it will also be deleted. There is no undo for this.
Sound Set->SaveSaves the Sound Set data file in the Midisynth Choices directory. This will be loaded back in on next startup.
Sound Set->Save->Opens the "Save Sound Set" dialog.
ControlDescription
Sound SetSaves the Sound Set data file.
Bank MapSaves a CSV file of the Bank Map. Appends /csv to the file name.
Patch ListSaves a text file list of patches. Appends /txt to the file name.
Instrument listSaves a text file list of Instruments and their Bank references. Appends /lst to the file name.
C source codeSaves the Instrument, Bank, and Waveform arrays as a C source code file. This is used to update the default set when rebuilding the Synth module. Appends /c to the file name.
Pressing OK or entering "Return" will save to the Choices directory. Dragging the file icon will save anywhere.
ChoicesOpens the Midisynth Choices directory where data is stored if not dragged to a specific directory.
HelpOpens this file.
QuitQuits the program.

Contents


Waveform Editor

The waveforms used by the synthesiser are single cycles of the fundemental harmonic. Waveforms are modified by adjusting the individual harmonics that combine to form the waveform. This is the easiest way to obtain the required sound. Adjustment of both magnitude and phase are provided. For creating waveforms to provide a particular sound, the phase is not significant because the human ear is not sensitive to harmonic phase. However, waveforms can also be used for the low frequency modulator and the waveshape is then important. Examples of this are the Square and Ramp waveforms. By altering the phase of their indivdual harmonics the shape can be completely destroyed but the sound is unchanged.
The name and number at the window top are of the currently selected waveform. When the number is changed, the edit waveform is loaded with the waveform. The name can be changed and will be saved with the waveform. Below this is displayed the edit copy of the waveform. There are 2 groups of controls, one for the Harmonics, and one for the Waveform.

Harmonics Controls

ControlDescription
Main harmonics displayClick Select to select the harmonic and set the magnitude. Drag Select to change the harmonic magnitude. Drag Adjust to change the harmonic phase by sideways movement.
Waveform numberSelects the waveform to edit. This loads the edit waveform from the Sound Set.
HarmonicSelects the harmonic to edit.
MagnitudeThe magnitude in dB of the currently selected harmonic. If is scaled to 0dB for a maximum level single harmonic sine wave. If the magnitude is less than -40dB, it is set to zero and the value is blanked.
PhaseThe phase in degrees of the currently selected harmonic. It wraps from +180 to -179 and is blanked for harmonics that are set to zero.

Waveform Controls

ControlDescription
Waveform displayThis is the waveform. It is calculated from the harmonics and reflects any changes made to them
InvertInverts the vertical amplitude of the waveform
ReverseReverses the horizontal time axis of the waveform
GainControls the amplitude of the waveform. Use this to adjust the waveform to just avoid clipping of the peaks.
ShiftShifts the waveform horizontally in time by adjusting the phase of all non zero harmonics. Use this to align a zero crossing at the left and right boundaries.

General Controls

ControlDescription
Reload Reloads the edit waveform with the current waveform. The button changes to "Restore" so that the next time it is pressed, the edited version is restored.
Whilst editing, this can be used to toggle between a modified version and the original.
Clear Clears the edit waveform.
Save Saves the edit waveform in the current waveform location overwriting the original.
Save New Saves the edit waveform as a new waveform in the first empty waveform location.

Menu

SelectionAction
Test->Oscillator 1Overrides the selected waveform for the edit instrument Oscillator 1 with the edit waveform. The original setting is restored when the test option is cleared.
Test->Oscillator 2Overrides the selected waveform for the edit instrument Oscillator 2 with the edit waveform. The original setting is restored when the test option is cleared.
Test->ModulatorOverrides the selected waveform for the edit instrument Modulation oscillator with the edit waveform. The original setting is restored when the test option is cleared.
DeleteDeletes the current waveform. It will only be deleted if no instruments use it. The edit waveform is not affected.
HelpOpens this file.
QuitQuits the program.

Contents


Synth

The synthesiser is a subtractive synthesiser with FM phase distortion and is not a wavetable synthesiser. It has a number of generators and each generator contains 2 oscillators, 1 filter, 1 noise generator, 4 envelope shapers, and a modulation oscillator. Oscillator 1 can be used to modulate the frequency of Oscillator 2, i.e. 1 would be the modulator and 2 the carrier. Oscillator waveforms are selected from a store of single cycle waveforms. The number of generators is selectable between 4 and 64. An instrument definition is a generator parameter set, and each instrument definition uses a single generator so the available polyphony is always equal to the number of generators.
It conforms to the General MIDI standards and plays up to 16 channels of MIDI data. A default "Sound Set" of instrument definitions is contained within the application code and they are loaded on start up. If a Sound Set data file is found in the MIDISynth Choices directory, it is loaded and replaces the default set. All instruments and drum kits are always randomly accessble so there is no need to scan files before playing to load the required instruments.
For more details read the Synth Reference.

When the synth plays a note, a generator is assigned and it's parameters are set when a key is initially pressed. While editing, changing instrument parameters whilst a key is held down will have no effect on the sound being played.The key must be released and pressed again to hear the effects of a parameter change. An exception to this is when a waveform is being edited and being tested with one of the instruments oscillators or modulator. In this case changes to the waveform will be heard as soon as they are made.

Contents


Creating a simple instrument from scratch

The following steps will create a pure sinewave tone.

  1. Press the "Clear" button to set all parameters to zero.
  2. Select the "Waveform 1" window pane.
  3. Set "attack rate", and "release rate" to about 366 (central position).
  4. Set "attack target", "decay rate", and "decay target" to 32767 (maximum).
  5. Select the "Common Controls" window pane.
  6. Select "pitch track", "env track", and "wave 1 out" in the "Common Wave Controls" group.
  7. Set "gain" in the "General" group to about 1024 (central position).
  8. Give the instrument a name. Type it in the empty box in the "Instrument" group on the right.
  9. Ensure "Send keys to Editor" is selected in the !MidiKey Keyboard menu. The keyboard window must have the input focus for the computer keyboard to select notes. If it does not have the focus, just move the window a bit.

This should produce a tone when a key is pressed on the !MidiKey piano keyboard.
Press "Save New" and the new instrument will be saved in the next free bank up from the current bank with the same program number as the current program number.

Contents


Changing the Bank Map

Whilst it is possible to move instruments around using the editors instrument controls, the easiest and best and way to change where instruments are located in the bank map is by using a spreadsheet. Try the following.

  1. First of all. make a directory somewhere so we don't overwrite anything important.
  2. Save the bank map via the Editor window menu. Editor->Sound Set->Save->Save Sound Set. In the Save Sound Set window, select Bank Map. Drag the CSV file icon to our new directory.
  3. Load the CSV file SoundSet/csv into a spreadsheet program, e.g. Fireworks.
  4. Move the instrument cells around as needed, rename banks and the sound set if required. Names are a maximum of 23 characters. Cells can be copied. But copy/move everything in the cell (number: name). The numbers are important when loading the modified spreadsheet back into the Synth. New banks can be created by inserting a new column where needed. The bank must have a name of up to 23 characters. Copying an instrument cell will just reference the same instrument from two different locations.
  5. Export the spreadsheet as a CSV file. Drag it to our directory.
  6. Drag the new CSV file to the instrument editor window to load the new map back into the synth.
  7. Check it does what you want by going through all the patches in the editor window. This will show you the bank locations.
  8. Save the new sound set that will be created. Editor->Sound Set->Save->Save Sound Set. Select Sound Set, the top option. Drag the DATA file icon to our directory.

Changing the bank map by using a spreadsheet does not create new instruments, and instruments cannot be renamed, use the editor to create and/or rename instruments. The spreadsheet just changes the locations of references to existing instruments. You cannot load a CSV map file which references 300 different instruments into the synth with only 200 instruments defined. It will be rejected on loading. If you save the CSV file, change it then load it back in without changing the sound set in between, everything will be fine. The Program, Bank, Key, and Instrument numbers are followed by a colon and the associated name. Program,Bank,and Key numbers can be between 0 and 127. Instrument numbers can be between 0 and one less than the number of defined instruments for the sound set used to create the CSV file.

A bank must have a name, otherwise it is considered empty and may be overwritten when a new bank is required. Names of Banks, Instruments, and the Sound Set can be up to 23 characters long. The Sound Set name shown in the spreadsheet and editor can be different from the Sound Set filename which, for the Data type file must be named "SoundSet" and saved in the Synth "Choices" directory for the Synth to load it on startup. This directory is the default.

It is best not to change the Instrument mapping for bank 0 and Percussion mapping for Drum Kit 0 as these are the GM standard banks. By all means, create a new bank with all the GM instruments moved around. This new bank can then be used in place of the GM bank by using the Bank Override facility available in the Synthesiser Control window. The same applies to Drum Kits.

Contents


© 2024 Peter Everett