In [1]:
# Ignore a bunch of deprecation warnings
import sys
sys.path.append('../..')
import warnings
warnings.filterwarnings("ignore")

import copy
import os
import time
from tqdm import tqdm
import math

import ddsp
import ddsp.training

from data_handling.ddspdataset import DDSPDataset
from utils.training_utils import print_hparams, set_seed, save_results, str2bool
from hparams_midiae_interp_cond import hparams as hp
from midiae_interp_cond.get_model import get_model, get_fake_data

import librosa
import matplotlib.pyplot as plt
import numpy as np
import tensorflow.compat.v2 as tf
import tensorflow_datasets as tfds
import pandas as pd

from notebook_utils import *

set_seed(1234)

# Helper Functions
sample_rate = 16000


print('Done!')

from utils.audio_io import load_audio
Done!

Samples - Reconstruction of synthesizer parameters generator

Training Set

oboe

In [2]:
wav = r'/data/ddsp-experiment/logs/urmp_single_instrument_recon/results_sample_all_train_oboe_synth/0_ref.wav'
plot_spec(load_audio(wav, sample_rate), sample_rate, title='original')

DDSP inference (autoencoder)

In [3]:
wav = r'/data/ddsp-experiment/logs/urmp_single_instrument_recon/results_sample_all_train_oboe_synth/0_pred.wav'
plot_spec(load_audio(wav, sample_rate), sample_rate, title='prediction')

Synthesizer parameters generator

In [4]:
wav = r'/data/ddsp-experiment/logs/urmp_single_instrument_recon/results_sample_all_train_oboe_midi/0_pred.wav'
plot_spec(load_audio(wav, sample_rate), sample_rate, title='prediction')