galla authored 23 days ago
LICENSE.txt license and readme 23 days ago
README.md rdme 23 days ago
fmsynth.sc license and readme 23 days ago
README.md

MUSHA - Multichannel, Multi-OP FM Synthesiser

A 4-op FM synthesiser written in SuperCollider. This FM synth is based on the Yamaha YM2612 chip, made famous by 1990's video-game consoles such as the Sega Genesis (Mega Drive). The current status is an over-simplified implementation of Yamaha's modulation algorithms.

It uses 4 operators which can be connected in various configurations, some presets are hard-coded and can be used as demo.

Archived reference docs for the YM2612 chip

Features

Basics

MUSHA works by receiving MIDI input and feeding it into its operator SynthDef, which constructs a carrier wave and accepts a modulating wave as a control. The parameters used to construct a FM signal are intentionally kept simple to emphasise the presence of the harmonic components in the output signal.

The GUI displays a visualizer which shows the frequency spectrum of the output signal.

Controls

Main window

The frequency and amplitude of each modulating wave can be controlled by two global knobs in the main GUI window. Two controls are available:

  • Modulator Amplitude: for each modulating wave in the 4-operators pipeline, set the modulator amplitude multiplication factor. This can be used to extend or reduce the frequency range of the output signal, while mantaining integral proportions between the carrier wave and the modulating wave.

  • M/C ratio: for each modulating wave in the 4-operators pipeline, set the frequency multiplier factor applied to the modulating wave. This can be used to extend or reduce the distance between each harmonic introduced in the output signal. If this parameter is low ( between 0 and 1 ) the result of this modulation will usually be a vibrato effect and the modulating wave will act as a LFO. On the other hand, high values (2-4) will multiply the modulator frequency to increase the number of harmonics in the signal.

Algorithm Editor

The algorithm editor displays a matrix of buttons representing connections between one signal and the other. The matrix is structured as follows:

  • 4 rows, representing each operator's output.
  • 5 columns, 4 representing each operator's input and one representing the audio output bus.

The matrix can be modified in real time to re-route the signal between each operator. At the moment, only one output is supported for each operator, but an arbitrary number (1-3) of inputs can be used to modulate a single operator.

MIDI

This program accepts MIDI notes and control signals to be easily interacted with using an appropriate MIDI controller (keyboard). The channels accepted are:

  • MIDI notes, with the ability to play single notes and chords.
  • MIDI pitch bend to modify the frequency of the active note(s) through a controller's pitch wheel
  • MIDI control channels:
    • channel 1: control the Modulator Amplitude knob
    • channel 7: iterate through the preset algorithm (watch them change on the GUI)
    • channel 10: control the M/C ratio knob

Usage

Simply open the file using SuperCollider IDE and:

  • connect your MIDI device (be it physical or virtual)
  • select everything (Ctrl-a) and execute the program (Ctrl-Enter).

Once the MIDI inputs are connected, the synth will boot up and show the two GUI windows. Playing any note on your MIDI device will output a simple sine wave: set the modulation amplitude and M/C ratio to a value different from 0 to introduce the modulating component.

License

This program is licensed under the terms of the GNU General Public License v3 or above. A copy of the license is provided with this program (LICENSE.txt).