diff --git a/madmom/features/beats.py b/madmom/features/beats.py index 55568b5e2..fa5f6aa17 100644 --- a/madmom/features/beats.py +++ b/madmom/features/beats.py @@ -98,17 +98,17 @@ def __init__(self, post_processor=average_predictions, online=False, multi = ParallelProcessor([]) for frame_size, diff_frame in zip(frame_sizes, diff_frames): frames = FramedSignalProcessor(frame_size=frame_size, **kwargs) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=num_bands, fmin=30, fmax=17000, norm_filters=True, frame_size=frame_size, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, mul=1, add=1) diff = SpectrogramDifferenceProcessor(diff_frames=diff_frame, positive_diffs=True, stack_diffs=np.hstack) # process each frame size with spec and diff sequentially - multi.append(SequentialProcessor((frames, stft, filt, log, diff))) + multi.append(SequentialProcessor((frames, stft, log, diff))) # stack the features and processes everything sequentially pre_processor = SequentialProcessor((sig, multi, np.hstack)) # process the pre-processed signal with a NN ensemble and the given diff --git a/madmom/features/chords.py b/madmom/features/chords.py index adc8bfe4e..28356a09c 100644 --- a/madmom/features/chords.py +++ b/madmom/features/chords.py @@ -200,10 +200,10 @@ def __init__(self, **kwargs): # spectrogram computation sig = SignalProcessor(**kwargs) frames = FramedSignalProcessor(**kwargs) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=24, fmin=60, fmax=2600, unique_filters=True, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, add=1) # padding, neural network and global average pooling pad = _cnncfp_pad @@ -212,7 +212,7 @@ def __init__(self, **kwargs): avg = _cnncfp_avg # create processing pipeline super(CNNChordFeatureProcessor, self).__init__([ - sig, frames, stft, filt, log, pad, nn, superframes, avg + sig, frames, stft, log, pad, nn, superframes, avg ]) diff --git a/madmom/features/downbeats.py b/madmom/features/downbeats.py index 5d9d700d1..12b75fd38 100644 --- a/madmom/features/downbeats.py +++ b/madmom/features/downbeats.py @@ -81,17 +81,17 @@ def __init__(self, **kwargs): for frame_size, num_bands, diff_frame in \ zip(frame_sizes, num_bands, diff_frames): frames = FramedSignalProcessor(frame_size=frame_size, fps=100) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=num_bands, fmin=30, fmax=17000, norm_filters=True, frame_size=frame_size, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, mul=1, add=1) diff = SpectrogramDifferenceProcessor(diff_frames=diff_frame, positive_diffs=True, stack_diffs=np.hstack) # process each frame size with spec and diff sequentially - multi.append(SequentialProcessor((frames, stft, filt, log, diff))) + multi.append(SequentialProcessor((frames, stft, log, diff))) # stack the features and processes everything sequentially pre_processor = SequentialProcessor((sig, multi, np.hstack)) # process the pre-processed signal with a NN ensemble diff --git a/madmom/features/key.py b/madmom/features/key.py index 1741eaff9..2b62873e9 100644 --- a/madmom/features/key.py +++ b/madmom/features/key.py @@ -90,15 +90,15 @@ def __init__(self, nn_files=None, **kwargs): # spectrogram computation sig = SignalProcessor(**kwargs) frames = FramedSignalProcessor(fps=5, **kwargs) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=24, fmin=65, fmax=2100, unique_filters=True, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, add=1) # neural network nn_files = nn_files or KEY_CNN nn = NeuralNetworkEnsemble.load(nn_files) # create processing pipeline super(CNNKeyRecognitionProcessor, self).__init__([ - sig, frames, stft, filt, log, nn, add_axis, softmax + sig, frames, stft, log, nn, add_axis, softmax ]) diff --git a/madmom/features/notes.py b/madmom/features/notes.py index 540957e42..0ba86923f 100644 --- a/madmom/features/notes.py +++ b/madmom/features/notes.py @@ -65,17 +65,17 @@ def __init__(self, **kwargs): multi = ParallelProcessor([]) for frame_size, diff_frame in zip([1024, 2048, 4096], [1, 1, 2]): frames = FramedSignalProcessor(frame_size=frame_size, **kwargs) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=12, fmin=30, fmax=17000, norm_filters=True, frame_size=frame_size, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, mul=5, add=1) diff = SpectrogramDifferenceProcessor(diff_frames=diff_frame, positive_diffs=True, stack_diffs=np.hstack) # process each frame size with spec and diff sequentially - multi.append(SequentialProcessor((frames, stft, filt, log, diff))) + multi.append(SequentialProcessor((frames, stft, log, diff))) # stack the features and processes everything sequentially pre_processor = SequentialProcessor((sig, multi, np.hstack)) diff --git a/madmom/features/onsets.py b/madmom/features/onsets.py index b6f483c7a..fde23fef4 100644 --- a/madmom/features/onsets.py +++ b/madmom/features/onsets.py @@ -782,17 +782,17 @@ def __init__(self, **kwargs): for frame_size, diff_frame in zip(frame_sizes, diff_frames): # pass **kwargs in order to be able to process in online mode frames = FramedSignalProcessor(frame_size=frame_size, **kwargs) - stft = ShortTimeFourierTransformProcessor(complex=False) filt = FilterbankProcessor(LogarithmicFilterbank, num_bands=6, fmin=30, fmax=17000, norm_filters=True, frame_size=frame_size, **kwargs) + stft = ShortTimeFourierTransformProcessor(filterbank=filt) log = ScalingProcessor(scaling_fn=np.log10, mul=5, add=1) diff = SpectrogramDifferenceProcessor(diff_frames=diff_frame, positive_diffs=True, stack_diffs=np.hstack) # process each frame size with spec and diff sequentially - multi.append(SequentialProcessor((frames, stft, filt, log, diff))) + multi.append(SequentialProcessor((frames, stft, log, diff))) # stack the features and processes everything sequentially pre_processor = SequentialProcessor((sig, multi, np.hstack))