This is a Python implementation of the 1971 Triadex Muse by Edward Fredkin and Marvin Minsky, a pioneering two-octave monophonic music synthesizer.
Audio output works either by built-in audio synthesis (which requires an audio player that can play raw audio samples) or by MIDI output to an external synth.
The Triadex Muse plays an endless melody over two octaves of a major scale. The tempo and base pitch/tonic can be adjusted by the user. Eight sliders with 40 settings each are used to control how the Muse calculates the next note of the melody.
This page has some background information about the Muse and also features a JavaScript-based simulator. Just place the eight sliders at random positions, increase the tempo to 6 or 7 and click RUN. It even simulates the four-color light show box that was available as an optional accessory.
The Muse uses two binary counters and a 31-bit linear-feedback shift register (with up to four taps: theme sliders W to Z) to create binary input signals. The generated patterns are either repeating or more random, depending on the setting of the theme sliders. A vertical strip of lamps at the right side shows the current state of the bits in the counters and shift register.
Bits from these signals are then selected by the four interval sliders (A to D) at their respective positions. The resulting four-bit number is finally converted into one of 15 different pitches of the major scale, where A=1, B=2, C=4, D=8 (octave). The pitch one octave up from the base pitch/tonic is duplicated in this encoding because it has two representations, 7 and 8.
If MIDI = False (line 24), the script sends signed 16-bit audio samples (mono; 44.1 kHz) to standard output, so you need to redirect output to an audio player or a file. You can e.g. pipe output into the play command from SoX to listen to it:
python3 Muse2.py | play -t raw -b 16 -e signed -c 1 -v 1 -r 44100 -q -
Alternatively, you can redirect output to a file and then import it into Audacity as a raw file.
If MIDI = True (line 24), output is sent as MIDI notes using the mido module.
An external synth is required to turn MIDI notes into audio in that case, but many free and open source options exist:
- Dexed is a nice open source FM synth with many great presets, and it also shows which piano keys are currently pressed.
- Or try OB-Xf or amsynth (Linux/Mac) for some analog warmth. Keys ⇨ Santori Time is a good OB-Xf preset that works well with the Muse.
- Or run two synths at the same time, e.g. using the MixedBag1 ⇨ CorgGalaxy01 patch in amsynth and the vibraphone in Dexed.
- Surge is also excellent (e.g. using the Argitoth ⇨ Keys ⇨ Gumdrops preset) and even more powerful than Dexed or amsynth.
These synths are all available as standalone binaries, so no DAW is necessary to run them.
The evolve parameter (line 276) controls how frequently the Muse slider settings are changed (by randomly picking a slider and setting it to a new value). E.g. if it is set to 16 (default), the settings will change every sixteen beats. The new settings are also printed to standard error output.
By default, there is a 10% probability that a switch will be moved to the counter section (OFF/ON/Cx), otherwise it will be set to one of the shift register bits (B1–B31). A switch in the counter section will produce a more repetitive sound, while a switch in a shift register will cause more random and non-repeating melodies.
The sec_max parameter (line 282) defines maximum duration of the sound, or use 0 for infinite playback. Limiting duration is especially useful when redirecting audio to a file.
- Triadex Muse image by Michael Hicks from Saint Paul, MN, USA, CC BY 2.0 https://creativecommons.org/licenses/by/2.0, via Wikimedia Commons
