Spaces:
Running
Running
Merge branches 'main' and 'main' of hf.co:spaces/ziqiangao/musicscopegen
Browse files
app.py
CHANGED
@@ -18,6 +18,11 @@ import shutil
|
|
18 |
|
19 |
path = "" # Update with your path
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
def getRenderCords(ta: list, idx: int, res: int = 1024, size: tuple = (1280, 720)) -> list:
|
23 |
i = idx - res // 2
|
|
|
18 |
|
19 |
path = "" # Update with your path
|
20 |
|
21 |
+
def getTrigger(ad: int, a: list, max: int = 1024) -> int:
|
22 |
+
i = ad
|
23 |
+
while not (a[i] < 120 and not a[i + 6] < 130 or i - ad > max):
|
24 |
+
i += 1
|
25 |
+
return i
|
26 |
|
27 |
def getRenderCords(ta: list, idx: int, res: int = 1024, size: tuple = (1280, 720)) -> list:
|
28 |
i = idx - res // 2
|