Universite-Gustave-Eiffel / acoustic-toolbox

A Python library for acousticians.
https://acoustic-toolbox.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

consider xarray #36

Open Nitnelav opened 1 week ago

Nitnelav commented 1 week ago

consider xarray for storing multi-channel audio and/or multi-channel spectrograms

MitchellAcoustics commented 1 week ago

I'm not opposed, it'd make sense. But just thinking about downstream dependencies (yeah, mostly soundscapy) it'd add a new dependency for us. Numpy is used in tons of other packages (pandas, matplotlib, scipy, etc) so it'll always be needed. If acoustic-toolbox switches to xarray, that's a new dependency to resolve and convert to/from. Not a huge issue, but something to keep in mind.

That said, to handle two channel signals and their results in soundscapy I've had to use MultiIndex in Pandas which is a bit of a nightmare, so it might solve stuff!

MitchellAcoustics commented 1 week ago

Speaking of, if you haven't taken a look, I've already made the scaffolding for one implementation of the acoustics.Signal for multiple channels in soundscapy.Binaural. At some point I was planning to make a PR for porting that up to acoustic-toolbox.

Nitnelav commented 1 week ago

Yes ! I agree that adding a depency must be done carefully. I'm supposed to have a week or two dedicated to acoustic stuff in december. I'll have a look then