Closed cwitkowitz closed 1 year ago
Signal.__init__
argmax
Sound
class. This methodology was tested with all the example sounds and more, and worked well.Signal.trimmed
and Signal.noise
attributesSignal.cavity_peak
Signal.fft_bins
Signal.envelop
and Signal.envelop_time
Signal.envelop
and Signal.envelop_time
togetheri
at the end of the while loop in Signal.find_onset
parameters.py
time_length
attribute of Signal
norm_factor
to Signal.__init__
Signal.__init__
, andfreq_range
(self.range
) is unused.self.onset
attribute inSignal.__init__
is only ever set duringSignal.trim_onset
. Also, inSignal.log_envelop
andSignal.trim_onset
onsets are defaulted to the maximum of the signal, which doesn't seem very robust. Even still, to obtain the onset the argmax is applied on the signal without taking the absolute value first.self.trimmed
andself.noise
attributes inSignal.__init__
.Signal.cavity_peak
mentions printing comment and returningNone
, but there is no such branch to do so. It seems like it was copy/pasted over fromSignal.cavity_frequency
.Signal.fft_bins
is not immediately obvious. It might be beneficial to expand on the documentation.Signal.envelop
andSignal.envelop_time
.Signal.envelop
andSignal.envelop_time
could be combined, as withSignal.log_envelop
for simplicity.overlap
is added toi
one extra time before exiting the while loop inSignal.find_onset
.Signal.trim_onset
? Make sure the units of all parameters are specified.time_length
attribute comes out of nowhere inSignal.trim_time
, and I don't believe it is used anywhere else.norm_factor
attribute comes out of nowhere inSignal.normalize
. Although this one is actually used, it should probably be initialized inSignal.__init__
.