https://github.com/mnvr/gm1k
Generative music in 410 bytes of Javascript, and a song using Euclidean rhythms
https://github.com/mnvr/gm1k
audio bytebeat genuary2024 javascript music webaudio
Last synced: about 1 month ago
JSON representation
Generative music in 410 bytes of Javascript, and a song using Euclidean rhythms
- Host: GitHub
- URL: https://github.com/mnvr/gm1k
- Owner: mnvr
- License: mit
- Created: 2024-01-14T17:52:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-31T10:47:05.000Z (over 1 year ago)
- Last Synced: 2025-04-02T04:43:39.412Z (about 2 months ago)
- Topics: audio, bytebeat, genuary2024, javascript, music, webaudio
- Language: HTML
- Homepage: https://mnvr.github.io/gm1k/
- Size: 31.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains two pieces of music using plain JS:
- *410*
- *Cycling with Euclid*## 410 - Generative music in 410 bytes of Javascript
The prompt for day 14 of Genuary 2024 was to produce a generative piece that
uses less than 1K of source code. This one uses standard browser audio APIs to
produce a soundscape.Live version is at https://mnvr.github.io/gm1k.
Source code for the demo is in [index.html](index.html) – it is a standalone,
410 character, HTML file. The song it plays is a remix of _Sierpinski Harmony_
by viznut (the creator of bytebeat).See [x](x) for a longer version with more comments and explanations.
## Cycling with Euclid – A song in E(3, 8)
The prompt for day 31 of Genuary 2024 was to produce a generative piece of
music. I made a neverending song using only HTML/JS/CSS without using any
dependencies or libraries. While code size was not a concern, the resulting
files is just 250 lines too.Live version is at https://mnvr.github.io/gm1k/e.
Source code is in [e/index.html](e/index.html) – a standalone HTML file (you can
just open it in your browser and play it directly too). The song it plays is a
composition using Euclidean rhythms. The bassline and the trill rhythms are
`E(3,8)` and `E(7, 8)`, around which totters around the main Euclidean rhythm
that cycles through `E(3,4)` to `E(11, 12)`.I also wrote a tutorial about [Euclidean rhythms](https://mrmr.io/mj/euclid)
that explains the code behind the song.## Postscript
Rest of my (visual) Genuary 2024 artworks are at
[mrmr.io/gen24](https://mrmr.io/gen24).