Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,8 +68,8 @@ with gr.Blocks(title="Audio Fusion") as iface:
|
|
| 68 |
|
| 69 |
# 8d Effect and its arguments
|
| 70 |
with gr.Tab("8d Effect"):
|
| 71 |
-
|
| 72 |
-
with gr.Column(visible=False):
|
| 73 |
pan = gr.Slider(label="8D - Pan Boundary", minimum=0, maximum=100, value=100)
|
| 74 |
jump = gr.Slider(label="8D - Jump Percentage", minimum=1, maximum=100, value=5)
|
| 75 |
time = gr.Slider(label="8D - Time L to R (s)", minimum=1, maximum=30, value=10)
|
|
@@ -78,22 +78,29 @@ with gr.Blocks(title="Audio Fusion") as iface:
|
|
| 78 |
# SLowed Effect and its arguments
|
| 79 |
with gr.Tab("Slowed Effect"):
|
| 80 |
speed_check = gr.Checkbox(label="Apply slowed effect")
|
| 81 |
-
with gr.
|
| 82 |
speed = gr.Slider(label="Slowed - Speed Multiplier", minimum=0.1, maximum=4, step=0.01, value=0.92)
|
| 83 |
|
| 84 |
# Reverb Effect and its arguments
|
| 85 |
with gr.Tab("Reverb Effect"):
|
| 86 |
reverb_check = gr.Checkbox(label="Apply reverb effect")
|
| 87 |
-
with gr.Column(visible=
|
| 88 |
room = gr.Slider(label="Reverb - Room Size", minimum=0, maximum=2, step=0.01, value=0.8)
|
| 89 |
damp = gr.Slider(label="Reverb - Damping", minimum=0, maximum=2, value=1)
|
| 90 |
width = gr.Slider(label="Reverb - Width", minimum=0, maximum=2, step=0.1, value=0.5)
|
| 91 |
wet = gr.Slider(label="Reverb - Wet Level", minimum=0, maximum=2, step=0.1, value=0.3)
|
| 92 |
dry = gr.Slider(label="Reverb - Dry Level", minimum=0, maximum=2, step=0.1, value=0.8)
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
-
|
| 96 |
-
inputs = [input_audio, d_check, pan, jump, time, volx, speed_check, speed, reverb_check, room, damp, width, wet, dry]
|
| 97 |
output = [gr.Audio(label="Download processed music", type="filepath")]
|
| 98 |
|
| 99 |
btn = gr.Button("Run", size="sm")
|
|
|
|
| 68 |
|
| 69 |
# 8d Effect and its arguments
|
| 70 |
with gr.Tab("8d Effect"):
|
| 71 |
+
dimension_check = gr.Checkbox(label="Apply 8D effect")
|
| 72 |
+
with gr.Column(visible=False) as di_col:
|
| 73 |
pan = gr.Slider(label="8D - Pan Boundary", minimum=0, maximum=100, value=100)
|
| 74 |
jump = gr.Slider(label="8D - Jump Percentage", minimum=1, maximum=100, value=5)
|
| 75 |
time = gr.Slider(label="8D - Time L to R (s)", minimum=1, maximum=30, value=10)
|
|
|
|
| 78 |
# SLowed Effect and its arguments
|
| 79 |
with gr.Tab("Slowed Effect"):
|
| 80 |
speed_check = gr.Checkbox(label="Apply slowed effect")
|
| 81 |
+
with gr.Column(visible=True) as se_col:
|
| 82 |
speed = gr.Slider(label="Slowed - Speed Multiplier", minimum=0.1, maximum=4, step=0.01, value=0.92)
|
| 83 |
|
| 84 |
# Reverb Effect and its arguments
|
| 85 |
with gr.Tab("Reverb Effect"):
|
| 86 |
reverb_check = gr.Checkbox(label="Apply reverb effect")
|
| 87 |
+
with gr.Column(visible=True) as re_col:
|
| 88 |
room = gr.Slider(label="Reverb - Room Size", minimum=0, maximum=2, step=0.01, value=0.8)
|
| 89 |
damp = gr.Slider(label="Reverb - Damping", minimum=0, maximum=2, value=1)
|
| 90 |
width = gr.Slider(label="Reverb - Width", minimum=0, maximum=2, step=0.1, value=0.5)
|
| 91 |
wet = gr.Slider(label="Reverb - Wet Level", minimum=0, maximum=2, step=0.1, value=0.3)
|
| 92 |
dry = gr.Slider(label="Reverb - Dry Level", minimum=0, maximum=2, step=0.1, value=0.8)
|
| 93 |
|
| 94 |
+
def visiblity(check, col):
|
| 95 |
+
if check:
|
| 96 |
+
return {col: gr.Column(visiblity=True)}
|
| 97 |
+
else:
|
| 98 |
+
return {col: gr.Column(visiblity=False)}
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
dimension_check.change(visiblity, inputs=[dimension_check, di_col], outputs=[di_col])
|
| 102 |
|
| 103 |
+
inputs = [input_audio, dimension_check, pan, jump, time, volx, speed_check, speed, reverb_check, room, damp, width, wet, dry]
|
|
|
|
| 104 |
output = [gr.Audio(label="Download processed music", type="filepath")]
|
| 105 |
|
| 106 |
btn = gr.Button("Run", size="sm")
|