Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
music written in the C programming language
C Perl Shell
Branch: master
Failed to load latest commit information.
essay + reference to viznut's arxiv paper
2-6-2-7-2-8 * slow melodies
3-6-3-7-3-8 * slow melodies
4-512-s-11-63 + some quite hectic tracks
512-3s-18-4s-27 + some quite hectic tracks
512-3s-4s-512 + some quite hectic tracks
512-3s-4t-9 + some quite hectic tracks
512-3s-512-4s + some quite hectic tracks
6-3-4-7-2 + a bunch of mostly slow songs
6-7-2-4-8-2-4-7-8-9 + a bunch of mostly slow songs
6-7-8-4-5-2-8-4 + a bunch of mostly slow songs
6-7-8-4-5-4-7-3 + a bunch of mostly slow songs
6-7-8-4-5-4-8-4 + a bunch of mostly slow songs
6-8-4-4-7-3-2-6-2 * slow melodies
7-4-8-3 + a bunch of mostly slow songs
8-4-6-2 + a bunch of mostly slow songs
8-5-2-6-4-3-4-3-4 + braces
PC-10 * sound reminiscent of PC-10 startup sound
README README contained wrong sox invocation
alarm + simple beeping noise
almost-pacman + almost-pacman by bdwheele
beat-%60-r40 + boing beep
beat-r6*6 + beats using different operators
beat-r7%160 + beats using different operators
beat-r8&23 + beats using different operators
beat-r9^13 + beats using different operators
crowd + <xentrac> so I showed off ((t<<1)^((t<<1)+(t>>7)&t>>12))|t>>(4-(1^7…
du-dup + hectic background melody
emergency + sadly, not quite the emergency theme from “The IT Crowd”
fefe-6-6-6 * no longer divides by zero
fefe-9-11 + songs inspired by libowfat and tinyldap
flatline-8-11-11-11-16 * fix for type issue (division yields double where integer is needed)
flatline-8-11-16 + basic flatline effect and enhanced version of the same
hotline-3-6-8-11-3-11 + hotline soft pop
hotline-3-8-8-8-11-7-11 + hotline soft pop
it-crowd * even smaller it crowd intro
kübelwagen + kübelwagen by tv, see <https://github.com/krebscode/painload/tree/m…
l2 + generators shifting bits to the left
l3 + generators shifting bits to the left
l4 + generators shifting bits to the left
l5 + generators shifting bits to the left
l6 + generators shifting bits to the left
makefile * higher bitrate for vorbis
mortal-kombat + music reminiscent of the mortal combat theme
noise-airplane + noise effects
noise-creepy + noise effects
noise-s-8 + noise effects
play + math
plot - removes height option from plot tool
quatsi-11-8-7 + another song reminiscent of the quatsi trilogy
quatsi-8-7 + music reminiscent of the quatsi trilogy
quatsi-9-7 + music reminiscent of the quatsi trilogy
r10 + generators shifting bits to the right
r11 + generators shifting bits to the right
r12 + generators shifting bits to the right
r7 + generators shifting bits to the right
r8 + generators shifting bits to the right
r9 + generators shifting bits to the right
rolling * transliteration of madgarden's “rolling”
sawtooth + sawtooth wave
sig.c + viznut's old sig from the 90s
sine + sawtooth, sine, square, triangle waveforms
sine-nomath + sine wave without math headers, an idea from xentrac
square * better square waveform
symmetries + symmetries by h0uz3
triangle + sawtooth, sine, square, triangle waveforms
visualizer.c + viznut's visualizer
wraparound-disco * constant beat in wraparound-disco

README

This is a collection of minimal programs for sound synthesis, written in C. They are using techniques explained in <http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html> and the followup discussions at <http://news.ycombinator.com/item?id=3063359> and <http://www.reddit.com/r/programming/comments/kyj77/algorithmic_symphonies_from_one_line_of_code_how/
>.

To compile the demo program and listen to its output, do:
    g++ ./munching-squares.c -o munching-squares
    ./munching-squares | sox -c 1 -e unsigned-integer -r 8000 -t u8 - -d --buffer 32

To generate a C program for any formula and play it immediately:
    ./play $FILENAME
Something went wrong with that request. Please try again.