Skip to main content
QUICK REVIEW

[Paper Review] Discovering novel computer music techniques by exploring the space of short computer programs

Ville-Matias Heikkilä|arXiv (Cornell University)|Dec 6, 2011
Music Technology and Sound StudiesComputer Science8 citations
TL;DR

This paper explores the generation of novel computer music techniques through the systematic exploration of extremely short C-like programs (3–10 lines) that output raw PCM audio. By leveraging bitwise operations, bit shifts, and modular arithmetic in simple expressions—such as 't & t>>8'—the authors discover unique timbres and musical structures, including Sierpinski harmonies and pitch-modulated melodies, demonstrating that minimal code can produce complex, musically coherent soundscapes.

ABSTRACT

Very short computer programs, sometimes consisting of as few as three arithmetic operations in an infinite loop, can generate data that sounds like music when output as raw PCM audio. The space of such programs was recently explored by dozens of individuals within various on-line communities. This paper discusses the programs resulting from this exploratory work and highlights some rather unusual methods they use for synthesizing sound and generating musical structure.

Motivation & Objective

  • To investigate the creative potential of extremely short computer programs in generating novel computer music techniques.
  • To identify and analyze unusual computational methods—particularly based on binary arithmetic—that produce musically interesting outputs.
  • To understand how simple expressions involving bit shifts, bitwise operations, and modular wrapping can generate complex musical structures and timbres.
  • To explore the role of chance and emergent behavior in discovering new algorithmic music concepts through community-driven experimentation.
  • To propose enhancements to the current exploration framework, including new programming paradigms and automated discovery tools.

Proposed method

  • The study analyzes a corpus of 71 short C programs from online communities, focusing on those that output raw 8-bit PCM audio at 8000 Hz.
  • The core method involves executing expressions of the form 'main(){int t=0; for(;;t++) putchar(EXPRESSION);}' where EXPRESSION uses only the time variable 't' and basic C operators.
  • Bitwise operations (AND, OR, XOR, NOT), bit shifts, and arithmetic operators are systematically analyzed for their musical effects.
  • The authors use visualizations and auditory analysis to interpret patterns in amplitude waveforms, such as Sierpinski triangle-like structures in 't & t>>8'.
  • Modular arithmetic and overflow behavior are examined as intentional design features, not artifacts, for creating percussive and timbral effects.
  • The study evaluates the effectiveness of RPN-based alternatives (e.g., GlitchMachine, libglitch) in enabling more expressive and reusable music generation.

Experimental results

Research questions

  • RQ1What kinds of musical structures and timbres can emerge from extremely short programs using only basic bitwise and arithmetic operations?
  • RQ2How do specific combinations of bit shifts and bitwise operations—such as 't & t>>8'—generate perceptually coherent melodies and harmonies?
  • RQ3To what extent can modular arithmetic and integer overflow be harnessed as creative tools in algorithmic music generation?
  • RQ4Why do certain expressions, such as 't * (42 & t>>10)', produce musically interesting pitch sequences despite their simplicity?
  • RQ5How can the current trial-and-error exploration model be improved through automated generation or enhanced programming paradigms?

Key findings

  • Expressions like 't & t>>8' produce Sierpinski triangle-like amplitude patterns and are perceived as multitonal melodies with octave-like intervals.
  • The 'Forty-Two Melody' expression 't * (42 & t>>10)' generates a repeating pitch sequence with a cycle length of 32, based on the binary pattern of 42.
  • Modifying the carrier frequency ratio, such as in '3*t & t>>8', shifts the harmonic alignment and produces non-octave intervals due to aliasing effects.
  • Modular wrapping and arithmetic overflow are not errors but essential tools: for example, '-1' applied to minimum amplitude values creates percussive transients.
  • Long bit shifts (e.g., 't>>6 ^ t>>8 | t>>12 | t') enable macro-level musical structure, such as repeating melodic motifs, analogous to traditional forms like the 12-bar blues.
  • The expression '(t>>10 ^ t>>10 - 2) % 11' generates a 16-note pitch sequence with a repeating pattern that includes intervals like C, G, and C, forming a recognizable musical phrase.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.