-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (104 loc) · 6.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!-- set up html and setup style and javascript files-->
<!DOCTYPE html>
<html>
<head>
<title>Seq1</title>
<link rel="stylesheet" href="style/sytle.css">
<!-- Import p5.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"></script>
<!-- LOAD D3.js from jsdelivr -->
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
<!-- Import Poppins Font-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;500;600;700;900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
</head>
<body>
<div id="title-wrapper">
<div id="site-title">seq1</div>
<div id="site-description">step sequencer and oscillator<br>
<span> <a href="/rnbo-step-sequencer/README.md" target="_blank" class='site-links'>ReadMe.md</a>
<a href="https://github.com/krismakesstuff/rnbo-step-sequencer?tab=readme-ov-file" target="_blank" class='site-links'>github repo</a>
<a href="https://www.youtube.com/watch?v=VdBxwLx5CV4&ab_channel=krismakesmusic" target="_blank" class='site-links'>demo video</a></span>
</div>
</div>
<div id="sequencer-wrapper">
<div id="seq-labels">
</div>
<!-- app.js will insert sequencer grid here -->
</div>
<div id="sequencer-controls">
<button id="playButton" onclick="togglePlay(this)">Play</button>
<button id="clearSequencerButton" onclick="clearSequencer(this)">Clear Sequencer</button>
<label for="rateSlider" class="playback-control-label">sample play rate:</label>
<input type="range" class="playback-slider" id="rateSlider" value="1.0" min="0.1" max="3" step="0.1" oninput="updateRate(this.value)">
<label for="tempoSlider" class="playback-control-label">tempo:</label>
<input type="range" class="playback-slider" id="tempoSlider" value="100" min="1" max="300" step="1" oninput="updateTempo(this.value)">
<label for="direction-select" class="playback-control-label">direction:</label>
<div class="custom-select">
<select name="direction" id="direction-select" onchange="changeDirection(this.value)">
<option value="up">up</option>
<option value="down">down</option>
<option value="updown">up/down</option>
</select>
</div>
<label for="out-gain" class="playback-control-label"> Output</label>
<input type=range class="playback-slider" id="out-gain" value="0.5" min="0" max="1" step="0.01" oninput="updateOutGain(this.value)">
</div>
<div id="osc-wrapper">
<div id="osc-title">OSC</div>
<div id="osc-controls">
<label for="attackSlider">attack:</label>
<input type="range" class="osc-slider" id="attackSlider" value="10" min="1" max="200" step="0.01" oninput="updateAttack(this.value)">
<label for="decaySlider">decay:</label>
<input type="range" class="osc-slider" id="decaySlider" value="10" min="1" max="200" step="0.01" oninput="updateDecay(this.value)">
<label for="noteLengthSlider">note length:</label>
<input type="range" class="osc-slider" id="noteLengthSlider" value="150" min="2" max="200" step="0.01" oninput="updateNoteLength(this.value)">
<label for="sustainSlider">sustain:</label>
<input type="range" class="osc-slider" id="sustainSlider" value="0.5" min="0" max="1.0" step="0.01" oninput="updateSustain(this.value)">
<label for="releaseSlider">release:</label>
<input type="range" class="osc-slider" id="releaseSlider" value="200" min="1" max="1000" step="0.01" oninput="updateRelease(this.value)">
<label for="osc1-freq-slider">osc1 freq:</label>
<input type="range" class="osc-slider" id="osc1-freq-slider" value="100" min="50" max="1000" step="1" oninput="updateOsc1Freq(this.value)">
<label for="osc2-freq-slider">osc2 freq:</label>
<input type="range" class="osc-slider" id="osc2-freq-slider" value="100" min="50" max="1000" step="1" oninput="updateOsc2Freq(this.value)">
<label for="osc3-freq-slider">osc3 freq:</label>
<input type="range" class="osc-slider" id="osc3-freq-slider" value="100" min="50" max="1000" step="1" oninput="updateOsc3Freq(this.value)">
<label for="osc4-freq-slider">osc4 freq:</label>
<input type="range" class="osc-slider" id="osc4-freq-slider" value="100" min="50" max="1000" step="1" oninput="updateOsc4Freq(this.value)">
<label for="osc-filter-cutoff-slider">filter cutoff:</label>
<input type="range" class="osc-slider" id="osc-filter-cutoff-slider" value="8000" min="20" max="10000" step="1" oninput="updateFilterCutoff(this.value)">
<label for="osc1-freq-diff-slider">osc1 freq diff:</label>
<input type="range" class="osc-slider" id="osc1-freq-diff-slider" value="0.1" min="0" max="0.3" step="0.01" oninput="updateOsc1FreqDiff(this.value)">
<label for="osc2-freq-diff-slider">osc2 freq diff:</label>
<input type="range" class="osc-slider" id="osc2-freq-diff-slider" value="0.1" min="0" max="0.3" step="0.01" oninput="updateOsc2FreqDiff(this.value)">
<label for="osc3-freq-diff-slider">osc3 freq diff:</label>
<input type="range" class="osc-slider" id="osc3-freq-diff-slider" value="0.1" min="0" max="0.3" step="0.01" oninput="updateOsc3FreqDiff(this.value)">
<label for="osc4-freq-diff-slider">osc4 freq diff:</label>
<input type="range" class="osc-slider" id="osc4-freq-diff-slider" value="0.1" min="0" max="0.3" step="0.01" oninput="updateOsc4FreqDiff(this.value)">
</div>
</div>
<div id="canvas-title">
<h2>Canvas</h2>
<p id="canvas-help-text">Click and drag to draw a line on the canvas. The line will modulate the selected parameter.</p>
</div>
<div id="p5-canvas-wrapper">
<div id="p5-canvas">
<!-- p5 will insert a canvas here -->
</div>
</div>
<div id="osc1-canvas-wrapper">
<div id="osc1-canvas">
<!-- p5 will insert a canvas here -->
</div>
</div>
<!-- Import rnbo-helpers.js -->
<script type="text/javascript" src="js/rnbo-helpers.js"></script>
<!-- Import app.js -->
<script type="text/javascript" src="js/app.js"></script>
<!-- Import xyCanvas.js -->
<script type="text/javascript" src="js/xyCanvas.js"></script>
<!-- Import sequencer-patterns -->
<script type="text/javascript" src="js/sequencer-patterns.js"></script>
</body>
</html>