diff options
author | C.K. Rooke <ckrooke@cro.wtf> | 2023-12-10 02:49:28 +0000 |
---|---|---|
committer | C.K. Rooke <ckrooke@cro.wtf> | 2023-12-10 02:49:28 +0000 |
commit | 1504f1ae2f1bc5005881ba80f51397320c8eaced (patch) | |
tree | f8c1e1d334ffbe66ddde146bddfd8072df80e3b5 |
-rwxr-xr-x | deploy.sh | 4 | ||||
-rw-r--r-- | exp/practool.html | 18 | ||||
-rw-r--r-- | exp/practool.js | 20 | ||||
-rw-r--r-- | index.html | 19 | ||||
-rw-r--r-- | style.css | 7 |
5 files changed, 68 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..4e39a65 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/sh +TARGET=${1:-"ckrooke@cro.wtf"} +RSYNC="rsync -tav --rsync-path=openrsync" +$RSYNC ./ $TARGET:pub/www diff --git a/exp/practool.html b/exp/practool.html new file mode 100644 index 0000000..3317e5e --- /dev/null +++ b/exp/practool.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <meta charset="utf-8"/> + <link rel="stylesheet" href="../style.css"> + <title>practice session tools</title> + </head> + <body> + <h1>practice session tools</h1> + <noscript><h2><i>(this website requires javascript)</i></h2></noscript> + <h2>random scale</h2> + <p id="scale"></p> + <button id="scale_btn">gen</button> + <script src="practool.js"></script> + <p><i>(<a href="..">../</a>)</i></p> + </body> +</html> diff --git a/exp/practool.js b/exp/practool.js new file mode 100644 index 0000000..782b992 --- /dev/null +++ b/exp/practool.js @@ -0,0 +1,20 @@ +let body = document.body; +let doc = {}; +body.querySelectorAll('[id]').forEach(e => doc[e.id] = e); + +let rand = x => Math.floor(Math.random() * x); +let arand = a => a[rand(a.length)] + +let roots = [ + "A", "B", "C", "D", "E", "F", "G", + "A#", "C#", "D#", "F#", "G#", + "Ab", "Bb", "Db", "Eb", "Gb", +]; +let modes = [ + "major", + "natural minor", "harmonic minor", "melodic minor", +]; +let random_scale = () => `${arand(roots)} ${arand(modes)}`; + +doc.scale_btn.onclick = () => doc.scale.innerHTML = random_scale(); +doc.scale_btn.onclick(); diff --git a/index.html b/index.html new file mode 100644 index 0000000..39b69d2 --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <meta charset="utf-8"/> + <link rel="stylesheet" href="style.css"> + <title>c.k. rooke</title> + </head> + <body> + <h1>c.k. rooke</h1> + <p>pianist based in cardiff, uk</p> + <ul> + <li><a href="./log">web log</a></li> + <li><a href="./exp">experimental</a></li> + <li><a href="mailto:ckrooke@cro.wtf">email (hire me?)</a></li> + </ul> + <i>(<a href="..">../</a>)</i> + </body> +</html> diff --git a/style.css b/style.css new file mode 100644 index 0000000..3169bce --- /dev/null +++ b/style.css @@ -0,0 +1,7 @@ +body { + background: antiquewhite; + font-family: monospace; + font-size: 1.2em; + margin: 2em auto; + max-width: 30em; +} |