-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathddspae-cnn.gin
59 lines (45 loc) · 1.41 KB
/
ddspae-cnn.gin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*-Python-*-
# Decodes from (loudness, f0). Has a trainable reverb component as well.
# Since it uses a trainable reverb, training data should all be from the same
# acoustic environment.
include 'models/ae.gin'
import thesis.dilated_conv
# Encoder
Autoencoder.encoder = None
# Decoder
Autoencoder.decoder = @CustomDilatedConvDecoder()
CustomDilatedConvDecoder:
ch = 128
layers_per_stack = 3
kernel_size = 3
dilation = 3
input_keys = ('ld_scaled', 'f0_scaled')
stacks = 2
# No resampling unlike in RAVE - DDSP expects the same sampling rate as for the f0 signal from the encoder.
# resample_stride = 2
# output_splits = (('control_embedding', %decoder_output_channels),)
output_splits = (('amps', 1),
('harmonic_distribution', 60),
('noise_magnitudes', 65))
resample_after_convolve = False
causal = False
# ==============
# ProcessorGroup
# ==============
ProcessorGroup.dag = [
(@synths.Harmonic(),
['amps', 'harmonic_distribution', 'f0_hz']),
(@synths.FilteredNoise(),
['noise_magnitudes']),
(@processors.Add(),
['filtered_noise/signal', 'harmonic/signal']),
(@effects.Reverb(),
['add/signal']),
]
# Reverb
Reverb.name = 'reverb'
Reverb.reverb_length = 16000
Reverb.trainable = True
#Reverb.decay_after = 16000
# Log spectrograms.
train_util.train.model_specific_summary_fn = @summarize_ddspae