Mercury: a live coding environment focussed on quick expression for composing, performing and communicating Timo Hoogland Music Technology Faculty, HKU University of Arts Utrecht info@timohoogland.com ABSTRACT In this paper the livecoding environment Mercury is introduced. An interpreted language that is designed with the focus on quick and hands-on composing, performing and communicating of live-coded music and sound. Mercury provides the performer with a highly abstracted programming language for music and sound complemented with visuals. By allowing for a higher level of abstraction, the coder does not need to write large amounts of code and the comprehension by the audience is improved. Combining the sound with visual elements adds value to this understanding. The environment incorporates generative and transformational list functions to assist in algorithmic composition processes. Mercury has been used for performances at various livecoding events and proven itself as a live-performance tool. 1 Introduction Livecoding is the art of programming software, in many cases from scratch, as a performance for auditive and/or visual output. During these performances the code is projected for the audience to read along. In little time the performer has to write many lines of code in order for the music to be generated. All of the musical parameters are written in code and manipulated by the code while running in real time. During the performance code has to be written for many layers in the music, on micro level, for notes and timbre of instruments, and also on macro level, for chord progressions, tension in the music and rhythmic structures. Meanwhile the performer tries to “maintain enough variety to keep the audience engaged” (Collins 2011), with the risk that some might ﬁnd the music not up to their standards (Burland and McLean 2016). Given all this, a livecoding performance is a demanding task with a high cognitive load, “leading performers to rethink the design of their language interfaces” (McLean and Wiggins 2011). In this paper the live-coding environment Mercury is introduced. An interpreted language that is designed with the focus on quick and hands-on coding for live performances. Mercury provides the performer with a highly abstracted programming language for music and sound combined with visuals. The language is designed with two end-users in mind (Blackwell and Collins 2005). First and foremost the livecoder, but secondly also the audience. Firstly, the reader will be introduced to the general syntax of the environment, to get familiar with the basic principles of the code for better understanding all the examples throughout the paper. Secondly all design choices for the language, functions, interface and sound-design will be described based on the ﬁlosophy to provide the performer with a high abstracted language and keep transparency towards the audience. Concludingly ideas for future work will be discussed. 2 General syntax Mercury is an interpreted language, with a code structure similar to languages like javascript and ruby. The language is written as highly abstracted and uses the Max/MSP programming language for its audio engine and openGL visual engine. Every line of code is interpreted as a new line and it therefore does not need to be ended with a semicolon. The code is evaluated from top to bottom, and variables must be declared before the instantiation of a new instrument, if that instrument needs to use the variable. All functionalities are sorted in three categories. To create a list of values, the code is started with the command ring. A single variable is also created with this command, and is basically a list with only a single element. To produce sound a new instrument can be created, such as a sampler or synthesizer, with the command new. If a parameter from an instrument needs to be changed, the set command can be used. The entire code needs to be run in order to hear it take effect. This is done