• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language Max
  • License
    GNU General Publi...
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A minimal and human-readable language and environment for the live coding of algorithmic electronic music.

🌕 Mercury Live Coding Environment

A minimal and human-readable language for the live coding of algorithmic electronic audiovisual performances.

Mercury currently has 2 versions:

  • Original version running in Max8 (Windows/Mac only) (you're in the right place)
  • Web version running in the browser (Windows/Mac/Linux) go to this repo

🚀 Start coding with the latest full version:

GitHub release (latest SemVer)

👾 Or sketch in the browser playground! (recommended for beginners)

🙏 Support Mercury by becoming a Patron

💬 Join the Discord Community!

Livecoding Performance with Mercury (photo: Zuzanna Zgierska)

📋 Table of Contents

📟 About

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 the audience. This motivation stretches down to the coding style itself which uses clear descriptive names for functions and a clear syntax. Furthermore the editor is restricted to 30 lines of code, keeping all code always visible. Mercury provides the performer with an extensive library of algorithms to generate or transform numbersequences that can modulate parameters, such as melody and rhythm, over time. The environment produces sound in conjunction with visuals. Besides looking at the code, the audience is also looking at the visuals that are reactive to the sound or generated by the sound.

It is named after te planet Mercury. Mercury rules the creation and expression of our mental processes. The planet implores us to express ourselves. Mercury is about a quick wit, quick thinking. It lets us move from one thing to the next.

Mercury is programmed in the Cycling'74 Max8 node-based creative coding environment, as an abstracted layer on the Max/MSP audio engine and with the use of Node4Max for parsing, lexing and generative algorithms and Jitter/OpenGL for the visuals and the responsive texteditor.

Mercury uses the Total Serialism NodeJS package available on npmjs.com. This package contains an extensive library of algorithmic composition methods.

Screenshot of the Mercury environment

🎮 Features Overview

Quick access to playback of samples and change timing and tempo of samples or synthesizers

set tempo 89

new sample kick_909 time(1/4)
new sample hat_909 time(3/16)

Make rhythmic patterns with sequences of numbers and probabilities

ring loBeat [1 0 0 1 0.5]
ring hiBeat [0 1 0.2 0]

new sample tabla_lo time(1/8) play(loBeat)
new sample tabla_hi time(1/8) play(hiBeat)

Generate psuedorandom melodic content for a synthesizer in a range and set a scale

set scale minor d
set randomSeed 31415

ring melody random(16 0 24)

new synth saw note(melody) time(1/16) shape(4 100)

Design sounds with various effects

new sample chimes time(2) speed(-0.25) fx(reverb 0.3 15) fx(drive 10) fx(lfo 1/8 sine)

Easily give multiple instruments the same effects

new sample chimes time(2)
new sample harp_down time(3)
new sample gong_lo time(5)

set all fx(lfo 1/16) fx(delay) fx(reverb 0.5 11)

Generate sequences algorithmically to compose complex structures and choose from an extensive library of algorithms to work with

set scale minor a 

ring rhythm euclidean(32 13)

ring melody spread(5 0 24)
ring melody palinedrome(melody)
ring melody clone(melody 0 5 7 3)
ring melody lace(melody melody)

new synth triangle note(melody 1) shape(1 80) play(rhythm)

Control external midi devices or send midi to other applications and use clock sync

set midi getPorts
//=> prints the available devices to the console
new midi "Your Awesome Midi Device" time(1/4) note(7 1) length(100) sync(on)

Control other environments via OSC-messages

ring params [0.25 0.5 0.75]

new emitter osc address(yourDevice) theParam(params) time(1/4)

// emits => /yourDevice/theParam 0.25
//          /yourDevice/theParam 0.5
//          /yourDevice/theParam 0.75
//          /yourDevice/theParam 0.25
//          etc...

Easily control parameters in Mercury via external OSC-messages

new synth triangle fx(reverb /extOSC/verbAmount) fx(filter low /extOSC/cutoff 0.4) time(1) shape(1 1000)

AND MANY MORE (TO COME...)

🔭 Vision / Goals

  • Provide creatives with a quick and hands-on coding environment/language to expres, communicate and improvise livecoded works.
  • Use the environment as a teaching tool for:
    • introduction to (electronic) music
    • algorithmic composition
    • sequencing and pattern generating
    • sound design
    • creative coding and live coding
  • Provide creatives with an hands-on language to create realtime processes
    • code sound and music
    • code visuals and let them react to sound
  • Provide creatives with an extensive library of algorithmic composition techniques
    • released as a seperate Node Package titled Total-Serialism
    • included in the Mercury environment through Node4Max
  • Provide creatives with a multi-purpose non-linear-sequencer
    • use OSC to communicate with other platforms
    • use MIDI to communicate with other platforms and devices
  • Provide creatives with an easy sampler/synthesizer for sounddesign and composition
    • use external OSC to control parameters in the sampler/synthesis
    • use external MIDI devices and messages to play the sampler/synthesizers (coming soon...)
  • Release a browser version and standalone Electron app, making getting started easier
  • Collaborate in Mercury via the browser with Flok and code music together
  • Extending the Mercury users-community and including extensions on the environment in the master-branch

⭐️ watch and star this repo to keep up-to-date with the latest changes whenever they're made

👩‍💻👨‍💻 Collaborative Coding

You can code together in Mercury using the amazing Flok live coding environment in the browser. The easiest way to get started is by combining Flok with the Mercury Playground, but you can also combine Flok with the Mercury Max8 version.

💻 Install

OR

  • 🤓 I'll just download and figure it out myself
$ cd ~/Documents/Max\ 8/Projects
$ git clone http://github.com/tmhglnd/mercury
$ cd mercury
$ open mercury_ide/mercury_ide.maxproj

⚠ Troubleshooting

It could be that you are having issues with Mercury. Please follow the steps below:

⌨️ External Editor

Instead of using the editor built in the Max Mercury version you can also load an external textfile or use a plugin for Pulsar (previously Atom).

📖 Documentation

Full explanation of all the possibilities in Mercury:

💻 System Requirements

These system requirements are recommended to install and run Max and Mercury on your computer. Lower specs may work but it's not guaranteed. A dedicated Graphics Card (GPU) is also recommended to run the visual side of Mercury smoothly (the text-editor runs on the graphics card as well).

OS CPU RAM
Mac OSX 10.13 (at least 10.11.6+) Intel i5 processor 8 GB
Windows 10 (7 or 8 may work) Intel i5 or AMD mult-core processor 8 GB

🎵 Sounds

Most sounds in Mercury are downloaded from freesound.org and are licensed with Creative Commons Attribution or Creative Commons 0 licenses. If not downloaded from freesound it is made sure that the license allows to redistribute the sounds via the Mercury environment and that you can use them in your projects. A list of all the available sounds and the original sample can be found here:

🔍 Further reading

👾 Made with Mercury

📝 Contribute

Contributions to the Mercury environment are much appreciated in whatever form they come! You can contribute in any of the following ways:

  • Add suggestions, bugs or feature-requests to the issues
  • Make additions or changes to the Documentation, Tutorials, Examples and any other text in this repository
  • Adjust the source code or make bugfixes and add features by forking and sending a pull request (see the Guidelines)

In order to make changes to various types of source code files you will need the following:

  • patchers - Requires Max8 environment and license to edit/modify/save the patchers of this project.
  • JS code - Requires a standard code-editor (eg. VSCode or Atom) to edit/modify/save the JS code.
  • GenExpr Code - Requires a standard code-editor (eg. VSCode or Atom) to edit/modify/save the GenExpr code.

Guidelines

In order to receive your contribution please follow these steps:

  1. Fork this repository (click fork in the top right)
  2. Clone the repository to your computer git clone https://github.com/<this-is-you>/<forked-repo>.git
  3. Branch the Fork git checkout -b <name-your-branch>
  4. Make any changes/additions to the code or docs
  5. Add, commit and push your changes git add . git commit -a git push origin <your-branch-name>
  6. Go to your forked repo in the browser and click compare & pull request, then create pull request
  7. Please add a comment to clarify what you did and why

All steps with examples and images

🔋 Powered By

🙏 Thanks

  • Roald van Dillewijn for working together on osc and midi functionalities combined with his Digilog modified guitar-pedals
  • Guillem Gongora Moral for using Mercury as a composition tool and sharing valuable feedback in the process
  • Anne Veinberg for working with Mercury and a Mercury extensions for the CodeKlavier project
  • Rafaele Maria Andrade for collaboration on networked performance between Mercury and Knurl
  • Repo banner image by Annebel Bunt
  • Live performance image by Zuzanna Zgierska

Inspiration

During the development of Mercury (both the playground and the full version) I've found inspiration in many other live coding environments, practices and other platforms. Some of these are:

  • Hydra - Live coding visual synthesizer by Olivia Jack
  • Sema - Live coding language design platform combined with Machine Learning
  • MIMIC Project - a web platform for the artistic exploration of musical machine learning and machine listening.
  • Tidal - Live coding of patterns
  • Sonic Pi - The live coding synth for everyone
  • Tone.js - Webaudio framework for programming synths and sequencers
  • Nearley - Parsing toolkit

📄 Licenses

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

total-serialism

Toolbox full of Algorithmic Composition methods
JavaScript
111
star
2

max-pd-converter

A node script that converts MaxMSP patches to PureData and vice versa
Max
60
star
3

mercury-playground

The Mercury live coding environment running in the browser
JavaScript
36
star
4

wave-terrain-synthesis

A package of abstractions for polar, cartesian wavetable lookup and terrain wavetable generation
Max
30
star
5

av-toolbox

A toolbox full of abstractions to help create your realtime audiovisual works in MaxMSPJitter
Max
25
star
6

th.scala

Explore alternative and microtonal tuning systems with this small package of abstractions for Max
Max
25
star
7

gl-pix-shaders

A small library of various pixel shaders for texture processing in Jitter OpenGL
Max
21
star
8

jit.underworld

Gateway to non-realtime HiRes rendering of audioreactive jitter visuals with synchronised sound
Max
17
star
9

codevember-2019

A project filled with patches/code from the codevember 2019 challenge
Max
12
star
10

live-coding-101

Everything you need for the Live Coding 101 Workshop!
12
star
11

th.euclid

Generate euclidean rhythms as lists or at signal rate
Max
12
star
12

reverb-yafr-mods

A package containing modifications on the famous yafr2 reverb from Max
Max
11
star
13

th.gl.texteditor

A multi-line texteditor in the Max Jitter OpenGL window for interaction with your patch in a Livecoding-like style.
Max
11
star
14

ascii-art

Convert a grayscale movie/image (as texture) to ascii characters in Max-Jitter
Max
8
star
15

poly-recursion

Dynamically build a chain of DSP with poly~ objects inside poly~ objects
Max
8
star
16

vowel-formants-graph

An exploration of different vowel formant datasets with interactive synthesis in p5
JavaScript
7
star
17

circular-wavetable

A wavetable scanner using polar coordinate system, controlling rotation, radius, and modulation on radius
Max
6
star
18

th.gl.texturefolder

This abstraction allows you to load an entire folder into named textures
Max
6
star
19

emoji4max

Probably the least useful package for Max8, but lots of fun.
Max
6
star
20

simplex-noise-loop

A few examples on how to create GIF noise loops with Jitter in Max
Max
6
star
21

sample-scatter-scrubber

Plot and scrub through a set of samples in 3D space organized based on their spectral description
Max
6
star
22

th.clockwarp

Create rhythms, subdivisions, probabilities and warping out of a single phasor~
Max
5
star
23

total-serialism-n4m

A node-for-max example using the total-serialism package
Max
5
star
24

risset-rhythm-effect

A patch demonstrating the Risset Rhythm Effect, an endlessly speeding drumloop
Max
5
star
25

th.comp

A mono Dynamic Range Compressor for Max with side-chain functionality
Max
5
star
26

image-scraper-n4m

Scrape images from Google and use them as textures on Multiple gridshapes in Jitter
Max
5
star
27

gridshape-raymarcher

A raymarcher shader for gridshape geometry in the Max Jitter environment
Max
5
star
28

osc-midi-bridge

A simple server and browser page to forward OSC messages and MIDI using socket.io and webmidi
HTML
5
star
29

misc-max-abstractions

Various max abstractions helpful during patching
Max
5
star
30

strange-attractor-synth

A synthesizer using strange attractors in signal domain for modulation
Max
4
star
31

th.clave

Generate random clave patterns for algorithmic composition
Max
4
star
32

th.lfo

A small lfo abstraction with selectable waveshapes
Max
4
star
33

max-meetup-nl

A collection of patches and code from the Max User Meetup NL
Max
4
star
34

mercury-workshop

A repository with references, cheatsheet, exercises and more helpful references for when giving a Mercury workshop/course.
4
star
35

soularis

A 3-dimensional sequencer analogues to a solar-system
Max
4
star
36

th.gl.commandline

A commandline text-editor in the Max Jitter OpenGL window for interaction with your patch in a Livecoding-like style.
Max
4
star
37

gl.shadermappings

Quick access to all included shaders in the Max8 application
JavaScript
4
star
38

strange-attractors

Strange Attractor Particle Systems in OpenGL through a glsl vertex shader with transform feedback
Max
4
star
39

n4m-p5

A small example for sending osc between Node4Max and p5.js
Max
4
star
40

th.gl.videogrid

Display a video/texture in the jit.world on a fixed grid
Max
4
star
41

mercury-app

The Mercury web playground wrapped in a standalone electron app
JavaScript
3
star
42

mercury-lang

Package that parses Mercury code and returns a JSON formatted parse tree
JavaScript
3
star
43

integer-sequences

A package with abstractions to generate integer sequences in Max
Max
3
star
44

mc-utilities

A package containing various abstractions that can be used with mc in Max8
Max
3
star
45

list-objects

A small package containing various abstractions for list processing and statistical analysis
Max
3
star
46

th.cross3

Get the average amplitude values from an audio signal over 3 different frequency bands.
Max
2
star
47

abstraction

An installation demonstrating abstraction through interaction with code
Max
2
star
48

motion-silhouette

A OpenGL jitter patch that transforms the webcam input to a black and white motion image
Max
2
star
49

dynamic-scene-loading

Dynamically load multiple jitter patches and process through dynamic chain of pixel-shaders in poly
Max
2
star
50

sample-cleaner

Batch process a folder of samples in different ways with ffmpeg
JavaScript
2
star
51

th.pitchshift

A mono time domain pitch shifter abstraction for Max
Max
2
star
52

pass-comparators

Max abstractions that pass a value to the output if the condition is true, else the output is blocked.
Max
2
star
53

th.gl.cornerpin

jit.gl.cornerpin wrapped in an abstraction that automatically exposes corner coordinates to pattrstorage
Max
2
star
54

th.midiglide

Keep track of currently held midi-notes and glide pitch back to previous note on release of latest pressed midi-note.
Max
2
star
55

mercury-pulsar

Live code electronic music with Mercury via the Pulsar editor
JavaScript
1
star
56

gl.check

Small abstraction that checks which GL engine is used in MaxJitter (gl2/gl3) and asks to switch
Max
1
star
57

th.linden

Generate lindenmayer system string expansions with custom rules for algorithmic composition
Max
1
star
58

tmhglnd.github.io

Github pages repository
1
star
59

th.getkey

return a bang or bool on keydown or keyup strokes of a specified character
Max
1
star
60

coding-encounters

A collective effort to map out creative coding events, meetups, workshops, exhibitions, venues, residencies, etc.
JavaScript
1
star