Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr committed Jan 31, 2024
1 parent 5214364 commit f58ad39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
This repository contains two pieces of music using plain JS - *410*, and *Cycling
with Euclid*.
This repository contains two pieces of music using plain JS:

---
- *410*
- *Cycling with Euclid*

### 410 - Generative music in 410 bytes of Javascript
## 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
Expand All @@ -17,9 +17,7 @@ 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)
## 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
Expand All @@ -37,7 +35,7 @@ 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).
9 changes: 4 additions & 5 deletions e/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<style>
:root {
background-color: rgb(10, 10, 10);
color: tomato;
}

body {
Expand Down Expand Up @@ -72,7 +71,7 @@
</style>

<div class="container">
<div class="beats" id="beats-1">
<div class="beats">
<div id="b11"></div>
<div id="b12"></div>
<div id="b13"></div>
Expand All @@ -82,7 +81,7 @@
<div id="b17"></div>
<div id="b18"></div>
</div>
<div class="beats" id="beats-2">
<div class="beats">
<div id="b21"></div>
<div id="b22"></div>
<div id="b23"></div>
Expand All @@ -96,7 +95,7 @@
<div id="b211" class="oob"></div>
<div id="b212" class="oob"></div>
</div>
<div class="beats" id="beats-3">
<div class="beats">
<div id="b31"></div>
<div id="b32"></div>
<div id="b33"></div>
Expand Down Expand Up @@ -143,7 +142,7 @@

/* Unlike *410*, this song doesn't continue playing in the
background in Safari when you switch tabs since Safari throttles
setInterval and co) */
setInterval and co */

let context; /* Audio context */
let intervalID; /* The setInterval ID, set if we're playing */
Expand Down

0 comments on commit f58ad39

Please sign in to comment.