Skip to content

Commit

Permalink
fix DeepChromaProcessor with passed kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Böck committed Feb 16, 2017
1 parent aa42604 commit 8398d6d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions madmom/audio/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,20 @@ def __init__(self, fmin=65, fmax=2100, unique_filters=True, models=None,
from ..audio.stft import ShortTimeFourierTransformProcessor
from ..audio.spectrogram import LogarithmicFilteredSpectrogramProcessor
from madmom.ml.nn import NeuralNetworkEnsemble

# signal pre-processing
sig = SignalProcessor(num_channels=1, sample_rate=44100)
frames = FramedSignalProcessor(frame_size=8192, fps=10)
stft = ShortTimeFourierTransformProcessor() # caching FFT window
spec = LogarithmicFilteredSpectrogramProcessor(
num_bands=24, fmin=fmin, fmax=fmax, unique_filters=unique_filters)
spec_frames = FramedSignalProcessor(frame_size=15, hop_size=1)

# split the spectrogram into overlapping frames
spec_signal = SignalProcessor(sample_rate=10)
spec_frames = FramedSignalProcessor(frame_size=15, hop_size=1, fps=10)
# predict chroma bins with a DNN
nn = NeuralNetworkEnsemble.load(models or CHROMA_DNN, **kwargs)

# instantiate a SequentialProcessor
super(DeepChromaProcessor, self).__init__([
sig, frames, stft, spec, spec_frames, _dcp_flatten, nn
sig, frames, stft, spec, spec_signal, spec_frames, _dcp_flatten, nn
])


Expand Down

0 comments on commit 8398d6d

Please sign in to comment.