Spaces:
Sleeping
Sleeping
Taejun Kim
commited on
Commit
•
76d8f16
1
Parent(s):
3c5c1bb
Fix bug & Improve speed
Browse files- .gitignore +5 -1
- app.py +10 -2
- struct/Bruno Mars - 24k Magic-0-100.json +79 -0
- struct/NewJeans - Super Shy-0-100.json +64 -0
.gitignore
CHANGED
@@ -1,4 +1,8 @@
|
|
|
|
|
|
|
|
1 |
demix/
|
2 |
sonif/
|
3 |
spec/
|
4 |
-
|
|
|
|
1 |
+
gradio_cached_examples/
|
2 |
+
flagged/
|
3 |
+
|
4 |
demix/
|
5 |
sonif/
|
6 |
spec/
|
7 |
+
|
8 |
+
.idea/
|
app.py
CHANGED
@@ -51,14 +51,22 @@ def analyze(path):
|
|
51 |
path = Path(path)
|
52 |
result = allin1.analyze(
|
53 |
path,
|
|
|
54 |
multiprocess=False,
|
55 |
keep_byproducts=True, # TODO: remove this
|
56 |
)
|
57 |
|
58 |
-
fig = allin1.visualize(
|
|
|
|
|
|
|
59 |
fig.set_dpi(300)
|
60 |
|
61 |
-
allin1.sonify(
|
|
|
|
|
|
|
|
|
62 |
sonif_path = Path(f'./sonif/{path.stem}.sonif{path.suffix}').resolve().as_posix()
|
63 |
|
64 |
return result.bpm, fig, sonif_path
|
|
|
51 |
path = Path(path)
|
52 |
result = allin1.analyze(
|
53 |
path,
|
54 |
+
out_dir='./struct',
|
55 |
multiprocess=False,
|
56 |
keep_byproducts=True, # TODO: remove this
|
57 |
)
|
58 |
|
59 |
+
fig = allin1.visualize(
|
60 |
+
result,
|
61 |
+
multiprocess=False,
|
62 |
+
)
|
63 |
fig.set_dpi(300)
|
64 |
|
65 |
+
allin1.sonify(
|
66 |
+
result,
|
67 |
+
out_dir='./sonif',
|
68 |
+
multiprocess=False,
|
69 |
+
)
|
70 |
sonif_path = Path(f'./sonif/{path.stem}.sonif{path.suffix}').resolve().as_posix()
|
71 |
|
72 |
return result.bpm, fig, sonif_path
|
struct/Bruno Mars - 24k Magic-0-100.json
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"path": "/private/var/folders/7p/w7w_6pcd2hq3bmbny_4ddr540000gn/T/gradio/47f911f02afc317c03bee7a3cdeea8f28014d6cd/Bruno Mars - 24k Magic-0-100.mp3",
|
3 |
+
"bpm": 107,
|
4 |
+
"beats": [0.72,1.44,2.14,2.83,3.5,4.21,4.96,5.63,6.39,7.13,7.84,8.74,9.63,10.55,11.44,12.38,13.35,14.17,15.06,15.79,16.39,17.03,17.65,18.28,18.93,19.58,20.2,20.86,21.44,22.01,22.55,23.14,23.69,24.25,24.81,25.37,25.93,26.5,27.06,27.62,28.18,28.74,29.3,29.87,30.43,30.99,31.55,32.11,32.67,33.23,33.79,34.35,34.91,35.47,36.04,36.59,37.16,37.71,38.28,38.84,39.4,39.96,40.52,41.08,41.64,42.19,42.76,43.32,43.88,44.44,45.01,45.57,46.13,46.69,47.25,47.81,48.37,48.93,49.49,50.05,50.61,51.17,51.73,52.3,52.86,53.42,53.98,54.54,55.1,55.66,56.22,56.78,57.34,57.9,58.46,59.02,59.58,60.14,60.71,61.27,61.82,62.39,62.95,63.5,64.07,64.63,65.19,65.75,66.31,66.87,67.44,67.99,68.55,69.12,69.68,70.24,70.8,71.36,71.93,72.48,73.04,73.6,74.16,74.73,75.29,75.85,76.41,76.96,77.52,78.08,78.64,79.2,79.77,80.33,80.89,81.45,82.01,82.57,83.13,83.7,84.26,84.82,85.38,85.94,86.5,87.06,87.62,88.19,88.74,89.3,89.87,90.42,90.99,91.55,92.11,92.67,93.23,93.79,94.35,94.91,95.47,96.03,96.59,97.15,97.71,98.28,98.84,99.4,99.96,100.53,101.08,101.63,102.2,102.76,103.32,103.88,104.44,105.0,105.56,106.13,106.69,107.25,107.81,108.37,108.93,109.49,110.05,110.61,111.16,111.73,112.3,112.85,113.41,113.97,114.53,115.1,115.65,116.22,116.78,117.34,117.9,118.46,119.02,119.58,120.15,120.7,121.27,121.82,122.39,122.95,123.51,124.07,124.63,125.19,125.76,126.31,126.87,127.43,128.0,128.56,129.12,129.68,130.24,130.8,131.35,131.91,132.47,133.03,133.6,134.16,134.73,135.28,135.85,136.41,136.97,137.53,138.09,138.65,139.21,139.77,140.33,140.89,141.45,142.02,142.58,143.14,143.7,144.26,144.82,145.38,145.94,146.5,147.06,147.62,148.19,148.74,149.3,149.86,150.43,150.98,151.54,152.11,152.67,153.23,153.79,154.35,154.91,155.47,156.03,156.59,157.15,157.71,158.27,158.83,159.4,159.96,160.52,161.08,161.64,162.2,162.76,163.32,163.88,164.44,165.0,165.57,166.13,166.69,167.25,167.79,168.37,168.93,169.48,170.03,170.6,171.16,171.72,172.29,172.85,173.41,173.96,174.52,175.09,175.65,176.21,176.78,177.33,177.89,178.45,179.01,179.58,180.14,180.69,181.26,181.82,182.38,182.94,183.51,184.06,184.63,185.18,185.74,186.3,186.87,187.43,187.99,188.56,189.12,189.68,190.24,190.8,191.36,191.92,192.48,193.05,193.6,194.17,194.72,195.29,195.85,196.41,196.97,197.53,198.09,198.65,199.21,199.77,200.33,200.89,201.45,202.02,202.58,203.13,203.69,204.25,204.81,205.37,205.94,206.5,207.06,207.62,208.18,208.74,209.31,209.87,210.43,210.99,211.55,212.11,212.67,213.23,213.8,214.35,214.91,215.48,216.03,216.6,217.15,217.72,218.28,218.84,219.4,219.96,220.52,221.08,221.63,222.2,222.76],
|
5 |
+
"downbeats": [0.72,3.5,6.39,9.63,13.35,16.39,18.93,21.44,23.69,25.93,28.18,30.43,32.67,34.91,37.16,39.4,41.64,43.88,46.13,48.37,50.61,52.86,55.1,57.34,59.58,61.82,64.07,66.31,68.55,70.8,73.04,75.29,77.52,79.77,82.01,84.26,86.5,88.74,90.99,93.23,95.47,97.71,99.96,102.2,104.44,106.69,108.93,111.16,113.41,115.65,117.9,120.15,122.39,124.63,126.87,129.12,131.35,133.6,135.85,138.09,140.33,142.58,144.82,147.06,149.3,151.54,153.79,156.03,158.27,160.52,162.76,165.0,167.25,169.48,171.72,173.96,176.21,178.45,180.69,182.94,185.18,187.43,189.68,191.92,194.17,196.41,198.65,200.89,203.13,205.37,207.62,209.87,212.11,214.35,216.6,218.84,221.08],
|
6 |
+
"beat_positions": [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4],
|
7 |
+
"segments": [
|
8 |
+
{
|
9 |
+
"start": 0.0,
|
10 |
+
"end": 0.71,
|
11 |
+
"label": "start"
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"start": 0.71,
|
15 |
+
"end": 25.93,
|
16 |
+
"label": "chorus"
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"start": 25.93,
|
20 |
+
"end": 42.76,
|
21 |
+
"label": "chorus"
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"start": 42.76,
|
25 |
+
"end": 61.81,
|
26 |
+
"label": "verse"
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"start": 61.81,
|
30 |
+
"end": 79.76,
|
31 |
+
"label": "verse"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"start": 79.76,
|
35 |
+
"end": 95.47,
|
36 |
+
"label": "chorus"
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"start": 95.47,
|
40 |
+
"end": 115.64,
|
41 |
+
"label": "verse"
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"start": 115.64,
|
45 |
+
"end": 133.59,
|
46 |
+
"label": "verse"
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"start": 133.59,
|
50 |
+
"end": 151.53,
|
51 |
+
"label": "chorus"
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"start": 151.53,
|
55 |
+
"end": 169.47,
|
56 |
+
"label": "bridge"
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"start": 169.47,
|
60 |
+
"end": 187.43,
|
61 |
+
"label": "chorus"
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"start": 187.43,
|
65 |
+
"end": 205.37,
|
66 |
+
"label": "chorus"
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"start": 205.37,
|
70 |
+
"end": 223.32,
|
71 |
+
"label": "chorus"
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"start": 223.32,
|
75 |
+
"end": 226.91,
|
76 |
+
"label": "end"
|
77 |
+
}
|
78 |
+
]
|
79 |
+
}
|
struct/NewJeans - Super Shy-0-100.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"path": "/private/var/folders/7p/w7w_6pcd2hq3bmbny_4ddr540000gn/T/gradio/47d68e824e4badb7af28910316e29495465777ff/NewJeans - Super Shy-0-100.mp3",
|
3 |
+
"bpm": 150,
|
4 |
+
"beats": [0.33,0.75,1.14,1.54,1.94,2.34,2.74,3.14,3.54,3.94,4.34,4.74,5.14,5.55,5.94,6.34,6.74,7.14,7.54,7.94,8.34,8.74,9.14,9.54,9.94,10.34,10.74,11.13,11.54,11.94,12.34,12.73,13.14,13.54,13.94,14.34,14.74,15.14,15.54,15.94,16.34,16.74,17.14,17.54,17.94,18.34,18.74,19.14,19.54,19.94,20.34,20.74,21.14,21.54,21.94,22.34,22.74,23.14,23.54,23.94,24.34,24.74,25.14,25.54,25.94,26.34,26.74,27.14,27.54,27.94,28.34,28.74,29.14,29.54,29.94,30.34,30.73,31.14,31.54,31.94,32.34,32.74,33.14,33.54,33.94,34.34,34.74,35.14,35.54,35.94,36.34,36.74,37.14,37.54,37.94,38.34,38.74,39.14,39.54,39.94,40.34,40.74,41.15,41.55,41.94,42.34,42.75,43.14,43.54,43.94,44.34,44.74,45.14,45.54,45.95,46.33,46.74,47.14,47.54,47.94,48.34,48.74,49.14,49.53,49.94,50.34,50.74,51.13,51.54,51.94,52.34,52.73,53.14,53.54,53.94,54.33,54.74,55.14,55.54,55.93,56.33,56.74,57.14,57.54,57.94,58.34,58.74,59.14,59.54,59.94,60.34,60.73,61.14,61.54,61.94,62.34,62.74,63.14,63.54,63.94,64.35,64.75,65.14,65.53,65.94,66.35,66.74,67.14,67.55,67.95,68.33,68.73,69.13,69.55,69.94,70.33,70.74,71.14,71.54,71.93,72.34,72.74,73.14,73.54,73.94,74.34,74.74,75.14,75.54,75.94,76.34,76.73,77.14,77.54,77.94,78.34,78.74,79.14,79.54,79.94,80.34,80.74,81.14,81.54,81.94,82.34,82.74,83.14,83.54,83.94,84.34,84.74,85.14,85.54,85.94,86.34,86.74,87.14,87.54,87.94,88.34,88.74,89.14,89.54,89.94,90.34,90.74,91.14,91.54,91.94,92.34,92.74,93.14,93.54,93.94,94.34,94.74,95.14,95.54,95.94,96.34,96.74,97.14,97.54,97.94,98.34,98.74,99.14,99.54,99.94,100.34,100.74,101.14,101.54,101.95,102.34,102.75,103.15,103.55,103.93,104.34,104.75,105.15,105.54,105.94,106.34,106.74,107.13,107.54,107.94,108.34,108.74,109.14,109.54,109.94,110.34,110.74,111.14,111.54,111.94,112.34,112.74,113.14,113.54,113.94,114.34,114.74,115.14,115.54,115.94,116.34,116.73,117.14,117.54,117.94,118.34,118.74,119.14,119.54,119.93,120.34,120.74,121.14,121.54,121.94,122.34,122.74,123.14,123.54,123.94,124.34,124.74,125.14,125.54,125.94,126.34,126.74,127.14,127.54,127.94,128.34,128.74,129.14,129.53,129.94,130.34,130.74,131.14,131.54,131.93,132.34,132.74,133.14,133.54,133.94,134.34,134.74,135.14,135.54,135.94,136.34,136.74,137.14,137.54,137.94,138.34,138.74,139.14,139.54,139.94,140.34,140.74,141.14,141.54,141.94,142.34,142.74,143.14,143.54,143.94,144.34,144.74,145.14,145.54,145.94,146.34,146.74,147.14,147.54,147.94,148.34,148.74,149.14,149.54,149.94,150.34,150.74,151.14,151.54,151.94,152.34,152.74,153.14,153.54],
|
5 |
+
"downbeats": [0.33,1.94,3.54,5.14,6.74,8.34,9.94,11.54,13.14,14.74,16.34,17.94,19.54,21.14,22.74,24.34,25.94,27.54,29.14,30.73,32.34,33.94,35.54,37.14,38.74,40.34,41.94,43.54,45.14,46.74,48.34,49.94,51.54,53.14,54.74,56.33,57.94,59.54,61.14,62.74,64.35,65.94,67.55,69.13,70.74,72.34,73.94,75.54,77.14,78.74,80.34,81.94,83.54,85.14,86.74,88.34,89.94,91.54,93.14,94.74,96.34,97.94,99.54,101.14,102.75,104.34,105.94,107.54,109.14,110.74,112.34,113.94,115.54,117.14,118.74,120.34,121.94,123.54,125.14,126.74,128.34,129.94,131.54,133.14,134.74,136.34,137.94,139.54,141.14,142.74,144.34,145.94,147.54,149.14,150.74,152.34],
|
6 |
+
"beat_positions": [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4],
|
7 |
+
"segments": [
|
8 |
+
{
|
9 |
+
"start": 0.0,
|
10 |
+
"end": 0.33,
|
11 |
+
"label": "start"
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"start": 0.33,
|
15 |
+
"end": 13.14,
|
16 |
+
"label": "intro"
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"start": 13.14,
|
20 |
+
"end": 38.74,
|
21 |
+
"label": "chorus"
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"start": 38.74,
|
25 |
+
"end": 51.53,
|
26 |
+
"label": "verse"
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"start": 51.53,
|
30 |
+
"end": 64.34,
|
31 |
+
"label": "verse"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"start": 64.34,
|
35 |
+
"end": 77.13,
|
36 |
+
"label": "chorus"
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"start": 77.13,
|
40 |
+
"end": 89.94,
|
41 |
+
"label": "chorus"
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"start": 89.94,
|
45 |
+
"end": 105.93,
|
46 |
+
"label": "bridge"
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"start": 105.93,
|
50 |
+
"end": 134.73,
|
51 |
+
"label": "chorus"
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"start": 134.73,
|
55 |
+
"end": 153.95,
|
56 |
+
"label": "chorus"
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"start": 153.95,
|
60 |
+
"end": 154.67,
|
61 |
+
"label": "end"
|
62 |
+
}
|
63 |
+
]
|
64 |
+
}
|