flamo 0.1.5__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flamo-0.1.5 → flamo-0.1.7}/PKG-INFO +2 -2
- {flamo-0.1.5 → flamo-0.1.7}/README.md +1 -1
- flamo-0.1.7/examples/e1_vn.py +63 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/scattering.py +1 -3
- flamo-0.1.7/flamo/auxiliary/velvet.py +114 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/functional.py +42 -1
- {flamo-0.1.5 → flamo-0.1.7}/flamo/processor/dsp.py +145 -4
- {flamo-0.1.5 → flamo-0.1.7}/pyproject.toml +1 -1
- {flamo-0.1.5 → flamo-0.1.7}/.gitignore +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/2025_FLAMO_ICASSP_DalSantoDeBortoli_poster.pdf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/LICENSE +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e0_siso.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e1_mimo.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e2_chaining_filters.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e3_series_class.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e4_recursion.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e4_recursion_nn.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e5_shell.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e6_anti_aliasing.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e7_biquad.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e7_biquad_nn.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e7_geq.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e7_peq.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e7_svf.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e8_active_acoustics.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e8_colorless_fdn.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e8_colorless_sfdn.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e8_fdn.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/e9_loss_profile.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/examples/run_all.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/__init__.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/__init__.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/config/config.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/eq.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/filterbank.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/minimize.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/auxiliary/reverb.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/__init__.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/dataset.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/loss.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/surface.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/trainer.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/optimize/utils.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/processor/__init__.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/processor/system.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/flamo/utils.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/notebooks/e7_biquad.ipynb +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/notebooks/e8_colorless_fdn.ipynb +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker1.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker10.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker11.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker12.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker13.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker14.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker3.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker5.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker6.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker7.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker8.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic1_speaker9.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker1.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker10.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker11.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker12.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker13.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker14.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker3.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker5.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker6.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker7.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker8.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic2_speaker9.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker1.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker10.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker11.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker12.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker13.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker14.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker3.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker5.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker6.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker7.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker8.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic3_speaker9.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker1.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker10.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker11.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker12.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker13.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker14.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker3.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker5.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker6.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker7.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker8.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic4_speaker9.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker1.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker10.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker11.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker12.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker13.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker14.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker3.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker5.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker6.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker7.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker8.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/Otala-2024.05.10/mic5_speaker9.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/arni_35_3541_4_2.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/rirs/s3_r4_o.wav +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/Makefile +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/auxiliary/eq.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/auxiliary/filterbank.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/auxiliary/minimize.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/auxiliary/reverb.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/auxiliary/scattering.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/environment.pickle +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/functional.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/index.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/optimize/dataset.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/optimize/loss.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/optimize/trainer.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/optimize/utils.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/processor/dsp.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/doctrees/processor/system.doctree +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/.buildinfo +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/.buildinfo.bak +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/.nojekyll +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/auxiliary/eq.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/auxiliary/filterbank.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/auxiliary/minimize.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/auxiliary/reverb.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/auxiliary/scattering.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/functional.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/index.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/optimize/dataset.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/optimize/loss.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/optimize/trainer.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/optimize/utils.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/processor/dsp.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_sources/processor/system.rst.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/alabaster.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/basic.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/badge_only.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-bold.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-normal.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/css/theme.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/custom.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/doctools.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/documentation_options.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/file.png +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bold.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bold.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-italic.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-italic.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-regular.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-regular.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/github-banner.svg +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/jquery.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/js/badge_only.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/js/theme.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/js/versions.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/language_data.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/minus.png +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/plus.png +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/pygments.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/bootstrap.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/bootstrap.js.map +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/fontawesome.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/fontawesome.js.LICENSE.txt +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/fontawesome.js.map +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/pydata-sphinx-theme.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/scripts/pydata-sphinx-theme.js.map +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/searchtools.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/sphinx_highlight.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/styles/pydata-sphinx-theme.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/styles/pydata-sphinx-theme.css.map +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/styles/theme.css +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/_static/webpack-macros.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/auxiliary/eq.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/auxiliary/filterbank.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/auxiliary/minimize.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/auxiliary/reverb.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/auxiliary/scattering.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/functional.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/genindex.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/index.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/objects.inv +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/optimize/dataset.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/optimize/loss.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/optimize/trainer.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/optimize/utils.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/processor/dsp.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/processor/system.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/search.html +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/_build/html/searchindex.js +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/auxiliary/eq.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/auxiliary/filterbank.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/auxiliary/minimize.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/auxiliary/reverb.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/auxiliary/scattering.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/conf.py +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/functional.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/index.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/make.bat +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/optimize/dataset.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/optimize/loss.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/optimize/trainer.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/optimize/utils.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/processor/dsp.rst +0 -0
- {flamo-0.1.5 → flamo-0.1.7}/sphinx/processor/system.rst +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flamo
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: An Open-Source Library for Frequency-Domain Differentiable Audio Processing
|
|
5
5
|
Project-URL: Homepage, https://github.com/gdalsanto/flamo
|
|
6
6
|
Project-URL: Issues, https://github.com/gdalsanto/flamo/issues
|
|
@@ -71,7 +71,7 @@ Utilities, system designers, and optimization - in `flamo.processor.system`:
|
|
|
71
71
|
- **Shell**: Container class for safe interaction between system, dataset, and loss functions
|
|
72
72
|
|
|
73
73
|
Optimization - in `flamo.optimize`:
|
|
74
|
-
- **
|
|
74
|
+
- **Trainer** : Handling of the training and validation steps
|
|
75
75
|
- **Dataset** : Customizable dataset class and helper methods
|
|
76
76
|
|
|
77
77
|
---
|
|
@@ -24,7 +24,7 @@ Utilities, system designers, and optimization - in `flamo.processor.system`:
|
|
|
24
24
|
- **Shell**: Container class for safe interaction between system, dataset, and loss functions
|
|
25
25
|
|
|
26
26
|
Optimization - in `flamo.optimize`:
|
|
27
|
-
- **
|
|
27
|
+
- **Trainer** : Handling of the training and validation steps
|
|
28
28
|
- **Dataset** : Customizable dataset class and helper methods
|
|
29
29
|
|
|
30
30
|
---
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Example usage of velvet noise filters integrated with FLAMO Filter system.
|
|
3
|
+
|
|
4
|
+
This example shows how to use the new Filter-based velvet noise classes
|
|
5
|
+
that are differentiable and can be used within the FLAMO processing chain.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import torch.nn as nn
|
|
9
|
+
|
|
10
|
+
import matplotlib.pyplot as plt
|
|
11
|
+
from flamo.auxiliary.velvet import (
|
|
12
|
+
VelvetNoiseFilter,
|
|
13
|
+
)
|
|
14
|
+
from flamo.functional import signal_gallery
|
|
15
|
+
from flamo.processor import dsp
|
|
16
|
+
|
|
17
|
+
def example_velvet_noise_filter():
|
|
18
|
+
"""Example using VelvetNoiseFilter."""
|
|
19
|
+
print("=== VelvetNoiseFilter Example ===")
|
|
20
|
+
|
|
21
|
+
in_ch, out_ch = 1, 1
|
|
22
|
+
nfft = 2048 # FFT size for the filter
|
|
23
|
+
length = nfft # Length of the filter
|
|
24
|
+
|
|
25
|
+
# Create a velvet noise filter
|
|
26
|
+
# size = (length, output_channels, input_channels)
|
|
27
|
+
velvet_filter = VelvetNoiseFilter(
|
|
28
|
+
size=(length, out_ch, in_ch), # 1024 samples, 1x1 matrix
|
|
29
|
+
density=1000.0, # 1000 impulses per second
|
|
30
|
+
sample_rate=48000,
|
|
31
|
+
requires_grad=True # Make it differentiable
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
input_layer = dsp.FFT(nfft=nfft)
|
|
35
|
+
output_layer = dsp.iFFT(nfft=nfft)
|
|
36
|
+
|
|
37
|
+
my_dsp = nn.Sequential(input_layer, velvet_filter, output_layer)
|
|
38
|
+
|
|
39
|
+
# -------------- Apply unit impulse to DSP --------------
|
|
40
|
+
|
|
41
|
+
# Input signal
|
|
42
|
+
input_sig = signal_gallery(
|
|
43
|
+
signal_type="impulse",
|
|
44
|
+
batch_size=1,
|
|
45
|
+
n_samples=nfft,
|
|
46
|
+
n=in_ch,
|
|
47
|
+
fs=48000,
|
|
48
|
+
device="cpu",
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
output_vn = my_dsp(input_sig)
|
|
52
|
+
# plot the sequence
|
|
53
|
+
plt.figure(figsize=(12, 4))
|
|
54
|
+
plt.plot(output_vn[0, :, 0].squeeze().numpy())
|
|
55
|
+
for pos in velvet_filter.grid:
|
|
56
|
+
plt.axvline(x=pos.item(), color='r', linestyle='--', alpha=0.5)
|
|
57
|
+
plt.title('Output Velvet Noise Signal')
|
|
58
|
+
plt.xlabel('Samples')
|
|
59
|
+
plt.ylabel('Amplitude')
|
|
60
|
+
plt.grid(True, alpha=0.3)
|
|
61
|
+
plt.tight_layout()
|
|
62
|
+
|
|
63
|
+
return
|
|
@@ -245,13 +245,11 @@ def get_random_shifts(N, sparsity_vect, pulse_size):
|
|
|
245
245
|
|
|
246
246
|
def hadamard_matrix(N):
|
|
247
247
|
"""Generate a hadamard matrix of size N"""
|
|
248
|
-
X = np.array([[1]])
|
|
248
|
+
X = np.array([[1]])
|
|
249
249
|
# Create a Hadamard matrix of the specified order
|
|
250
|
-
# TODO remove for loop becuase all matrices look the same
|
|
251
250
|
while X.shape[0] < N:
|
|
252
251
|
# Kronecker product to generate a larger Hadamard matrix
|
|
253
252
|
X = np.kron(X, np.array([[1, 1], [1, -1]])) / np.sqrt(2)
|
|
254
|
-
|
|
255
253
|
return X
|
|
256
254
|
|
|
257
255
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Velvet Noise implementations for FLAMO
|
|
3
|
+
|
|
4
|
+
Velvet noise is a sparse pseudo-random noise used in artificial reverberation.
|
|
5
|
+
It consists of sample values of +1, -1, and 0, with the non-zero samples
|
|
6
|
+
occurring at pseudo-random locations.
|
|
7
|
+
|
|
8
|
+
References:
|
|
9
|
+
Välimäki, V., & Prawda, K. (2021). Late-Reverberation Synthesis Using
|
|
10
|
+
Interleaved Velvet-Noise Sequences. IEEE/ACM Transactions on Audio,
|
|
11
|
+
Speech, and Language Processing, 29, 1149-1160.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import torch
|
|
15
|
+
import torch.nn as nn
|
|
16
|
+
import math
|
|
17
|
+
from typing import Optional
|
|
18
|
+
from flamo.processor.dsp import Filter, parallelFilter
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class VelvetNoiseFilter(Filter):
|
|
22
|
+
"""
|
|
23
|
+
TODO
|
|
24
|
+
Args:
|
|
25
|
+
size: Size of the filter parameters (length, output_channels, input_channels)
|
|
26
|
+
density: Number of impulses per second
|
|
27
|
+
delta: Scaling factor for impulse range (0 < delta <= 1)
|
|
28
|
+
When delta=0.25, impulses only appear in first 25% of each grid
|
|
29
|
+
sample_rate: Sample rate in Hz (default: 48000)
|
|
30
|
+
nfft: Number of FFT points required to compute the frequency response
|
|
31
|
+
requires_grad: Whether the filter parameters require gradients
|
|
32
|
+
alias_decay_db: The decaying factor in dB for the time anti-aliasing envelope
|
|
33
|
+
device: The device of the constructed tensors
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(
|
|
37
|
+
self,
|
|
38
|
+
size: tuple = (1, 1, 1),
|
|
39
|
+
density: float = 1000.0,
|
|
40
|
+
delta: float = 1.0,
|
|
41
|
+
sample_rate: int = 48000,
|
|
42
|
+
nfft: int = 2**11,
|
|
43
|
+
requires_grad: bool = False,
|
|
44
|
+
alias_decay_db: float = 0.0,
|
|
45
|
+
device: Optional[str] = None,
|
|
46
|
+
):
|
|
47
|
+
self.density = density
|
|
48
|
+
self.sample_rate = sample_rate
|
|
49
|
+
self.Td = sample_rate / density # Average distance between impulses
|
|
50
|
+
if not 0 < delta <= 1:
|
|
51
|
+
raise ValueError("Delta must be in range (0, 1]")
|
|
52
|
+
|
|
53
|
+
self.delta = delta
|
|
54
|
+
# Create mapping function that generates velvet noise
|
|
55
|
+
map = lambda x: self._generate_velvet_impulse_response(x)
|
|
56
|
+
super().__init__(
|
|
57
|
+
size=size,
|
|
58
|
+
nfft=nfft,
|
|
59
|
+
map=map,
|
|
60
|
+
requires_grad=requires_grad,
|
|
61
|
+
alias_decay_db=alias_decay_db,
|
|
62
|
+
device=device,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def _generate_velvet_impulse_response(self, param: torch.Tensor) -> torch.Tensor:
|
|
66
|
+
"""Generate velvet noise impulse response from parameters."""
|
|
67
|
+
# Calculate grid size (average distance between impulses)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
result = torch.zeros_like(param)
|
|
71
|
+
|
|
72
|
+
for out_ch in range(self.param.shape[1]):
|
|
73
|
+
for in_ch in range(self.param.shape[2]):
|
|
74
|
+
# Extract parameters for this channel pair
|
|
75
|
+
result[:, out_ch, in_ch] = self._generate_velvet_sequence()
|
|
76
|
+
|
|
77
|
+
return result
|
|
78
|
+
|
|
79
|
+
def _generate_velvet_sequence(
|
|
80
|
+
self,
|
|
81
|
+
) -> torch.Tensor:
|
|
82
|
+
"""Generate a single velvet noise sequence."""
|
|
83
|
+
|
|
84
|
+
# Add random jitter to each position (uniform distribution)
|
|
85
|
+
jitter_factors = torch.rand(self.floor_impulses)
|
|
86
|
+
impulse_indices = torch.ceil(self.grid + self.delta * jitter_factors * (self.Td - 1)).long()
|
|
87
|
+
|
|
88
|
+
# first impulse is at position 0 and all indices are within bounds
|
|
89
|
+
impulse_indices[0] = 0
|
|
90
|
+
impulse_indices = torch.clamp(impulse_indices, max=self.param.shape[0] - 1)
|
|
91
|
+
|
|
92
|
+
# Generate random signs (+1 or -1)
|
|
93
|
+
signs = 2 * torch.randint(0, 2, (self.floor_impulses,)) - 1
|
|
94
|
+
|
|
95
|
+
# Construct sparse signal
|
|
96
|
+
sequence = torch.zeros(self.size[0], device=self.device)
|
|
97
|
+
sequence[impulse_indices] = signs.float()
|
|
98
|
+
|
|
99
|
+
return sequence
|
|
100
|
+
|
|
101
|
+
def initialize_class(self):
|
|
102
|
+
r"""
|
|
103
|
+
Initializes the Filter module.
|
|
104
|
+
|
|
105
|
+
This method checks the shape of the gain parameters, computes the frequency response of the filter,
|
|
106
|
+
and computes the frequency convolution function.
|
|
107
|
+
"""
|
|
108
|
+
self.check_param_shape()
|
|
109
|
+
self.get_io()
|
|
110
|
+
num_impulses = self.param.shape[0] / self.Td
|
|
111
|
+
self.floor_impulses = math.floor(num_impulses)
|
|
112
|
+
self.grid = torch.arange(self.floor_impulses) * self.Td
|
|
113
|
+
self.get_freq_response()
|
|
114
|
+
self.get_freq_convolve()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import math
|
|
1
2
|
import torch
|
|
2
3
|
import torch.nn as nn
|
|
3
4
|
import numpy as np
|
|
@@ -175,11 +176,12 @@ def signal_gallery(
|
|
|
175
176
|
- ``sweep``: A linear sweep from 20 Hz to 20 kHz.
|
|
176
177
|
- ``wgn``: White Gaussian noise.
|
|
177
178
|
- ``exp``: An exponential decay signal.
|
|
179
|
+
- ``velvet``: A velvet noise signal with density :attr:`rate` impulses per second.
|
|
178
180
|
- ``reference``: A reference signal provided as argument :attr:`reference`.
|
|
179
181
|
|
|
180
182
|
**Arguments**:
|
|
181
183
|
- **batch_size** (int): The number of batches to generate.
|
|
182
|
-
- **n_samples** (int):
|
|
184
|
+
- **n_samples** (int): The signal length in samples.
|
|
183
185
|
- **n_channel** (int): The number of channels in each signal.
|
|
184
186
|
- **signal_type** (str, optional): The type of signal to generate. Defaults to 'impulse'.
|
|
185
187
|
- **fs** (int, optional): The sampling frequency of the signals. Defaults to 48000.
|
|
@@ -198,6 +200,7 @@ def signal_gallery(
|
|
|
198
200
|
"exp",
|
|
199
201
|
"reference",
|
|
200
202
|
"noise",
|
|
203
|
+
"velvet",
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
if signal_type not in signal_types:
|
|
@@ -243,6 +246,12 @@ def signal_gallery(
|
|
|
243
246
|
.expand(batch_size, n_samples, n)
|
|
244
247
|
.to(device)
|
|
245
248
|
)
|
|
249
|
+
case "velvet":
|
|
250
|
+
x = torch.empty((batch_size, n_samples, n), device=device)
|
|
251
|
+
for i_batch in range(batch_size):
|
|
252
|
+
for i_ch in range(n):
|
|
253
|
+
x[i_batch, :, i_ch] = gen_velvet_noise(n_samples, fs, rate, device)
|
|
254
|
+
return x
|
|
246
255
|
case "reference":
|
|
247
256
|
if isinstance(reference, torch.Tensor):
|
|
248
257
|
return reference.expand(batch_size, n_samples, n).to(device)
|
|
@@ -254,6 +263,38 @@ def signal_gallery(
|
|
|
254
263
|
return torch.randn((batch_size, n_samples, n), device=device)
|
|
255
264
|
|
|
256
265
|
|
|
266
|
+
def gen_velvet_noise(n_samples: int, fs: int, density: float, device: str | torch.device = None) -> torch.Tensor:
|
|
267
|
+
r"""
|
|
268
|
+
Generate a velvet noise sequence.
|
|
269
|
+
**Arguments**:
|
|
270
|
+
- **n_samples** (int): The length of the signal in samples.
|
|
271
|
+
- **fs** (int): The sampling frequency of the signal in Hz.
|
|
272
|
+
- **density** (float): The density of impulses in impulses per second.
|
|
273
|
+
- **device** (str | torch.device): The device of constructed tensors.
|
|
274
|
+
**Returns**:
|
|
275
|
+
- torch.Tensor: A tensor of shape (n_samples,) containing the velvet noise sequence.
|
|
276
|
+
"""
|
|
277
|
+
Td = fs / density # average distance between impulses
|
|
278
|
+
num_impulses = n_samples / Td # expected number of impulses
|
|
279
|
+
floor_impulses = math.floor(num_impulses)
|
|
280
|
+
grid = torch.arange(floor_impulses) * Td
|
|
281
|
+
|
|
282
|
+
jitter_factors = torch.rand(floor_impulses)
|
|
283
|
+
impulse_indices = torch.ceil(grid + jitter_factors * (Td - 1)).long()
|
|
284
|
+
|
|
285
|
+
# first impulse is at position 0 and all indices are within bounds
|
|
286
|
+
impulse_indices[0] = 0
|
|
287
|
+
impulse_indices = torch.clamp(impulse_indices, max=n_samples - 1)
|
|
288
|
+
|
|
289
|
+
# Generate random signs (+1 or -1)
|
|
290
|
+
signs = 2 * torch.randint(0, 2, (floor_impulses,)) - 1
|
|
291
|
+
|
|
292
|
+
# Construct sparse signal
|
|
293
|
+
sequence = torch.zeros(n_samples, device=device)
|
|
294
|
+
sequence[impulse_indices] = signs.float()
|
|
295
|
+
|
|
296
|
+
return sequence
|
|
297
|
+
|
|
257
298
|
def hertz2rad(hertz: torch.Tensor, fs: int):
|
|
258
299
|
r"""
|
|
259
300
|
Convert frequency from Hz to rad.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import torch
|
|
2
|
+
import math
|
|
2
3
|
from typing import Optional
|
|
3
4
|
import torch.nn as nn
|
|
4
5
|
import torch.nn.functional as F
|
|
@@ -16,7 +17,8 @@ from flamo.auxiliary.eq import (
|
|
|
16
17
|
geq,
|
|
17
18
|
accurate_geq)
|
|
18
19
|
from flamo.auxiliary.scattering import (
|
|
19
|
-
ScatteringMapping
|
|
20
|
+
ScatteringMapping,
|
|
21
|
+
hadamard_matrix)
|
|
20
22
|
# ============================= TRANSFORMS ================================
|
|
21
23
|
|
|
22
24
|
|
|
@@ -928,7 +930,7 @@ class parallelFilter(Filter):
|
|
|
928
930
|
|
|
929
931
|
class ScatteringMatrix(Filter):
|
|
930
932
|
r"""
|
|
931
|
-
A class representing a
|
|
933
|
+
A class representing a Scattering Filter matrix.
|
|
932
934
|
|
|
933
935
|
The :class:`ScatteringMatrix` was designed as filter feedback matrix of the
|
|
934
936
|
Feedback Delay Network (FDN) reverberator structure.
|
|
@@ -1075,6 +1077,145 @@ class ScatteringMatrix(Filter):
|
|
|
1075
1077
|
self.get_freq_response()
|
|
1076
1078
|
self.get_freq_convolve()
|
|
1077
1079
|
|
|
1080
|
+
class VelvetNoiseMatrix(Filter):
|
|
1081
|
+
r"""
|
|
1082
|
+
A class representing a Velvet Noise Filter matrix.
|
|
1083
|
+
|
|
1084
|
+
The :class:`VelvetNoiseMatrix` was designed as filter feedback matrix of the
|
|
1085
|
+
Feedback Delay Network (FDN) reverberator structure.
|
|
1086
|
+
NOTE: It is not learnable.
|
|
1087
|
+
|
|
1088
|
+
The input tensor is expected to be a complex-valued tensor representing the
|
|
1089
|
+
frequency response of the input signal. The input tensor is then convolved in
|
|
1090
|
+
frequency domain with the filter frequency responses to produce the output tensor.
|
|
1091
|
+
|
|
1092
|
+
Shape:
|
|
1093
|
+
- input: :math:`(B, M, N_{in}, ...)`
|
|
1094
|
+
- param: :math:`(N_{taps}, N_{out}, N_{in})`
|
|
1095
|
+
- output: :math:`(B, M, N_{out}, ...)`
|
|
1096
|
+
|
|
1097
|
+
where :math:`B` is the batch size, :math:`M` is the number of frequency bins,
|
|
1098
|
+
:math:`N_{in}` is the number of input channels, :math:`N_{out}` is the number of output channels,
|
|
1099
|
+
and :math:`N_{taps}` is the number of filter parameters per input-output channel pair. By default, :math:`N_{taps}`
|
|
1100
|
+
correspond to the length of the FIR filters.
|
|
1101
|
+
Ellipsis :math:`(...)` represents additional dimensions.
|
|
1102
|
+
|
|
1103
|
+
**Arguments / Attributes**:
|
|
1104
|
+
- **size** (tuple): The size of the filter parameters. Default: (1, 1, 1).
|
|
1105
|
+
- **nfft** (int): The number of FFT points required to compute the frequency response. Default: 2 ** 11.
|
|
1106
|
+
- **density** (float): Average number of pulses per sample. Default: 0.03.
|
|
1107
|
+
- **gain_per_sample** (float): The gain per sample. This is useful when ensuring homogeneous decay in FDNs Default: 0.9999.
|
|
1108
|
+
- **m_L** (torch.tensor): The leftmost delay vector. Default: None.
|
|
1109
|
+
- **m_R** (torch.tensor): The rightmost delay vector. Default: None.
|
|
1110
|
+
- **requires_grad** (bool): Whether the filter parameters require gradients. Default: False.
|
|
1111
|
+
- **alias_decay_db** (float): The decaying factor in dB for the time anti-aliasing envelope. The decay refers to the attenuation after nfft samples. Default: 0.
|
|
1112
|
+
- **device** (str): The device of the constructed tensors. Default: None.
|
|
1113
|
+
|
|
1114
|
+
**Attributes**:
|
|
1115
|
+
- **param** (nn.Parameter): The parameters of the Filter module.
|
|
1116
|
+
- **map** (function): Mapping function to ensure orthogonality of :math:`\mathbf{U}_k`.
|
|
1117
|
+
- **map_filter** (ScatteringMapping): Mapping function to generate the filter matrix.
|
|
1118
|
+
- **fft** (function): The FFT function. Calls the torch.fft.rfft function.
|
|
1119
|
+
- **ifft** (function): The Inverse FFT function. Calls the torch.fft.irfft.
|
|
1120
|
+
- **gamma** (torch.Tensor): The gamma value used for time anti-aliasing envelope.
|
|
1121
|
+
- **new_value** (int): Flag indicating if new values have been assigned.
|
|
1122
|
+
- **freq_response** (torch.Tensor): The frequency response of the filter.
|
|
1123
|
+
- **freq_convolve** (function): The frequency convolution function.
|
|
1124
|
+
- **input_channels** (int): The number of input channels.
|
|
1125
|
+
- **output_channels** (int): The number of output channels.
|
|
1126
|
+
|
|
1127
|
+
Refereces:
|
|
1128
|
+
- Schlecht, S. J., & Habets, E. A. (2020). Scattering in feedback delay networks. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28, 1915-1924.
|
|
1129
|
+
|
|
1130
|
+
"""
|
|
1131
|
+
|
|
1132
|
+
def __init__(
|
|
1133
|
+
self,
|
|
1134
|
+
size: tuple = (1, 1, 1),
|
|
1135
|
+
nfft: int = 2**11,
|
|
1136
|
+
density: float = 0.03,
|
|
1137
|
+
gain_per_sample: float = 0.9999,
|
|
1138
|
+
m_L: torch.tensor = None,
|
|
1139
|
+
m_R: torch.tensor = None,
|
|
1140
|
+
alias_decay_db: float = 0.0,
|
|
1141
|
+
device: Optional[str] = None,
|
|
1142
|
+
):
|
|
1143
|
+
self.sparsity = 1/density
|
|
1144
|
+
self.gain_per_sample = gain_per_sample
|
|
1145
|
+
self.pulse_size = 1
|
|
1146
|
+
self.m_L = m_L
|
|
1147
|
+
self.m_R = m_R
|
|
1148
|
+
map = lambda x: x
|
|
1149
|
+
assert size[1] == size[2], "Matrix must be square"
|
|
1150
|
+
assert (size[1] & (size[1] - 1)) == 0, "At the moment the Matrix must have dimensions which are powers of 2"
|
|
1151
|
+
super().__init__(
|
|
1152
|
+
size=size,
|
|
1153
|
+
nfft=nfft,
|
|
1154
|
+
map=map,
|
|
1155
|
+
requires_grad=False,
|
|
1156
|
+
alias_decay_db=alias_decay_db,
|
|
1157
|
+
device=device,
|
|
1158
|
+
)
|
|
1159
|
+
self.assign_value(torch.tensor(hadamard_matrix(self.size[-1]), device=self.device).unsqueeze(0).repeat(self.size[0], 1, 1))
|
|
1160
|
+
|
|
1161
|
+
def get_freq_convolve(self):
|
|
1162
|
+
r"""
|
|
1163
|
+
Computes the frequency convolution function.
|
|
1164
|
+
|
|
1165
|
+
The frequency convolution is computed using the :func:`torch.einsum` function.
|
|
1166
|
+
|
|
1167
|
+
**Arguments**:
|
|
1168
|
+
**x** (torch.Tensor): Input tensor.
|
|
1169
|
+
|
|
1170
|
+
**Returns**:
|
|
1171
|
+
torch.Tensor: Output tensor after frequency convolution.
|
|
1172
|
+
"""
|
|
1173
|
+
self.freq_convolve = lambda x, param: torch.einsum(
|
|
1174
|
+
"fmn,bfn...->bfm...", self.freq_response(param), x
|
|
1175
|
+
)
|
|
1176
|
+
|
|
1177
|
+
def get_freq_response(self):
|
|
1178
|
+
r"""
|
|
1179
|
+
Computes the frequency response of the filter.
|
|
1180
|
+
|
|
1181
|
+
The mapping function is applied to the filter parameters to obtain the filter impulse responses.
|
|
1182
|
+
Then, the time anti-aliasing envelope is computed and applied to the impulse responses. Finally,
|
|
1183
|
+
the frequency response is obtained by computing the FFT of the filter impulse responses.
|
|
1184
|
+
"""
|
|
1185
|
+
L = (
|
|
1186
|
+
(sum(self.map_filter.shifts).max() + 1).item()
|
|
1187
|
+
+ self.m_L.max().item()
|
|
1188
|
+
+ self.m_R.max().item()
|
|
1189
|
+
)
|
|
1190
|
+
self.freq_response = lambda param: self.fft(
|
|
1191
|
+
self.map_filter(self.map(param))
|
|
1192
|
+
* (self.gamma ** torch.arange(0, L, device=self.device)).view(
|
|
1193
|
+
-1, *tuple([1 for i in self.size[1:]])
|
|
1194
|
+
)
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
def initialize_class(self):
|
|
1198
|
+
r"""
|
|
1199
|
+
Initializes the ScatteringMatrix module.
|
|
1200
|
+
|
|
1201
|
+
This method creates the mapping to generate the filter matrix, checks the shape of the gain parameters, computes the frequency response of the filter,
|
|
1202
|
+
and computes the frequency convolution function.
|
|
1203
|
+
"""
|
|
1204
|
+
self.map_filter = ScatteringMapping(
|
|
1205
|
+
self.size[-1],
|
|
1206
|
+
n_stages=self.size[0] - 1,
|
|
1207
|
+
sparsity=math.floor(self.sparsity),
|
|
1208
|
+
gain_per_sample=self.gain_per_sample,
|
|
1209
|
+
pulse_size=self.pulse_size,
|
|
1210
|
+
m_L=self.m_L,
|
|
1211
|
+
m_R=self.m_R,
|
|
1212
|
+
device=self.device,
|
|
1213
|
+
)
|
|
1214
|
+
self.check_param_shape()
|
|
1215
|
+
self.get_io()
|
|
1216
|
+
self.get_freq_response()
|
|
1217
|
+
self.get_freq_convolve()
|
|
1218
|
+
|
|
1078
1219
|
|
|
1079
1220
|
class Biquad(Filter):
|
|
1080
1221
|
r"""
|
|
@@ -2410,7 +2551,7 @@ class AccurateGEQ(Filter):
|
|
|
2410
2551
|
:math:`N_{in}` is the number of input channels, :math:`N_{out}` is the number of output channels,
|
|
2411
2552
|
The :attr:'param' attribute represent the command gains of each band + shelving filters. The first dimension of the :attr:'param' tensor corresponds to the number of command gains/filters :math:`K`.
|
|
2412
2553
|
Ellipsis :math:`(...)` represents additional dimensions (not tested).
|
|
2413
|
-
NOTE I: It is not
|
|
2554
|
+
NOTE I: It is not learnable
|
|
2414
2555
|
NOTE II: To avoid NaN or Inf values in the frequency response, the operations
|
|
2415
2556
|
performed in the frequency domain are done in double precision. The original
|
|
2416
2557
|
data type is restored at the end of the computation.
|
|
@@ -2531,7 +2672,7 @@ class parallelAccurateGEQ(AccurateGEQ):
|
|
|
2531
2672
|
r"""
|
|
2532
2673
|
Parallel counterpart of the :class:`GEQ` class
|
|
2533
2674
|
For information about **attributes** and **methods** see :class:`flamo.processor.dsp.GEQ`.
|
|
2534
|
-
NOTE: It is not
|
|
2675
|
+
NOTE: It is not learnable.
|
|
2535
2676
|
|
|
2536
2677
|
Shape:
|
|
2537
2678
|
- input: :math:`(B, M, N, ...)`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|