This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaudiolizer.yaml
503 lines (488 loc) · 12 KB
/
audiolizer.yaml
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
import:
dcc: dash_core_components
html: dash_html_components
daq: dash_daq
dac: dash_audio_components
dbc: dash_bootstrap_components
app:
jupyter_dash.JupyterDash:
external_stylesheets:
- https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css
- https://codepen.io/chriddyp/pen/bWLwgP.css
# - https://cdn.clarkhacks.com/OpenDyslexic/v3/OpenDyslexic.css
title: Market Audiolizer
suppress_callback_exceptions: True
A0: 1.4393326938302626 # low A (log10)
C3: 2.116650241674698
C5: 2.7187101500034196
C8: 3.6217992240026677 # high C (log10)
run_server:
host: '0.0.0.0'
port: 8050
extra_files:
- audiolizer.yaml
debug: True
dev_tools_hot_reload: False
nav:
dbc.Navbar:
color: dark
children:
- html.A:
children:
- dbc.Row:
align: center
justify: between
children:
- dbc.Col:
width: 4
children:
- html.Img:
id: logo
src: https://github.com/asherp/audiolizer/raw/master/docs/assets/audiolizer_icon.jpg
height: 35px
- dbc.Col:
width: 4
children:
- dbc.NavbarBrand:
children:
html.H6: How It Works
# className: ml-3
href: https://asherp.github.io/audiolizer/About/
dark: True
player_settings:
- dbc.Col:
width: 5
children:
- html.H2: Market Audiolizer
- dcc.Loading:
id: loading
type: default
children:
- html.Div:
id: loading-output
children: loading output
- dbc.Col:
width:
xs: 12
sm: 12
md: 12
lg: 4
xl: 4
children:
- dbc.Row:
children:
- dbc.Col:
width: 12
children:
- dac.DashAudioComponents:
id: audio_player
src: output.wav
autoPlay: True
controls: True
- dbc.Col:
width: 12
children:
- html.A:
id: midi_download
children: Download MIDI
href: ''
download: ''
- dbc.Col:
width:
xs: 12
sm: 12
md: 12
lg: 3
xl: 3
children:
# - html.H4: Cache settings
# - dbc.Row:
# children:
# - dbc.Col:
# width: 4
# children:
# - daq.NumericInput:
# id: price_threshold
# max: 50
# value: 10
# label: price [Mb]
# labelPosition: bottom
# - dbc.Col:
# width: 4
# children:
# - daq.NumericInput:
# id: wav_threshold
# max: 50
# value: 10
# label: wav [Mb]
# labelPosition: bottom
# - dbc.Col:
# width: 4
# children:
# - daq.NumericInput:
# id: midi_threshold
# max: 50
# value: 10
# label: midi [Mb]
# labelPosition: bottom
date_settings:
- dbc.Row:
align: center
no_gutters: True
children:
- dbc.Col:
align: center
width: auto
children:
- dbc.Select:
id: base
options:
- label: BTC
value: BTC
value: BTC
required: True
bs_size: lg
- dbc.Col:
align: center
width: auto
children: /
- dbc.Col:
align: center
width: auto
children:
- dbc.Select:
id: quote
options:
- label: USD
value: USD
value: USD
required: True
bs_size: lg
- dbc.Row:
children:
- dbc.Col:
width:
size: 10
offset: 1
children:
- dbc.RadioItems:
id: date-select
options:
- label: '1D'
value: '24H-20T'
- label: '1W'
value: '1W-3H'
- label: '1M'
value: '30D-1D'
- label: '6M'
value: '180D-1D'
- label: '1Y'
value: '365D-7D'
value: '24H-20T'
inline: True
- dbc.Row:
children:
dbc.Col:
width: auto
children:
- dcc.DatePickerRange:
id: date-range
min_date_allowed: 2001-01-01
max_date_allowed:
initial_visible_month: 2021-01-01
start_date: 2021-01-01
end_date:
- dbc.Row:
children:
- dbc.Col:
width:
size: 6
children:
- dbc.Select:
id: cadence
options:
- label: weekly
value: 7D
- label: daily
value: 1D
- label: 3hour
value: 3H
- label: 1hour
value: 1H
- label: 20m
value: 20T
required: True
value: 7D
bs_size: lg
# - dbc.Col:
# width:
# size: 6
# children:
# - dbc.Select:
# id: timezone
# options:
# - label: GMT
# value: GMT
# required: True
# value: GMT
# bs_size: lg
scale_settings:
- dbc.Row:
children:
dbc.Col:
width:
size: 10
children:
- dcc.RangeSlider:
id: frequency-drag
min: ${A0}
max: ${C8}
step: .1
value:
- ${C3}
- ${C5}
- dbc.Row:
children:
dbc.Col:
width:
size: 10
offset: 1
children:
- dbc.RadioItems:
id: price_type
options:
- label: open
value: open
- label: close
value: close
- label: high
value: high
- label: low
value: low
value: close
inline: True
duration_settings:
dbc.Row:
children:
- dbc.Col:
width: 4
children:
- daq.NumericInput:
id: drop-quantile
min: 0
max: 100
value: 25
label: rest quantile
- dbc.Col:
width: 4
children:
- daq.NumericInput:
id: beat-quantile
min: 0
max: 100
value: 75
label: beat quantile
- dbc.Col:
width: 4
children:
- daq.NumericInput:
id: tempo
min: 24
max: 240
value: 240
label: tempo BPM
pitch_settings:
- dbc.Row:
children:
- dbc.Col:
width:
size: 8
offset: 2
children:
- dcc.Dropdown:
id: mode
clearable: False
options:
- label: tone
value: tone
- label: pitch
value: pitch
value: pitch
- dbc.Row:
children:
- dbc.Col:
width:
size: 3
offset: 2
children:
- daq.ToggleSwitch:
id: toggle-merge
label: merge
value: True
labelPosition: bottom
- dbc.Col:
width:
size: 3
children:
- daq.ToggleSwitch:
id: toggle-silence
label: rests
value: True
labelPosition: bottom
layout:
dbc.Container:
fluid: True
children:
- dcc.Location:
id: url
refresh: False
- ${nav}
- dbc.Row:
justify: left
align: left
children: ${player_settings}
- html.Hr:
- dbc.Row:
no_gutters: True
children:
- dbc.Col:
xs: 12
sm: 12
md: 6
lg: 6
xl: 3
children: ${date_settings}
- dbc.Col:
xs: 12
sm: 12
md: 6
lg: 6
xl: 3
children: ${scale_settings}
- dbc.Col:
xs: 12
sm: 12
md: 6
lg: 6
xl: 3
children: ${duration_settings}
- dbc.Col:
xs: 12
sm: 12
md: 6
lg: 6
xl: 3
children: ${pitch_settings}
- dbc.Row:
id: debug
- dbc.Row:
children:
- dbc.Col:
children:
- dcc.Graph:
id: candlestick-chart
animate: False
callbacks:
update_base_options:
input:
- id: url
attr: pathname
output:
- id: base
attr: options
update_quote_options:
input:
- id: base
attr: value
state:
- id: quote
attr: value
output:
- id: quote
attr: value
- id: quote
attr: options
update_date_range:
input:
- id: date-select
attr: value
# - id: timezone
# attr: value
output:
- id: date-range
attr: start_date
- id: date-range
attr: end_date
- id: cadence
attr: value
- id: date-range
attr: initial_visible_month
# update_timezone_options:
# input:
# - id: url
# attr: pathname
# output:
# - id: timezone
# attr: options
# callback: history.get_timezones
play:
input:
- id: base
attr: value
- id: quote
attr: value
- id: date-range
attr: start_date
- id: date-range
attr: end_date
- id: cadence
attr: value
- id: frequency-drag
attr: value
- id: mode
attr: value
- id: drop-quantile
attr: value
- id: beat-quantile
attr: value
- id: tempo
attr: value
- id: toggle-merge
attr: value
- id: toggle-silence
attr: value
- id: candlestick-chart
attr: selectedData
# - id: wav_threshold
# attr: value
# - id: midi_threshold
# attr: value
# - id: price_threshold
# attr: value
- id: price_type
attr: value
# - id: timezone
# attr: value
output:
- id: candlestick-chart
attr: figure
- id: audio_player
attr: src
- id: midi_download
attr: href
- id: midi_download
attr: download
- id: loading-output
attr: children
slider_marks:
input:
- id: url
attr: pathname
output:
- id: frequency-drag
attr: marks
# @app.callback(
# Output('selected-data', 'children'),
# Input('basic-interactions', 'selectedData'))
# def display_selected_data(selectedData):
# return json.dumps(selectedData, indent=2)