Skip to main content

โŒจ๏ธ External Editors

Instead of using the built-in editor that comes with Mercury4Max (an editor that is running with OpenGL in the Jitter visual environment) or the CodeMirror editor that is running in the MercuryPlayground, you can also work with external code editors and just use Mercury4Max as the sound engine.

๐Ÿ‘พ Flokโ€‹

Flok is a web-based P2P collaborative editor for live coding music and graphics developed by Damiรกn Silvani (a.k.a. Munshkr). Similar to Etherpad, but focused on code evaluation for livecoding. While the main focus is on collaborative coding, you can also use flok as an external editor for your solo coding.

โš›๏ธ Pulsarโ€‹

Pulsar is a Community-led Hyper-Hackable Text Editor that you can install for Windows, OSX and Linux. You can extend the editor with custom plugins.

After installing the mercury-pulsar plugin you can type code in the editor and send it via OSC-messages as /mercury-code "<code here>" over UDP to port 4880.

๐Ÿ’ป Installโ€‹

The Mercury Pulsar plugin is now available through the built-in Package Manager in Pulsar.

  1. Open Pulsar.app
  2. Click on Packages > Open Package Manager
  3. Search for mercury
  4. Click Install

๐Ÿ’ป Install via commandlineโ€‹

Make sure that ppm (Pulsar Package Manager) is installed. On linux and windows, it should be automatically installed with Atom. On OSX, go to the Pulsar menu and click Install Shell Commands.

Open the Terminal and type: ppm install tmhglnd/mercury (If ppm fails, you can also use pulsar -p).

Optionally you can also first clone this repository and install it manually:

  1. Download this repository via git clone http://github.com/tmhglnd/mercury-pulsar
  2. Navigate to the directory and install the dependencies cd mercury-pulsar and ppm install
  3. Load the package ppm link .
  4. Restart Pulsar

๐ŸŽฎ Usageโ€‹

  1. Start Mercury4Max or the MercuryPlayground (running locally!, see instructions here)
  2. Create an empty file in Pulsar and write your code. This can be a plain .txt file.
  3. Go to Menu > Packages > Open Package Manager, find the mercury package and click on Enable.
  4. The package should be automatically activated
    • You can also toggle the package on/off with cmd + shift + p
    • Search for mercury:toggle and enter.
  5. Type some code and:
    • Evaluate with cmd/ctrl/alt + enter
    • Silence the sound with cmd/ctrl/alt + .
    • Randomize variables cmd/ctrl/alt + shift + r