User Tools

Site Tools


midibox_quad_genesis

This is an old revision of the document!


Page under construction!

Summary

MIDIbox Quad Genesis (MBQG) is a homebrew synthesizer project in progress, designed and built by Sauraen and originally commissioned by Josh Whelchel. It runs up to four sets of YM2612/YM3438 (OPN2) + SN76489/94/96 (PSG) sound chips, one set of which roughly comprised the sound generation hardware in a Sega Mega Drive / Genesis. The synth is powered by a STM32F4 core running MIOS32, and is based on MIDIbox hardware and software throughout.

Useful Links

MIDIbox Quad Genesis forum thread

MIDIbox FM V2.1 (OPL3 synth on STM32F4) forum thread, including some old discussion with yogi about MIDIbox Quad Genesis ideas

Fill out this form if you might be potentially interested in buying MBHP_Genesis boards

Hardware

Hardware components

  • CORE_STM32F4 module (embedded CPU, LCD parallel interface, DIO SPI level shifter, SD card, USB MIDI)
  • Zero, one, or two MIDI_IO modules
  • One, two, or four MBHP_Genesis modules
  • One MBHP_Genesis_LS level shifter board to interface 3V MCU to 5V sound chip boards
  • 2×40 character LCD (or VFD, or OLED…) (size mandatory)
  • MBQG_FP custom front panel board; or alternately, DIN, DOUT, and/or DIO_MATRIX modules as needed to make custom front panel
  • Stereo audio output connection of desired type
  • Mono audio input connection for each SN76494/96 if desired

Synth Architecture

Overview

The synth is intended to support two use paradigms. Both may be active simultaneously on different voices.

The first is the case in which the user has the synth connected to their DAW or to an extension to a tracker, and the user wants to have full control of every sound chip parameter via MIDI (MIDI is supported over USB and UART). This is achieved by setting voices to Tracker Mode and assigning channels to control them. The front panel controls will reflect and edit the current voice state, and a short burst of MIDI messages can be dumped back to the DAW which when played back to the synth will restore the voice to the current state. No polyphony, modulators, or other synth engine features are available in this mode.

The second paradigm encompasses the following use cases:

  • Playing Mega Drive/Genesis VGM files on the synth from the SD card.
  • “Sampling” VGM files to create custom music–that is, extracting sample, instrument, and control information from VGM files, and then modifying them or playing new music with them.
  • Creating intricate, custom sounds with FM synthesis and playing them in polyphony across all four sound chips.

The core of the synth engine is a module that plays back many (often over 30) VGM files from RAM in parallel on the eight sound chips. The VGM files being played can be edited down from ones saved on the SD card, and then set up so their commands will be played on different voices based on a dynamic-assignment polyphony engine. In addition, one VGM file at a time may be streamed from the SD card for auditioning or editing. A typical use would be loading and previewing a VGM file from your favorite Mega Drive/Genesis game, using the front panel controls to extract the configuration of a single instrument as a smaller VGM file, creating an instrument out of this new VGM file, and assigning this instrument to a channel to be played on all 24 FM voices in polyphony.

Voices

Each voice (any sound chip) can be in one of two modes: Tracker or Free.

Tracker Mode

A voice in tracker mode has little-to-no synth engine and is simply controlled in realtime by MIDI commands from a DAW or tracker. It is configured to respond to commands from one MIDI port on one channel. The following MIDI messages are supported:

  • Note On sets the voice's frequency and keys on all operators; Note Off keys off all operators. Velocity is ignored.
  • Pitch Bend changes the voice's frequency in real time (as usual); the Pitch Bend Range RPN is supported.
  • CC7 (Volume) changes the amplitude of the voice's carrier operators according to a selectable mapping.
  • CC10 (Pan) changes whether the voice is assigned to left, right, or both channels.
  • Other CCs (TBD) set all other operator parameters.

In addition, each YM2612 may be placed into Tracker mode itself, and then it will respond to MIDI messages to set its global parameters (LFO, test registers, etc.).

Free Mode

A voice in free mode is available to be assigned in real-time by the synth engine to an appropriate instrument.

Instruments

An instrument is a set of configuration information about one or more voices of certain types. As in a General MIDI ROMpler, MIDI channels are assigned to instruments by the user (or via MIDI messages), and the synth automatically assigns those instruments to voices when notes are triggered. However, the actual content of these instruments is very different from a GM patch in MIDIbox Quad Genesis.

An instrument contains:

  • Information about how many of what kinds of voices the instrument will use, and whether it will set or use chip-global features like the LFO
  • A “state” VGM file, which must be of time-length 0, which is played when the instrument is loaded to a voice
  • A “sample” VGM file, any time-length, which is played when the instrument is keyed on
  • Information about how the MIDI note played combines with frequency information in the VGM to produce the actual frequency values sent to the voice
  • Optional operator gating at fixed delay from MIDI note on, or in response to other MIDI events
  • A set of modulators (software LFOs, EGs, velocity, CCs) and their assignments to voice parameters

Interface Modes

Voice Mode

Press Voice and select a voice. Use the screen to set whether the voice is in tracker or free mode. If the voice is in tracker mode, the voice controls light up and are functional to set the current state of the voice. This state of course may be overridden by subsequent MIDI messages. The current voice state may be loaded/saved at any time from/to a VGM state file.

Channel Mode

Press Chan. Use the screen to select a MIDI channel. Set whether the channel is assigned to a voice in tracker mode, whether it should play instruments on voices in free mode, or whether it should be ignored. (TODO channel instrument split points for drum sets) In addition, the following elements can be set up:

  • A multiplier can be added to any MIDI channel to affect one or both of CC 7 and CC 11. If enabled, the multiplier simply multiplies any incoming CC of this type by the 16-bit value and then divides it by 2^8, before passing it on to the synth engine. This allows the volume of channels to be adjusted while they remain responsive to incoming volume messages.
  • If the channel is in free mode, a program change can be sent from this menu.

Instrument Mode

Press Inst and use the screen to select a loaded instrument, or select the instrument from Channel mode. Use the screen to load and unload more instruments, choose the instrument's state and sample VGM files, set up the MIDI note on frequency/gate behavior, and edit modulators.

Voices light up corresponding to the voices this instrument affects–but not the actual voices it's being played on, rather the voices that the VGM files are specifying playback on. For instance, if the state file was extracted from a VGM that happened to be playing the instrument on FM channel 4, channel 4 would be lit up, even if currently this voice was playing three polyphonic copies on chip 3 channels 1 and 6 and chip 4 channel 2.

Select a voice and use the voice controls to view and edit the voice's state. This is the state of the voice after its state VGM is played but before its sample VGM is played. No VGM timing controls are available, as all the commands in the state VGM must happen at time zero.

VGM Mode

Press VGM and use the screen to select a loaded VGM, or load a new one. Alternately, select the VGM from Instrument mode.

TODO

midibox_quad_genesis.1452999765.txt.gz · Last modified: 2016/01/17 03:02 by sauraen