This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Add scattering library to path | |
addpath(genpath('~/scattering.m')); | |
% Parameters for vibrato signal | |
N = 8192; | |
sample_rate = 4096; | |
carrier_frequency = 1024; | |
modulation_frequency = 4; | |
bandwidth = 16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import jams | |
import librosa | |
import muda | |
import numpy as np | |
import soundfile as sf | |
print("jams version: {:s}".format(jams.__version__)) | |
print("librosa version: {:s}".format(librosa.__version__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import numpy as np | |
y, sr = librosa.load(librosa.util.example_audio_file()) | |
y = y[:sr] * (2**31) | |
S = librosa.feature.melspectrogram(y, sr=sr).astype('float32') | |
G = librosa.pcen(S, sr=sr, power=1, bias=0).astype('float32') | |
powers = np.logspace(-12, 0, 13) | |
biases = [1.0, 2.0, 5.0, 10.0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
from librosa import * | |
from librosa.core.spectrum import __overlap_add | |
from librosa.filters import get_window, window_sumsquare | |
import numpy as np | |
from numba import jit | |
def istft(stft_matrix, hop_length=None, win_length=None, window='hann', | |
center=True, dtype=np.float32, length=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mirdata import orchset | |
import os | |
def print_duration(mirdata_track): | |
"""This function measures the duration of a mirdata | |
Track by converting to JAMS and reading the file_metadata. | |
It runs only on mirdata master and returns an AssertionError | |
in mirdata v0.2-beta""" | |
jam = mirdata_track.to_jams() | |
assert jam.validate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
from librosa.display import specshow | |
import matplotlib | |
from matplotlib import pyplot as plt | |
import numpy as np | |
import os | |
import scipy.signal | |
%matplotlib inline |