Composition : Autocorr() ∘ Frames()
The composition between Autocorr()
and Frames()
doesn't seem to work.
a2
(the composition) should return the same values as a1
(Frames()
and then Autocorr()
).
The first values of each column of a2
should return R(0), the total energy.
# Load signal
sig, props = AudioSources.load(...)
# Init. features
af = Autocorr() ∘ Frames()
f = Frames()
a = Autocorr()
# Selected frame
i = 20
# Framing and then computing autocorrelation
fsig, fprop = f((sig[:, 1], props))
a1 = a((fsig[:, i], fprop))
# Composition
a2, _ = af((sig[:, 1], props))[:, i]