📄️ Syntax Overview
Mercury is a minimal and human-readable language for the live coding of algorithmic electronic music. All elements of the language are designed around making code more accessible and less obfuscating for both the programmer-performer and the audience alike. This motivation stretches down to the coding-style itself which uses clear descriptive names for functions and a simple clear syntax. Mercury provides the performer with an extensive library of algorithms to generate or transform sequences that can modulate musical parameters, such as (but not limited to) melody and rhythm, over time. The environment focuses on creating sound in the first place, but is not limited to that and can for example also output MIDI, OSC to control other processes such as visuals.
📄️ Actions
The action keywords are used to start a line of Mercury code with. Only lines starting with these keywords are valid. The keywords are: new, list, set, print and silence.
📄️ Global Settings
A global setting is a parameter that applies to the entire Mercury environment and all the instruments that are created within it. The global settings are adjust with the set keyword.
📄️ Instrument Functions
An instrument is the main sound or sequencing source in Mercury. Instruments can produce sounds natively in Mercury by means of synthesis or sampling, but can also send out MIDI or OSC-messages to trigger external devices or plugins, and are able to take input from for example your microphone. The following functions apply to all the types of instruments such as synth, sample, loop, polySynth, polySample, midi, osc and input.
📄️ Instrument Effects
You can add one ore multiple effects to the sound of the instrument to manipulate the sounds timbre in different ways. The first argument is always the effect-name. The arguments that follow depend on the selected effect. fx() can be used as an alias to reduce some typing. For ease of use some arguments can be skipped to access the most used arguments. How this works is explained per effect if applicable.
📄️ List Functions
Mercury finds its roots in the concept of Serialism, a musical composition style where all parameters such as pitch, rhythm and dynamics are expressed in a series of values that adjust the instruments state over time. This series in Mercury is refered to as a list.