-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.haml
288 lines (286 loc) · 18.9 KB
/
index.haml
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
!!! 5
%html{:lang=>"en"}
%head
%title METRONOME
%meta{:charset=>"utf-8"}
%meta{ :name=>"viewport", :content=>"width=device-width, initial-scale=1.0"}
%meta{ :name=>"keywords", :content=>"metronome, online, browser, web audio api, odd rhythms, polyrhythm, multirhythm, rhythmic metronome, odd meters" }
%meta{:name=>"description", :content=>"an audio-visual metronome for normal and odd meters"}
%meta{:name=>"author", :content=>"christian woerner"}
%meta{:name=>"author", :content=>"christian wörner" }
%meta{:name=>"author", :content=>"ernst modersohn" }
%script{:type=>"text/javascript", :src=>"/javascripts/vendor/jquery-1.7.2.min.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/vendor/bootstrap-modal.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/handlers.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/rhythmViewPort.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/audio_graph.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/drums.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/metronome.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/audio.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/rhythmEditor.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/utils.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/init.js"}
%script{:type=>"text/javascript", :src=>"/javascripts/makams.js"}
%link{:id=>"favicon", :rel=>"shortcut icon", :href=>"/favicon.ico"}
%link{:href=>"/stylesheets/bootstrap-responsive.min.css", :rel=>"stylesheet"}
%link{:href=>"/stylesheets/bootstrap.min.css", :rel=>"stylesheet"}
%link{:rel=>"stylesheet", :href=>"/stylesheets/metro.css", :type=>"text/css"}
%body{:id=>"body"}
%div{:class=>"navbar navbar-inverse navbar-fixed-top"}
%div{:class=>"navbar-inner", :id=>"main_nav"}
%div{:class=>"container", :id=>"main_nav_container"}
%button{:type=>"button", :class=>"btn btn-navbar", :data => {:toggle=>"collapse", :target=>".nav-collapse"}}
%span{:class=>"icon-bar"}
%a{:class=>"brand", :href=>"/"} Metronome
#nav2
%ul
%li
%a{:href=>"javascript:void", :id=>"featured_rhythm", :data => {:spec => "/#speed=102/meter=_***_-***-_"}}
Featured Rhythm
%li
%a{:data => {:toggle=>"modal"}, :href=>"#aboutContainer", :id=>"openSaveMeterModal"}
About
%li
%a{:data => {:toggle=>"modal"}, :href=>"#saveMeterContainer", :id=>"openSaveMeterModal"}
Save Meter
%div{:class=>"nav-collapse collapse"}
%ul{:class=>"nav"}
%li{:class=>""}
%button{:id=>"playButton", :class=>"btn btn-danger play_btn", :title=>"keyboard: [space]"}
Play
%span.ff_btn
[Spacebar]
%li{:class=>""}
%button{:data => {:toggle=>"modal"}, :href=>"#controlsContainer", :class=>"btn btn-small"} Show controls
%li{:class=>""}
%button{:data => {:toggle=>"modal"}, :id=>"unhideNewRhythmButton", :href=>"#rhythmEditorContainer", :class=>"btn btn-small"} Modify Rhythm
%li{:class=>""}
%button{:id=>"randomSpeedButton", :class=>"btn btn-small"} Random speed
%li{:class => "speedMonitorCont"}
%span{:class => "speedMonitor Monitor", :title=>"keyboard: left/right arrow"}120.0
%span{:id=>"speedMonitorUnit", :title=>"keyboard: left/right arrow", :class=>"Monitor"} BPM
%li
%span{:id=>"analyzedRhythmMonitor", :class=>"Monitor"}
%div{:class=>"container"}
%div{:class=>"nav-collapse collapse"}
%ul{:class=>"left_nav"}
%li
%img{:id=>"audioOnOff", :class=>"onOffPic",
:title=>"switch audio metronome on and off: keyboard: 'a'",
:data => {:onSrc=>"pics/ear_strong_black.png",
:offSrc=>"pics/ear_strong_grey.png",
:name=>"audio"},
:src=>"pics/ear_strong_black.png"}
%li
%img{:id=>"visualOnOff", :class=>"onOffPic",
:title=>"switch visual metronome on and off: keyboard 'v'",
:data => {:onSrc=>"pics/auge_black.png",
:offSrc=>"pics/auge_grey.png",
:name=>"visual"},
:src=>"pics/auge_black.png"}
%li
%img{:id=>"visualSequenceOnOff", :class=>"onOffPic",
:title=>"switch visual sequence on and off: keyboard 's'",
:data => {:onSrc=>"pics/auge_sequence_black.png",
:offSrc=>"pics/auge_sequence_grey.png",
:name=>"visualSequence"},
:src=>"pics/auge_sequence_black.png"}
%li
%img{:id=>"visualFullscreenOnOff", :class=>"onOffPic",
:title=>"switch background visual on and off: keyboard: 'f' (fullscreen)",
:data => {:onSrc=>"pics/auge_frame_black.png",
:offSrc=>"pics/auge_frame_grey.png",
:name=>"visualFullscreen"},
:src=>"pics/auge_frame_grey.png"}
%li
%img{:id=>"vis_switcher", :src=>"pics/metronome_circle_of_circles_black.png", :class=>"onOffPic",
:title => "switch between circle and linear display mode: keyboard: 'c'"}
%li
%img{:id=>"vis_prop_switcher", :src=>"pics/metronome_proportional_black.png", :class=>"onOffPic",
:title => "switch between proportional and un-proportional display: keyboard: 'p'"}
%li
%select{:id=>"drone_select", :disabled=>"disabled"}
%option{:id=>"null", :value=>"null"}
None
%option{:id=>"drone_c"}
C
%option{:id=>"drone_c_sharp"}
C#
%option{:id=>"drone_d_flat", :value=>"Db"}
Db
%option{:id=>"drone_d"}
D
%option{:id=>"drone_d_sharp"}
D#
%option{:id=>"drone_e_flat"}
Eb
%option{:id=>"drone_e"}
E
%option{:id=>"drone_f"}
F
%option{:id=>"drone_f_sharp"}
F#
%option{:id=>"drone_g_flat"}
Gb
%option{:id=>"drone_g"}
G
%option{:id=>"drone_g_sharp"}
G#
%option{:id=>"drone_a_flat"}
Ab
%option{:id=>"drone_a"}
A
%option{:id=>"drone_b_flat"}
Bb
%option{:id=>"drone_b"}
B
%div{:class=>"hero-unit"}
%div{:id=>"rhythmViewPort", :style=>"position:relative;min-height:300px;"}
//%span{:id=>"meter", :style=>'background-color:#888888;position:absolute;'}
%span{:id=>"one", :style=>'background-color:#BB9999;position:absolute;'}
%span{:id=>"two", :style=>"background-color:#8888BB;position:absolute;"}
%span{:id=>"three", :style=>"background-color:#AAAA11;position:absolute;"}
%span{:id=>"four", :style=>'background-color:#7788FF;position:absolute;'}
%br
%div{:class=>"container"}
%span{:id=>"links_list_toggler"}
links
%p{:id=>"links_list", :style=>"display:none"}
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*-/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">Niska - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*-/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=261/meter=_**-**_*/pulse=0.1/bell=0.2/drone=D/drone_vol=0.6/">Bojan - https://metronome.zanstaen.org/#speed=261/meter=_**-**_*/pulse=0.1/bell=0.2/drone=D/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=210/meter=_**-**_*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">Sorin - https://metronome.zanstaen.org/#speed=210/meter=_**-**_*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=180/meter=_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">Piazza marina - https://metronome.zanstaen.org/#speed=180/meter=_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=180/meter=_*-_*-*/pulse=0.1/bell=0.2/drone_seq=C_2_C#_1_C_1/drone_vol=0.6/">Piazza marina (with mod) - https://metronome.zanstaen.org/#speed=180/meter=_*-_*-*/pulse=0.1/bell=0.2/drone_seq=C_2_C#_1_C_1/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*_-*/pulse=0.1/bell=0.2/drone_seq=random_32/drone_vol=0.6/">Rachenitsa - random drone - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*_-*/pulse=0.1/bell=0.2/drone_seq=random_32/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*--*/pulse=0.1/bell=0.2/drone_seq=random_24/drone_vol=0.6/">Karsilamas - random drone - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*--*/pulse=0.1/bell=0.2/drone_seq=random_24/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*--*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">Karsilamas - drone in C - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*--*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_16/drone_vol=0.6/">Kopanitsa - random drone - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_16/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">Kopanitsa - drone in C - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/speed_prog=12*1.01/">accellerating kopanitsa - drone in C - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/speed_prog=12*1.01/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">buchimish - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*_*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*_*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_10_C_D_Eb_E_F_G_A_Bb/drone_vol=0.6/">buchimish for Bb - https://metronome.zanstaen.org/#speed=280/meter=_*-*_*-*_*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_10_C_D_Eb_E_F_G_A_Bb/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=300/meter=_*-*_*-*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/">postupano - https://metronome.zanstaen.org/#speed=300/meter=_*-*_*-*-_*-*/pulse=0.1/bell=0.2/drone=C/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=300/meter=_*-*_*-*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_10_C_D_Eb_E_F_G_A_Bb/drone_vol=0.6/">postupano for Bb - https://metronome.zanstaen.org/#speed=300/meter=_*-*_*-*-_*-*/pulse=0.1/bell=0.2/drone_seq=random_10_C_D_Eb_E_F_G_A_Bb/drone_vol=0.6/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/">Plain Aksak - https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/speed_prog=4*1.02/">Accellerating Aksak - https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/speed_prog=4*1.02/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/speed_prog=12*0.99/">Slowing Aksak - https://metronome.zanstaen.org/#speed=140/meter=_**-*_*-**/pulse=0.1/bell=0.2/speed_prog=12*0.99/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=130/meter=_**-*/pulse=0.1/bell=0.2/">Slow Zagorisios 3 2 - https://metronome.zanstaen.org/#speed=130/meter=_**-*/pulse=0.1/bell=0.2/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=130/meter=_*-**/pulse=0.1/bell=0.2/">Slow Zagorisios 2 3 - https://metronome.zanstaen.org/#speed=130/meter=_*-**/pulse=0.1/bell=0.2/</a><br/>
<a href="https://metronome.zanstaen.org/#speed=130/meter=_*-*_*/pulse=0.1/bell=0.2/speed_prog=4*rand_minmaxfactor_0.9-1.2">Tsamikos with random gradual speed changes - https://metronome.zanstaen.org/#speed=130/meter=_*-*_*/pulse=0.1/bell=0.2/speed_prog=4*rand_minmaxfactor_0.9-1.2</a><br/>
<a href="https://metronome.zanstaen.org/#speed=200/meter=_*-_*-_-*_*-/pulse=0.1/bell=0.2/speed_prog=4*rand_minmax_150-250">Zonaradikos with random jumpy speed changes within minmax band - https://metronome.zanstaen.org/#speed=200/meter=_*-_*-_-*_*-/pulse=0.1/bell=0.2/speed_prog=4*rand_minmax_150-250</a><br/>
%div{:class=>"container", :id=>"makams_container"}
%span{:id=>"makams_list_toggler"}
makams
%div{:id=>"makams_list", :style=>"display:none"}
%div{:id=>"rhythmEditorContainer", :class=>"modal hide fade in modalPanelContainer", :style=>"display:none;"}
%div{:id=>"newRhythm", :class=>"modalPanel"}
%div.modal-header
%h4 Number of Items
%span{:id=>"newRhythmLengthMonitor", :class=>"Monitor"}
%input{:id=>"newRhythmLengthSlider", :min=>"1", :max=>"30", :step=>"1", :value=>"4", :type=>"range"}
%div.modal-body
%h4
Timeline
%div{:id=>"rhythmEditor"}
%p.tips
TIP: click on the circles to change instrument
// filled by JavaScript
%div.modal-footer
%button{:id=>"saveNewRhythmButton", :class=>"btn btn-small", :data => {:dismiss=>"modal"}} Save New Rhythm
%button{:id=>"hideNewRhythmButton", :class=>"btn btn-small", :data => {:dismiss=>"modal"}} hide rhythm editor
%div{:id=>"controlsContainer", :class=>"modal hide fade in modalPanelContainer", :style=>"display:none;"}
%div{:id=>"controls" , :class=>"modalPanel"}
%div.modal-header
Controls
%div.modal-body
%h4 bpm
%table{:class=>"broad"}
%tr>
%td{:id=>"speedslider_cell"}
%input{:id=>"speedSlider", :min=>"20", :max=>"700", :step=>"0.1",
:value=>"120", :type=>"range", :title=>"keyboard: left/right arrow"}
%td{:id=>"speedmonitor_cell"}
%span{:class => "speedMonitor Monitor"} 120.0
%hr
%h4 Volume
%table{:class=>"broad"}
%tr
%td
Master
%input{:type=>"range", :name=>"masterVol" , :class=>"volVertical", :rel=>"master",
:min=>"0", :max=>"2", :step=>"0.01", :value=>"1", :orient=>"vertical"}
%br
%span{:id=>"masterVolMonitor", :class=>"Monitor"} 0.2
%td
Kick / Low
%input{:type=>"range", :name=>"kickVol" , :class=>"volVertical", :rel=>"kick",
:min=>"0", :max=>"1.2", :step=>"0.01", :value=>"1", :orient=>"vertical"}
%br
%span{:id=>"kickVolMonitor" , :class=>"Monitor"} 1.0
%td
Snare / Medium
%input{:type=>"range", :name=>"snareVol", :class=>"volVertical", :rel=>"snare",
:min=>"0", :max=>"1.2", :step=>"0.01", :value=>"1", :orient=>"vertical"}
%br
%span{:id=>"snareVolMonitor" , :class=>"Monitor"}1.0
%td
Hihat / High
%input{:type=>"range", :id=>"pulse_slider", :name=>"hihatVol", :class=>"volVertical", :rel=>"hihat",
:min=>"0", :max=>"1.2", :step=>"0.01", :value=>"1", :orient=>"vertical"}
%br
%span{:id=>"hihatVolMonitor" , :class=>"Monitor"} 1.0
%td
Tambourine / bell (cycle start)
%input{:type=>"range", :id=>"bell_slider", :name=>"bellVol", :class=>"volVertical", :rel=>"bell",
:min=>"0", :max=>"2.5", :step=>"0.01", :value=>"0.1", :orient=>"vertical"}
%br
%span{:id=>"bellVolMonitor" , :class=>"Monitor"} 1.0
%div.modal-footer
%a{:href=>"#", :class=>"btn", :data => {:dismiss=>"modal"}} Close
%div{:id=>"saveMeterContainer", :class=>"modal hide fade in modalPanelContainer", :style=>"display:none;"}
%div{:id=>"newRhythm", :class=>"modalPanel"}
%div.modal-header
%h4 Save the current Meter
%div.modal-body
bookmark the page or save this url:
%br
%input{:type=>"text", :id=>"shareUrlInput", :style=>"width: 100%;font-size:1.2em;height:2em;"}
%div.modal-footer
%a{:href=>"#", :class=>"btn", :data => {:dismiss=>"modal"}} Ok
%div{:id=>"aboutContainer", :class=>"modal hide fade in modalPanelContainer", :style=>"display:none;"}
%div{:id=>"newRhythm", :class=>"modalPanel"}
%div.modal-header
%h3 Metronome
%div{:class=>"modal-body", :id=>"about-body"}
%h4 About
%p
%em
Metronome
is a online metronome with the following features: speed control, volume control, free choice of rhythms,
acoustic, visual or audio-visual mode, drones, automation for speed and drones, keyboard control.
See the links section for automation examples.
Automation is done from the URL (drone_seq, speed_prog, etc.)
%p
NB:
%em
Metronome
uses the
%a{:href=>"https://www.w3.org/TR/webaudio/"}
Web Audio API
for audio generation.
%br
%h4 Github repository
%p
%em Metronome
is free and open source. The source code is available on
%a{:href=>"https://github.com/kr1/metronome"}
GitHub
%hr
%footer
© Zanstaën -
%a{:href=>"https://soundcloud.com/mo3b1us"} Elea
&
%a{:href=>"https://soundcloud.com/ernst-modersohn"} Ernst Modersohn
&
%a{:href=>"https://soundcloud.com/p1ngan"} Xenophyton
2013-2023