Live Coding by Lee Cheng

Featured Artist/


Course Contents

Live coding is an emerging sonic performance and practice that emphasizes the expressive possibilities and the manipulation of sound afforded by computer programming. While computational thinking and algorithmic design have gradually become essential skills in the Digital Era, its application in live coding could help beginners and amateurs better understand sound practice through experiential learning. The proposed module in live coding aims to develop learners’ knowledge and skills of sound practice through live coding. It consists of 10 video lessons of 6 minutes each, using Sonic-Pi ( as the coding environment to deliver the teaching and learning content. Sonic-Pi is used rather than other more sophisticated live coding platform such as SuperCollider and Csound because it is simpler to use which could stimulate beginning learners to further their interest in this topic after finishing this course. The video lessons will be conducted in English. No prior knowledge of sound and music needed. Objectives of this module are:

- To introduce computer music and the use of live coding for sound/music-making purposes

- To develop learners’ knowledge and skills in live coding

- To widespread the practice of live coding for sound practices

Lesson Topic Teaching Content

1 What is Live Coding?

- Computer music - computer as a musical instrument

- Relationship between coding and sound/music-making

- Live coding environment(s)

2 Play & Sleep

- MIDI notes and the letter name conversion

- Concept of time within computer music

- Command line and syntax error

play | sleep | use_bpm

3 Synths

- Concept of synthesizer and its relationship with MIDI

- Difference sound sources


4 Loop

- Repetition as building blocks

- Concept of thread and its use in making music loops

- Creating different parts/tracks via looping

n.times | loop | live_loop

5 Algorithmic Composition

- Understanding algorithmic design

- Designing algorithm for conventional music practices


6 Sampling

- Difference between synthesizer and sampling

- Scratching of samples

sample | rate

7 Random - Use of random in algorithmic composition

choose | tick | rrand | scale

8 Audio Effect - Use of various audio effects

amp | with_fx | attack | decay | sustain | release

9 Variables & Patterns

- Defining and the use of variables

- Manipulation of data for patternmaking

= [] | == | each | if

10 Creating Soundscape - Combine the knowledge and skills learnt for sound making

- Create ambient sonic environment and soundscape

After finishing this module, learners should be able to create and perform sonic works depicting

various ambient sonic environments and soundscapes, and transfer the knowledge and skills learnt

for furthering their sound practices in other platforms and art forms.


Lee CHENG is an interdisciplinary artist-teacher and researcher. His research and artistic interest interdisciplinarize music, multi-media, technology, and education. His works have been featured as part of, amongst others, International Symposium on Electronic Art (ISEA), International Computer Music Conference (ICMC), World Stage Design, and Mana Contemporary Chicago; his research articles have been published by top-ranked journals including Technology, Pedagogy and Education, Journal of Knowledge Management, and Journal of Computer Assisted Learning. 

Cheng graduated from The University of Hong Kong with a Bachelor of Business Administration (Information Systems), a Bachelor of Engineering (Computer Science) and a Master of Law (Information Technology and Intellectual Property Law), and The Education University of Hong Kong with a Postgraduate Diploma in Education (Professional and Vocational Education) and Doctor of Philosophy (Interdisciplinary Studies – Technology in Music Education). He attained the London Trinity College LTCL for flute (Distinction) and LMusTCL (Distinction) in 2013 and 2011. He is currently working as Assistant Professor of the Department of Cultural and Creative Arts at The Education University of Hong Kong, also serving as the director of EdUHK iLOrk, a laptop orchestra and mobile device ensemble ( He is currently serving as Theory Examiner of the Associated Board of the Royal Schools of Music (ABRSM) and Convenor of the Music Technology Special Interest Group, International Society for Music Education (ISME).