edo.js
Version:
A set of functions for manipulating musical pitches within a given EDO
25 lines (21 loc) • 817 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js" integrity="sha256-TabprKdeNXbSesCWLMrcbWSDzUhpAdcNPe5Q53rn9Yg=" crossorigin="anonymous"></script>
<script src="scripts/edo.js"></script>
</head>
<body>
<div id="container" style="width:100%; margin:0 auto; "></div>
</body>
<script>
let edo = new EDO(12) //Create a tuning context
let scale = edo.scale([0,2,4,5,7,9,11]) //define new scale
let trichords = scale.get.n_chords(3)
for(let trichord of trichords) {
let paper = edo.make_DOM_svg('container',200,200,false).paper
edo.show.necklace({paper:paper,pitches:trichord,node_radius:15,string_width:3})
}
</script>
</html>