Spaces:
Build error
Build error
pwease
Browse files- pages/db.py +1 -1
- pages/sonification_utils.py +2 -2
pages/db.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import json
|
| 2 |
-
|
| 3 |
import gspread
|
| 4 |
from oauth2client.service_account import ServiceAccountCredentials
|
| 5 |
|
|
|
|
| 1 |
import json
|
| 2 |
+
import os
|
| 3 |
import gspread
|
| 4 |
from oauth2client.service_account import ServiceAccountCredentials
|
| 5 |
|
pages/sonification_utils.py
CHANGED
|
@@ -50,7 +50,7 @@ def sonify_y_ax(xs, ys, mode, gaps=0.5):
|
|
| 50 |
|
| 51 |
marks.extend(
|
| 52 |
[
|
| 53 |
-
Wave(AUDIO_PATH).add_effect(SpatialPanner(az, el, r)),
|
| 54 |
Silence(secs=gaps),
|
| 55 |
]
|
| 56 |
)
|
|
@@ -127,7 +127,7 @@ def sonify_x_ax(xs, ys, x_mode, y_mode, gaps=0.5):
|
|
| 127 |
if x_deltas[idx] > 0.0:
|
| 128 |
marks.append(Silence(secs=gap_ax(x_deltas[idx])))
|
| 129 |
|
| 130 |
-
return stage.get_ndarray(Chain(*marks))
|
| 131 |
|
| 132 |
|
| 133 |
def get_audio_comp(arr, frame_rate, visible=True, autoplay=False) -> str:
|
|
|
|
| 50 |
|
| 51 |
marks.extend(
|
| 52 |
[
|
| 53 |
+
Wave(AUDIO_PATH).add_effect(SpatialPanner(az, el, r * 2)),
|
| 54 |
Silence(secs=gaps),
|
| 55 |
]
|
| 56 |
)
|
|
|
|
| 127 |
if x_deltas[idx] > 0.0:
|
| 128 |
marks.append(Silence(secs=gap_ax(x_deltas[idx])))
|
| 129 |
|
| 130 |
+
return 0.66 * stage.get_ndarray(Chain(*marks))
|
| 131 |
|
| 132 |
|
| 133 |
def get_audio_comp(arr, frame_rate, visible=True, autoplay=False) -> str:
|