Spaces:
Sleeping
Sleeping
Commit
·
140ad27
1
Parent(s):
7bb4fe3
Add effect configurations
Browse files- README.md +18 -24
- cfg/effects/chorus.yaml +20 -0
- cfg/effects/compressor.yaml +22 -0
- cfg/effects/reverb.yaml +26 -0
- cfg/exp/demucs_chorus.yaml +4 -0
- cfg/exp/demucs_compression.yaml +4 -0
- cfg/exp/demucs_reverb.yaml +4 -0
- cfg/exp/umx_chorus.yaml +4 -0
- cfg/exp/umx_compression.yaml +4 -0
- cfg/exp/umx_reverb.yaml +4 -0
- remfx/effects.py +1 -1
- scripts/train.py +0 -1
README.md
CHANGED
@@ -6,36 +6,30 @@
|
|
6 |
4. `git submodule update --init --recursive`
|
7 |
5. `pip install -e umx`
|
8 |
|
9 |
-
## Download [
|
10 |
-
|
|
|
|
|
|
|
11 |
|
12 |
## Train model
|
13 |
1. Change Wandb variables in `shell_vars.sh` and `source shell_vars.sh`
|
14 |
-
2. `python scripts/train.py exp=
|
15 |
or
|
16 |
-
2. `python scripts/train.py exp=
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
To add gpu, add `trainer.accelerator='gpu' trainer.devices=-1` to the command-line
|
22 |
|
23 |
-
Ex. `python train.py exp=
|
24 |
|
25 |
-
###
|
26 |
-
|
27 |
-
-
|
28 |
-
- Clean
|
29 |
-
- Flanger
|
30 |
-
- Phaser
|
31 |
-
- RAT
|
32 |
-
- Sweep Echo
|
33 |
-
- TubeScreamer
|
34 |
-
- Chorus
|
35 |
-
- Digital Delay
|
36 |
-
- Hall Reverb
|
37 |
-
- Plate Reverb
|
38 |
-
- Spring Reverb
|
39 |
-
- TapeEcho
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
6 |
4. `git submodule update --init --recursive`
|
7 |
5. `pip install -e umx`
|
8 |
|
9 |
+
## Download [VocalSet Dataset](https://zenodo.org/record/1193957)
|
10 |
+
1. `wget https://zenodo.org/record/1193957/files/VocalSet.zip?download=1`
|
11 |
+
2. `mv VocalSet.zip?download=1 VocalSet.zip`
|
12 |
+
3. `unzip VocalSet.zip`
|
13 |
+
4. Manually split singers into train, val, test directories
|
14 |
|
15 |
## Train model
|
16 |
1. Change Wandb variables in `shell_vars.sh` and `source shell_vars.sh`
|
17 |
+
2. `python scripts/train.py +exp=umx_distortion`
|
18 |
or
|
19 |
+
2. `python scripts/train.py +exp=demucs_distortion`
|
20 |
+
See cfg for more options. Generally they are `+exp={model}_{effect}`
|
21 |
+
Models and effects detailed below.
|
|
|
22 |
|
23 |
To add gpu, add `trainer.accelerator='gpu' trainer.devices=-1` to the command-line
|
24 |
|
25 |
+
Ex. `python scripts/train.py +exp=umx_distortion trainer.accelerator='gpu' trainer.devices=-1`
|
26 |
|
27 |
+
### Current Models
|
28 |
+
- `umx`
|
29 |
+
- `demucs`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
### Current Effects
|
32 |
+
- `chorus`
|
33 |
+
- `compressor`
|
34 |
+
- `distortion`
|
35 |
+
- `reverb`
|
cfg/effects/chorus.yaml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
effects:
|
3 |
+
train_effects:
|
4 |
+
Chorus:
|
5 |
+
_target_: remfx.effects.RandomPedalboardChorus
|
6 |
+
sample_rate: ${sample_rate}
|
7 |
+
val_effects:
|
8 |
+
Chorus:
|
9 |
+
_target_: remfx.effects.RandomPedalboardChorus
|
10 |
+
sample_rate: ${sample_rate}
|
11 |
+
min_rate_hz: 1.0
|
12 |
+
max_rate_hz: 1.0
|
13 |
+
min_depth: 0.3
|
14 |
+
max_depth: 0.3
|
15 |
+
min_centre_delay_ms: 7.5
|
16 |
+
max_centre_delay_ms: 7.5
|
17 |
+
min_feedback: 0.4
|
18 |
+
max_feedback: 0.4
|
19 |
+
min_mix: 0.4
|
20 |
+
max_mix: 0.4
|
cfg/effects/compressor.yaml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
effects:
|
3 |
+
train_effects:
|
4 |
+
Compressor:
|
5 |
+
_target_: remfx.effects.RandomPedalboardCompressor
|
6 |
+
sample_rate: ${sample_rate}
|
7 |
+
min_threshold_db: -42.0
|
8 |
+
max_threshold_db: -20.0
|
9 |
+
min_ratio: 1.5
|
10 |
+
max_ratio: 6.0
|
11 |
+
val_effects:
|
12 |
+
Compressor:
|
13 |
+
_target_: remfx.effects.RandomPedalboardCompressor
|
14 |
+
sample_rate: ${sample_rate}
|
15 |
+
min_threshold_db: -32
|
16 |
+
max_threshold_db: -32
|
17 |
+
min_ratio: 3.0
|
18 |
+
max_ratio: 3.0
|
19 |
+
min_attack_ms: 10.0
|
20 |
+
max_attack_ms: 10.0
|
21 |
+
min_release_ms: 40.0
|
22 |
+
max_release_ms: 40.0
|
cfg/effects/reverb.yaml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
effects:
|
3 |
+
train_effects:
|
4 |
+
Reverb:
|
5 |
+
_target_: remfx.effects.RandomPedalboardReverb
|
6 |
+
sample_rate: ${sample_rate}
|
7 |
+
min_room_size: 0.3
|
8 |
+
max_room_size: 1.0
|
9 |
+
min_damping: 0.2
|
10 |
+
max_damping: 1.0
|
11 |
+
min_wet_dry: 0.2
|
12 |
+
max_wet_dry: 0.8
|
13 |
+
min_width: 0.2
|
14 |
+
max_width: 1.0
|
15 |
+
val_effects:
|
16 |
+
Reverb:
|
17 |
+
_target_: remfx.effects.RandomPedalboardReverb
|
18 |
+
sample_rate: ${sample_rate}
|
19 |
+
min_room_size: 0.5
|
20 |
+
max_room_size: 0.5
|
21 |
+
min_damping: 0.5
|
22 |
+
max_damping: 0.5
|
23 |
+
min_wet_dry: 0.4
|
24 |
+
max_wet_dry: 0.4
|
25 |
+
min_width: 0.5
|
26 |
+
max_width: 0.5
|
cfg/exp/demucs_chorus.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: demucs
|
4 |
+
- override /effects: chorus
|
cfg/exp/demucs_compression.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: demucs
|
4 |
+
- override /effects: compression
|
cfg/exp/demucs_reverb.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: demucs
|
4 |
+
- override /effects: reverb
|
cfg/exp/umx_chorus.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: umx
|
4 |
+
- override /effects: chorus
|
cfg/exp/umx_compression.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: umx
|
4 |
+
- override /effects: compression
|
cfg/exp/umx_reverb.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @package _global_
|
2 |
+
defaults:
|
3 |
+
- override /model: umx
|
4 |
+
- override /effects: reverb
|
remfx/effects.py
CHANGED
@@ -574,7 +574,7 @@ class RandomSoxReverb(torch.nn.Module):
|
|
574 |
return (x * (1 - wet_dry)) + (y * wet_dry)
|
575 |
|
576 |
|
577 |
-
class
|
578 |
def __init__(
|
579 |
self,
|
580 |
sample_rate: float,
|
|
|
574 |
return (x * (1 - wet_dry)) + (y * wet_dry)
|
575 |
|
576 |
|
577 |
+
class RandomPedalboardReverb(torch.nn.Module):
|
578 |
def __init__(
|
579 |
self,
|
580 |
sample_rate: float,
|
scripts/train.py
CHANGED
@@ -12,7 +12,6 @@ def main(cfg: DictConfig):
|
|
12 |
# Apply seed for reproducibility
|
13 |
if cfg.seed:
|
14 |
pl.seed_everything(cfg.seed)
|
15 |
-
print(cfg)
|
16 |
log.info(f"Instantiating datamodule <{cfg.datamodule._target_}>.")
|
17 |
datamodule = hydra.utils.instantiate(cfg.datamodule, _convert_="partial")
|
18 |
log.info(f"Instantiating model <{cfg.model._target_}>.")
|
|
|
12 |
# Apply seed for reproducibility
|
13 |
if cfg.seed:
|
14 |
pl.seed_everything(cfg.seed)
|
|
|
15 |
log.info(f"Instantiating datamodule <{cfg.datamodule._target_}>.")
|
16 |
datamodule = hydra.utils.instantiate(cfg.datamodule, _convert_="partial")
|
17 |
log.info(f"Instantiating model <{cfg.model._target_}>.")
|