pyFDN 0.1.0__tar.gz → 0.3.0__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.
- pyfdn-0.3.0/AUTHORS.rst +17 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/CONTRIBUTING.rst +29 -2
- pyfdn-0.3.0/HISTORY.rst +37 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/MANIFEST.in +1 -1
- {pyfdn-0.1.0 → pyfdn-0.3.0}/PKG-INFO +30 -3
- {pyfdn-0.1.0 → pyfdn-0.3.0}/README.rst +17 -0
- pyfdn-0.3.0/docs/Makefile +39 -0
- pyfdn-0.3.0/docs/__init__.py +1 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/api_reference.rst +52 -7
- pyfdn-0.3.0/docs/audio_gallery.py +150 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/conf.py +11 -2
- pyfdn-0.3.0/docs/example_gallery.py +175 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/index.rst +8 -1
- pyfdn-0.3.0/docs/patch_rst.py +35 -0
- pyfdn-0.3.0/docs/references.py +8 -0
- pyfdn-0.3.0/docs/usage.rst +39 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/pyproject.toml +31 -10
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/__init__.py +41 -14
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/acoustics.py +187 -43
- pyfdn-0.3.0/src/pyFDN/auxiliary/audio.py +83 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/flamo_graph.py +1 -3
- pyfdn-0.3.0/src/pyFDN/auxiliary/marimo_utils.py +48 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/plot.py +4 -4
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/utils.py +23 -0
- pyfdn-0.3.0/src/pyFDN/build_io.py +151 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/allpass_FDN/allpass_completion.py +3 -1
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/allpass_FDN/homogeneous_allpass_fdn.py +9 -10
- pyfdn-0.3.0/src/pyFDN/presets.py +50 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/process.py +29 -20
- pyfdn-0.3.0/src/pyFDN/references.py +105 -0
- pyfdn-0.3.0/src/pyFDN/resources/ATTRIBUTION.md +32 -0
- pyfdn-0.3.0/src/pyFDN/resources/__init__.py +1 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/drums/drums.wav +0 -0
- {pyfdn-0.1.0/src/pyFDN/audio → pyfdn-0.3.0/src/pyFDN/resources/audio/general}/synth_dry.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/metadata.json +79 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/rir/s3_r4_o.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/speech/P1_Set1_8.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/speech/P20_Set1_8.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/strings/Kleiderschrank_Taylor_DI.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/audio/strings/Sommerhit2016_Taylor_DI.wav +0 -0
- pyfdn-0.3.0/src/pyFDN/resources/licenses/diff-fdn-colorless-MIT.txt +21 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N16_d1.json +395 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N16_d2.json +395 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N4_d1.json +71 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N4_d2.json +71 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N6_d1.json +105 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N6_d2.json +105 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N8_d1.json +147 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_N8_d2.json +147 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N16_d1.json +395 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N16_d2.json +395 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N4_d1.json +71 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N4_d2.json +71 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N6_d1.json +105 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N6_d2.json +105 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N8_d1.json +147 -0
- pyfdn-0.3.0/src/pyFDN/resources/presets/colorless_FDN/colorless_init_N8_d2.json +147 -0
- pyfdn-0.3.0/src/pyFDN/resources/references.bib +290 -0
- pyfdn-0.3.0/src/pyFDN/td/__init__.py +58 -0
- pyfdn-0.3.0/src/pyFDN/td/connectors.py +300 -0
- pyfdn-0.3.0/src/pyFDN/td/operators.py +508 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/train/__init__.py +8 -2
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/train/build.py +4 -4
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/train/engine.py +2 -6
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/train/objectives.py +7 -7
- pyfdn-0.3.0/src/pyFDN/translate/dss_to_impz.py +123 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN.egg-info/PKG-INFO +30 -3
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN.egg-info/SOURCES.txt +46 -67
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN.egg-info/requires.txt +9 -1
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_api_reference.py +1 -0
- pyfdn-0.3.0/tests/test_audio_gallery.py +24 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_acoustics.py +71 -5
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_utils.py +33 -0
- pyfdn-0.3.0/tests/test_build_io.py +50 -0
- pyfdn-0.3.0/tests/test_example_gallery.py +37 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_generate.py +14 -2
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_marimo_examples_run.py +15 -0
- pyfdn-0.3.0/tests/test_packaged_resources.py +98 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_process_extensions.py +63 -8
- pyfdn-0.3.0/tests/test_td_connectors.py +288 -0
- pyfdn-0.3.0/tests/test_td_graph_processing.py +674 -0
- pyfdn-0.3.0/tests/test_td_operators.py +418 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_time_varying_matrix.py +7 -3
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_train.py +28 -15
- pyfdn-0.1.0/AUTHORS.rst +0 -11
- pyfdn-0.1.0/HISTORY.rst +0 -8
- pyfdn-0.1.0/docs/Makefile +0 -20
- pyfdn-0.1.0/docs/examples_gallery.rst +0 -131
- pyfdn-0.1.0/docs/generated/pyFDN.DFiltMatrix.rst +0 -23
- pyfdn-0.1.0/docs/generated/pyFDN.FeedbackDelay.rst +0 -25
- pyfdn-0.1.0/docs/generated/pyFDN.FilterMatrix.rst +0 -36
- pyfdn-0.1.0/docs/generated/pyFDN.TFMatrix.rst +0 -25
- pyfdn-0.1.0/docs/generated/pyFDN.ZFIR.rst +0 -32
- pyfdn-0.1.0/docs/generated/pyFDN.ZSOS.rst +0 -32
- pyfdn-0.1.0/docs/generated/pyFDN.ZScalar.rst +0 -32
- pyfdn-0.1.0/docs/generated/pyFDN.ZTF.rst +0 -38
- pyfdn-0.1.0/docs/generated/pyFDN.absorption_filters.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.absorption_to_rt.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.construct_cascaded_paraunitary_matrix.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.construct_velvet_feedback_matrix.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.db_to_lin.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.db_to_sq.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.det_polynomial.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.dss_to_impz.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.dss_to_ss.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.echo_density.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.edc.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.ensure_3d.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.hertz_to_unit.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.interpolate_orthogonal.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.is_almost_zero.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.is_bounding_curve.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.is_orthogonal.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.last_nonzero_indices.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.lin_to_db.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.matrix_convolution.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.matrix_delay_approximation.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.matrix_polyder.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.matrix_polyval.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.matrix_sqrt.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.mgrpdelay.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.ms_to_smp.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.mulaw_decode.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.mulaw_encode.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.negpolyder.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.one_pole_absorption.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.outer_sum_approximation.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.peak_normalize.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.plot_impulse_response_matrix.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.plot_system_matrix.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.pole_boundaries.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.poly_degree.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.polyder_rational.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.polydiag.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.process_fdn.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.random_matrix_shift.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.random_orthogonal.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.rt_to_gain_per_sample.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.rt_to_slope.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.shift_matrix.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.shift_matrix_distribute.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.skew.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.slope_to_rt.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.sq_to_db.rst +0 -6
- pyfdn-0.1.0/docs/generated/pyFDN.tiny_rotation_matrix.rst +0 -6
- pyfdn-0.1.0/docs/usage.rst +0 -17
- pyfdn-0.1.0/src/pyFDN/audio/example_process_fdn_output.wav +0 -0
- pyfdn-0.1.0/src/pyFDN/audio/s3_r4_o.wav +0 -0
- pyfdn-0.1.0/src/pyFDN/auxiliary/audio.py +0 -54
- pyfdn-0.1.0/src/pyFDN/dsp/__init__.py +0 -3
- pyfdn-0.1.0/src/pyFDN/dsp/dfilt_matrix.py +0 -53
- pyfdn-0.1.0/src/pyFDN/dsp/feedback_delay.py +0 -47
- pyfdn-0.1.0/src/pyFDN/dsp/sos_filter_bank.py +0 -57
- pyfdn-0.1.0/src/pyFDN/dsp/time_varying_matrix.py +0 -144
- pyfdn-0.1.0/src/pyFDN/pyFDN.py +0 -1
- pyfdn-0.1.0/src/pyFDN/translate/dss_to_impz.py +0 -48
- pyfdn-0.1.0/tests/test_example_gallery.py +0 -35
- {pyfdn-0.1.0 → pyfdn-0.3.0}/LICENSE +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/authors.rst +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/contributing.rst +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/history.rst +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/installation.rst +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/logo/logo_pyFDN_3.png +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/logo/logo_pyFDN_4.png +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/logo/pyfdn_logo_basic.png +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/logo/pyfdn_logo_wave.png +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/make.bat +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/docs/readme.rst +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/setup.cfg +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/setup.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/__init__.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/allpass.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/coupled_rooms.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/delay.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/flamo.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/math.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/poles.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/auxiliary/tiny_rotation_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/SDN.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/allpass_FDN/__init__.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/allpass_FDN/rand_admissible_homogeneous_allpass.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/allpass_in_fdn.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/anderson_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/complete_orthogonal.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/construct_cascaded_paraunitary_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/construct_paraunitary_from_elementals.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/construct_velvet_feedback_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/degree_one_lossless.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/fdn_matrix_gallery.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/householder_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/is_almost_zero.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/nearest_orthogonal.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/nearest_sign_agnostic_orthogonal.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/random_matrix_shift.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/random_orthogonal.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/sample_delay_lengths.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/schroeder_reverberator.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/shift_matrix.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/generate/shift_matrix_distribute.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/__init__.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/absorption_geq.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/bandpass_filter.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/design_geq.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/graphic_eq.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/probe_sos.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/graphicEQ/shelving_filter.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/dss_to_flamo.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/dss_to_pr.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/dss_to_ss.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/dss_to_tf.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/flamo_to_pr.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/impz_to_res.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/mtf_to_impz.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN/translate/pr_to_impz.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN.egg-info/dependency_links.txt +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/src/pyFDN.egg-info/top_level.txt +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/__init__.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/conftest.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/matloader.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/reference/README.md +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/reference/example_onePoleAbsorption.mat +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/reference/onePoleAbsorption_reference.mat +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_delay.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_flamo.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_math.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_auxiliary_plot.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_coupled_rooms.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_dss_to_pr.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_flamo_graph.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_flamo_one_pole_absorption.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_flamo_to_pr.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_graphic_eq.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_pyFDN.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_sdn.py +0 -0
- {pyfdn-0.1.0 → pyfdn-0.3.0}/tests/test_translate.py +0 -0
pyfdn-0.3.0/AUTHORS.rst
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
=======
|
|
2
|
+
Credits
|
|
3
|
+
=======
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Core Contributors
|
|
7
|
+
-----------------
|
|
8
|
+
|
|
9
|
+
* Sebastian J. Schlecht
|
|
10
|
+
* Facundo Franchino
|
|
11
|
+
* Jeremy Bai
|
|
12
|
+
* Alma Hova
|
|
13
|
+
* Cristóbal Andrade
|
|
14
|
+
* Gloria Dal Santo
|
|
15
|
+
* Bharadwaj Lakuduva Suresh Babu
|
|
16
|
+
* Gian Marco De Bortoli
|
|
17
|
+
* Kalyan Pandey
|
|
@@ -137,8 +137,35 @@ Building the Documentation
|
|
|
137
137
|
Repository Index
|
|
138
138
|
----------------
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
The repository separates the installable package, executable examples,
|
|
141
|
+
documentation sources, and tests:
|
|
142
|
+
|
|
143
|
+
* ``src/pyFDN/`` contains the library. The top-level ``__init__.py`` defines
|
|
144
|
+
the public API, while ``process.py``, ``build_io.py``, and ``presets.py``
|
|
145
|
+
provide the main processing and persistence entry points.
|
|
146
|
+
* ``src/pyFDN/generate/`` contains feedback-matrix and FDN construction
|
|
147
|
+
algorithms, including the allpass and scattering-delay-network builders.
|
|
148
|
+
* ``src/pyFDN/td/`` contains stateful block-processing operators and the
|
|
149
|
+
connectors (``Series``, ``Parallel``, ``Recursion``) that wire them into a
|
|
150
|
+
time-domain graph. ``process_fdn`` uses ``MatrixFIR`` for polynomial feedback
|
|
151
|
+
matrices; ``SOSBank`` implements per-delay-line filter cascades used for
|
|
152
|
+
frequency-dependent absorption.
|
|
153
|
+
* ``src/pyFDN/graphicEQ/`` contains graphic-EQ and absorption-filter design,
|
|
154
|
+
while ``src/pyFDN/translate/`` converts between delay state-space, transfer
|
|
155
|
+
function, pole-residue, impulse-response, and FLAMO representations.
|
|
156
|
+
* ``src/pyFDN/train/`` contains the trainable FDN construction, objectives,
|
|
157
|
+
and optimization loop. ``src/pyFDN/auxiliary/`` holds shared analysis,
|
|
158
|
+
plotting, audio, delay, and numerical helpers.
|
|
159
|
+
* ``examples/`` contains executable Marimo notebooks. Metadata at the top of
|
|
160
|
+
each ``example_*.py`` file drives the generated documentation gallery.
|
|
161
|
+
* ``tests/`` mirrors the public feature areas with unit, regression, and
|
|
162
|
+
integration coverage; ``tests/reference/`` stores reference data and its
|
|
163
|
+
provenance notes.
|
|
164
|
+
* ``docs/`` contains authored Sphinx pages and the scripts that generate API
|
|
165
|
+
stubs and galleries. Generated pages and HTML output are intentionally not
|
|
166
|
+
committed.
|
|
167
|
+
* ``.github/`` contains the continuous-integration, packaging, and GitHub
|
|
168
|
+
Pages workflows.
|
|
142
169
|
|
|
143
170
|
|
|
144
171
|
Testing Pipeline
|
pyfdn-0.3.0/HISTORY.rst
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
=======
|
|
2
|
+
History
|
|
3
|
+
=======
|
|
4
|
+
|
|
5
|
+
0.3.0 (2026-08-17)
|
|
6
|
+
------------------
|
|
7
|
+
|
|
8
|
+
* **Breaking:** replace the ``pyFDN.dsp`` subpackage with ``pyFDN.td``. The
|
|
9
|
+
top-level ``FeedbackDelay``, ``FIRMatrixFilter`` and ``SOSFilterBank``
|
|
10
|
+
exports are gone; use ``pyFDN.td`` operators instead.
|
|
11
|
+
* **Breaking:** ship the packaged colorless-FDN presets as JSON rather than
|
|
12
|
+
MATLAB ``.mat`` files.
|
|
13
|
+
* Add ``pyFDN.td``, a time-domain block-based processing graph built on NumPy
|
|
14
|
+
alone (no torch, no FFT), with the ``Series``, ``Parallel`` and
|
|
15
|
+
``Recursion`` connectors and stateful ``Gain``, ``Delay``, ``SOSBank``,
|
|
16
|
+
``MatrixFIR``, ``MatrixConvolver`` and ``TimeVaryingMatrix`` operators.
|
|
17
|
+
* Add ``load_fdn_build``, ``save_fdn_build``, ``fdn_build_from_dict`` and
|
|
18
|
+
``fdn_build_to_dict`` for reading and writing FDN builds as JSON.
|
|
19
|
+
* Add an FDN-to-FAUST example that compiles a pyFDN design with adac, and a
|
|
20
|
+
reverberation-enhancement example.
|
|
21
|
+
* Improve the example gallery and stop tracking generated documentation in the
|
|
22
|
+
repository.
|
|
23
|
+
* Test on Python 3.14 in CI and the documentation build.
|
|
24
|
+
|
|
25
|
+
0.2.0 (2026-08-10)
|
|
26
|
+
------------------
|
|
27
|
+
|
|
28
|
+
* Package compact audio examples and predefined colorless-FDN coefficients so
|
|
29
|
+
browser-hosted tutorials work without repository-relative files.
|
|
30
|
+
* Add public APIs for packaged audio, FDN presets, and paper references.
|
|
31
|
+
* Add generated documentation galleries and wheel-content checks.
|
|
32
|
+
* Keep decay-estimation dependencies optional for a smaller core installation.
|
|
33
|
+
|
|
34
|
+
0.1.0 (2025-07-02)
|
|
35
|
+
------------------
|
|
36
|
+
|
|
37
|
+
* First release on PyPI.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyFDN
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python library for Feedback Delay Networks
|
|
5
5
|
Author: Sebastian J. Schlecht, Facundo Franchino, Jeremy Bai
|
|
6
6
|
Maintainer: Facundo Franchino, Sebastian J. Schlecht
|
|
@@ -12,24 +12,31 @@ Classifier: Development Status :: 3 - Alpha
|
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
License-File: src/pyFDN/resources/ATTRIBUTION.md
|
|
20
|
+
License-File: src/pyFDN/resources/licenses/diff-fdn-colorless-MIT.txt
|
|
19
21
|
Requires-Dist: numpy
|
|
20
22
|
Requires-Dist: soundfile
|
|
21
23
|
Requires-Dist: scipy
|
|
22
24
|
Requires-Dist: flamo>=0.2.14
|
|
23
25
|
Requires-Dist: flareverb
|
|
24
|
-
Requires-Dist: pyroomacoustics
|
|
25
26
|
Provides-Extra: examples
|
|
26
27
|
Requires-Dist: marimo; extra == "examples"
|
|
28
|
+
Requires-Dist: adac; extra == "examples"
|
|
27
29
|
Requires-Dist: matplotlib>=3.5.0; extra == "examples"
|
|
28
30
|
Requires-Dist: plotly>=5.0.0; extra == "examples"
|
|
31
|
+
Requires-Dist: multislope>=0.1.1; extra == "examples"
|
|
32
|
+
Requires-Dist: pyroomacoustics; extra == "examples"
|
|
29
33
|
Provides-Extra: test
|
|
30
34
|
Requires-Dist: marimo; extra == "test"
|
|
35
|
+
Requires-Dist: adac; extra == "test"
|
|
31
36
|
Requires-Dist: matplotlib>=3.5.0; extra == "test"
|
|
32
37
|
Requires-Dist: plotly>=5.0.0; extra == "test"
|
|
38
|
+
Requires-Dist: multislope>=0.1.1; extra == "test"
|
|
39
|
+
Requires-Dist: pyroomacoustics; extra == "test"
|
|
33
40
|
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
34
41
|
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
35
42
|
Requires-Dist: coverage>=7.0.0; extra == "test"
|
|
@@ -56,6 +63,9 @@ Requires-Dist: ipykernel>=6.0.0; extra == "docs"
|
|
|
56
63
|
Requires-Dist: pandoc>=2.0; extra == "docs"
|
|
57
64
|
Requires-Dist: plotly>=5.0.0; extra == "docs"
|
|
58
65
|
Requires-Dist: matplotlib>=3.5.0; extra == "docs"
|
|
66
|
+
Requires-Dist: multislope>=0.1.1; extra == "docs"
|
|
67
|
+
Requires-Dist: pyroomacoustics; extra == "docs"
|
|
68
|
+
Requires-Dist: adac; extra == "docs"
|
|
59
69
|
Dynamic: license-file
|
|
60
70
|
|
|
61
71
|
=====
|
|
@@ -89,6 +99,14 @@ Overview
|
|
|
89
99
|
|
|
90
100
|
``pyFDN`` provides building blocks for designing, simulating, and analysing Feedback Delay Networks (FDNs). The package focuses on reusable, tested helper functions that simplify typical FDN workflows such as creating orthogonal feedback matrices, designing loop filters, and inspecting pole locations. Using ``flamo`` as a dependency, ``pyFDN`` allows modular design of advanced FDN structure with DSP operations in time and frequency domain.
|
|
91
101
|
|
|
102
|
+
The `pyFDN tutorial
|
|
103
|
+
<https://artificial-audio.github.io/pyfdn-tutorial-2026/>`_ provides an introduction to the package.
|
|
104
|
+
|
|
105
|
+
The source code is MIT-licensed. Small packaged tutorial resources retain the
|
|
106
|
+
separate terms recorded in ``src/pyFDN/resources/ATTRIBUTION.md``; in
|
|
107
|
+
particular, the Pori concert-hall impulse response is limited to
|
|
108
|
+
noncommercial use.
|
|
109
|
+
|
|
92
110
|
|
|
93
111
|
Highlights
|
|
94
112
|
----------
|
|
@@ -156,3 +174,12 @@ Or, inside an activated virtual environment::
|
|
|
156
174
|
|
|
157
175
|
For linting and packaging helpers see ``Makefile`` (``make lint``/``make docs``)
|
|
158
176
|
and ``tox.ini`` for multi-environment testing.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
Helpful links
|
|
180
|
+
-------------
|
|
181
|
+
|
|
182
|
+
* `List of papers on Feedback Delay Networks <https://github.com/gdalsanto/delay-network-reverbs>`_ .
|
|
183
|
+
* `Multislope Estimation library <https://github.com/artificial-audio/multislope>`_ .
|
|
184
|
+
* `FLAMO (An Open-Source Library for Frequency-Domain Differentiable Audio Processing) <https://github.com/gdalsanto/flamo>`_ .
|
|
185
|
+
* `ADAC (Automatic Differentiable Audio Compilation) library <https://github.com/cucuwritescode/adac>`_ .
|
|
@@ -29,6 +29,14 @@ Overview
|
|
|
29
29
|
|
|
30
30
|
``pyFDN`` provides building blocks for designing, simulating, and analysing Feedback Delay Networks (FDNs). The package focuses on reusable, tested helper functions that simplify typical FDN workflows such as creating orthogonal feedback matrices, designing loop filters, and inspecting pole locations. Using ``flamo`` as a dependency, ``pyFDN`` allows modular design of advanced FDN structure with DSP operations in time and frequency domain.
|
|
31
31
|
|
|
32
|
+
The `pyFDN tutorial
|
|
33
|
+
<https://artificial-audio.github.io/pyfdn-tutorial-2026/>`_ provides an introduction to the package.
|
|
34
|
+
|
|
35
|
+
The source code is MIT-licensed. Small packaged tutorial resources retain the
|
|
36
|
+
separate terms recorded in ``src/pyFDN/resources/ATTRIBUTION.md``; in
|
|
37
|
+
particular, the Pori concert-hall impulse response is limited to
|
|
38
|
+
noncommercial use.
|
|
39
|
+
|
|
32
40
|
|
|
33
41
|
Highlights
|
|
34
42
|
----------
|
|
@@ -96,3 +104,12 @@ Or, inside an activated virtual environment::
|
|
|
96
104
|
|
|
97
105
|
For linting and packaging helpers see ``Makefile`` (``make lint``/``make docs``)
|
|
98
106
|
and ``tox.ini`` for multi-environment testing.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
Helpful links
|
|
110
|
+
-------------
|
|
111
|
+
|
|
112
|
+
* `List of papers on Feedback Delay Networks <https://github.com/gdalsanto/delay-network-reverbs>`_ .
|
|
113
|
+
* `Multislope Estimation library <https://github.com/artificial-audio/multislope>`_ .
|
|
114
|
+
* `FLAMO (An Open-Source Library for Frequency-Domain Differentiable Audio Processing) <https://github.com/gdalsanto/flamo>`_ .
|
|
115
|
+
* `ADAC (Automatic Differentiable Audio Compilation) library <https://github.com/cucuwritescode/adac>`_ .
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line.
|
|
5
|
+
PYTHON ?= python
|
|
6
|
+
SPHINXOPTS =
|
|
7
|
+
SPHINXBUILD ?= $(PYTHON) -msphinx
|
|
8
|
+
SPHINXPROJ = pyFDN
|
|
9
|
+
SOURCEDIR = .
|
|
10
|
+
BUILDDIR = _build
|
|
11
|
+
SPHINXAPIDOC ?= $(PYTHON) -msphinx.ext.apidoc
|
|
12
|
+
|
|
13
|
+
# Put it first so that "make" without argument is like "make help".
|
|
14
|
+
help:
|
|
15
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
16
|
+
|
|
17
|
+
.PHONY: help Makefile clean clean-generated generate-rst html
|
|
18
|
+
|
|
19
|
+
# API stubs and autosummary pages are reproducible build inputs. Remove them
|
|
20
|
+
# before every build so deleted or renamed public objects cannot leave stale
|
|
21
|
+
# documentation behind.
|
|
22
|
+
clean-generated:
|
|
23
|
+
$(RM) modules.rst pyFDN.rst pyFDN.*.rst
|
|
24
|
+
$(RM) -r generated
|
|
25
|
+
|
|
26
|
+
generate-rst: clean-generated
|
|
27
|
+
$(SPHINXAPIDOC) -f -o "$(SOURCEDIR)" ../src/pyFDN
|
|
28
|
+
$(PYTHON) patch_rst.py
|
|
29
|
+
|
|
30
|
+
clean: clean-generated
|
|
31
|
+
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
32
|
+
|
|
33
|
+
html: generate-rst
|
|
34
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
35
|
+
|
|
36
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
37
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
38
|
+
%: Makefile
|
|
39
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Documentation build helpers; this package is not distributed in the wheel."""
|
|
@@ -93,8 +93,11 @@ Acoustics & Absorption
|
|
|
93
93
|
pyFDN.absorption_to_rt
|
|
94
94
|
pyFDN.estimate_initial_level_bands
|
|
95
95
|
pyFDN.estimate_rt_bands
|
|
96
|
+
pyFDN.octave_bands
|
|
97
|
+
pyFDN.octave_band_filterbank
|
|
96
98
|
pyFDN.rt_to_gain_per_sample
|
|
97
99
|
pyFDN.rt_to_slope
|
|
100
|
+
pyFDN.slope_amplitude_to_level
|
|
98
101
|
pyFDN.slope_to_rt
|
|
99
102
|
|
|
100
103
|
Graphic EQ
|
|
@@ -111,16 +114,29 @@ Graphic EQ
|
|
|
111
114
|
pyFDN.shelving_filter
|
|
112
115
|
pyFDN.bandpass_filter
|
|
113
116
|
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
Time-Domain Graph (``pyFDN.td``)
|
|
118
|
+
--------------------------------
|
|
119
|
+
|
|
120
|
+
Stateful block-processing operators, wired into a graph by the connectors and
|
|
121
|
+
rendered with ``.process(signal)``. See :mod:`pyFDN.td`.
|
|
116
122
|
|
|
117
123
|
.. autosummary::
|
|
118
124
|
:toctree: generated/
|
|
119
125
|
:nosignatures:
|
|
120
126
|
|
|
121
|
-
pyFDN.
|
|
122
|
-
pyFDN.
|
|
123
|
-
pyFDN.
|
|
127
|
+
pyFDN.td.TimeOperator
|
|
128
|
+
pyFDN.td.Identity
|
|
129
|
+
pyFDN.td.Gain
|
|
130
|
+
pyFDN.td.Delay
|
|
131
|
+
pyFDN.td.AbsoluteValue
|
|
132
|
+
pyFDN.td.SOSBank
|
|
133
|
+
pyFDN.td.MatrixFIR
|
|
134
|
+
pyFDN.td.MatrixConvolver
|
|
135
|
+
pyFDN.td.TimeVaryingMatrix
|
|
136
|
+
pyFDN.td.RecursionState
|
|
137
|
+
pyFDN.td.Series
|
|
138
|
+
pyFDN.td.Parallel
|
|
139
|
+
pyFDN.td.Recursion
|
|
124
140
|
|
|
125
141
|
Delay Utilities
|
|
126
142
|
---------------
|
|
@@ -172,6 +188,7 @@ General Utilities
|
|
|
172
188
|
pyFDN.lin_to_db
|
|
173
189
|
pyFDN.sq_to_db
|
|
174
190
|
pyFDN.ensure_3d
|
|
191
|
+
pyFDN.fade_out
|
|
175
192
|
pyFDN.hertz_to_unit
|
|
176
193
|
pyFDN.hertz_to_rad
|
|
177
194
|
pyFDN.rad_to_hertz
|
|
@@ -181,10 +198,28 @@ General Utilities
|
|
|
181
198
|
pyFDN.mulaw_decode
|
|
182
199
|
pyFDN.mulaw_encode
|
|
183
200
|
pyFDN.peak_normalize
|
|
184
|
-
pyFDN.load_audio
|
|
185
201
|
pyFDN.pole_boundaries
|
|
186
202
|
pyFDN.skew
|
|
187
203
|
|
|
204
|
+
Build Files, Packaged Examples & References
|
|
205
|
+
--------------------------------------------
|
|
206
|
+
|
|
207
|
+
.. autosummary::
|
|
208
|
+
:toctree: generated/
|
|
209
|
+
:nosignatures:
|
|
210
|
+
|
|
211
|
+
pyFDN.available_audio
|
|
212
|
+
pyFDN.audio_metadata
|
|
213
|
+
pyFDN.load_audio
|
|
214
|
+
pyFDN.available_fdn_presets
|
|
215
|
+
pyFDN.load_fdn_preset
|
|
216
|
+
pyFDN.fdn_build_to_dict
|
|
217
|
+
pyFDN.fdn_build_from_dict
|
|
218
|
+
pyFDN.save_fdn_build
|
|
219
|
+
pyFDN.load_fdn_build
|
|
220
|
+
pyFDN.paper_reference
|
|
221
|
+
pyFDN.paper_link
|
|
222
|
+
|
|
188
223
|
State-Space Translators
|
|
189
224
|
-----------------------
|
|
190
225
|
|
|
@@ -194,6 +229,7 @@ State-Space Translators
|
|
|
194
229
|
|
|
195
230
|
pyFDN.dss_to_ss
|
|
196
231
|
pyFDN.dss_to_impz
|
|
232
|
+
pyFDN.build_to_impz
|
|
197
233
|
pyFDN.dss_to_tf
|
|
198
234
|
pyFDN.dss_to_pr
|
|
199
235
|
pyFDN.dss_to_flamo
|
|
@@ -225,7 +261,7 @@ Training
|
|
|
225
261
|
|
|
226
262
|
pyFDN.build_fdn
|
|
227
263
|
pyFDN.trainable_from_build
|
|
228
|
-
pyFDN.
|
|
264
|
+
pyFDN.build_set_decay
|
|
229
265
|
pyFDN.Trainable
|
|
230
266
|
pyFDN.train_fdn
|
|
231
267
|
pyFDN.TrainLog
|
|
@@ -252,6 +288,15 @@ Plotting
|
|
|
252
288
|
pyFDN.downsample_minmax
|
|
253
289
|
pyFDN.downsample_plotly_trace
|
|
254
290
|
|
|
291
|
+
Notebook Display
|
|
292
|
+
----------------
|
|
293
|
+
|
|
294
|
+
.. autosummary::
|
|
295
|
+
:toctree: generated/
|
|
296
|
+
:nosignatures:
|
|
297
|
+
|
|
298
|
+
pyFDN.labeled_audio
|
|
299
|
+
|
|
255
300
|
FLAMO Graph
|
|
256
301
|
-----------
|
|
257
302
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"""Generate the audio gallery from the audio files packaged with pyFDN."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import html
|
|
6
|
+
import json
|
|
7
|
+
from collections import defaultdict
|
|
8
|
+
from dataclasses import dataclass
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from urllib.parse import quote
|
|
11
|
+
|
|
12
|
+
DOCS_DIR = Path(__file__).resolve().parent
|
|
13
|
+
PROJECT_ROOT = DOCS_DIR.parent
|
|
14
|
+
AUDIO_SOURCE_DIR = PROJECT_ROOT / "src" / "pyFDN" / "resources" / "audio"
|
|
15
|
+
AUDIO_REFERENCES_FILE = AUDIO_SOURCE_DIR / "metadata.json"
|
|
16
|
+
OUTPUT_FILE = DOCS_DIR / "audio_gallery.rst"
|
|
17
|
+
GITHUB_AUDIO_ROOT = (
|
|
18
|
+
"https://raw.githubusercontent.com/artificial-audio/pyFDN/"
|
|
19
|
+
"main/src/pyFDN/resources/audio/"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
UNCATEGORIZED = "uncategorized"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True)
|
|
26
|
+
class AudioExample:
|
|
27
|
+
path: Path
|
|
28
|
+
category: str
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def filename(self) -> str:
|
|
32
|
+
return self.path.name
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def display_label(self) -> str:
|
|
36
|
+
return f"{self.filename}"
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def audio_url(self) -> str:
|
|
40
|
+
relative = self.path.relative_to(AUDIO_SOURCE_DIR)
|
|
41
|
+
return GITHUB_AUDIO_ROOT + quote(relative.as_posix())
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def discover_audio_files() -> list[AudioExample]:
|
|
45
|
+
examples = []
|
|
46
|
+
for path in sorted(AUDIO_SOURCE_DIR.rglob("*.wav")):
|
|
47
|
+
relative = path.relative_to(AUDIO_SOURCE_DIR)
|
|
48
|
+
category = relative.parts[0] if len(relative.parts) > 1 else UNCATEGORIZED
|
|
49
|
+
examples.append(AudioExample(path, category))
|
|
50
|
+
return examples
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def render_gallery(examples: list[AudioExample]) -> str:
|
|
54
|
+
# Load audio metadata
|
|
55
|
+
with open(AUDIO_REFERENCES_FILE, encoding="utf-8") as f:
|
|
56
|
+
audio_references = {item["filename"]: item for item in json.load(f)}
|
|
57
|
+
|
|
58
|
+
grouped: dict[str, list[AudioExample]] = defaultdict(list)
|
|
59
|
+
for example in examples:
|
|
60
|
+
grouped[example.category].append(example)
|
|
61
|
+
|
|
62
|
+
categories = sorted(
|
|
63
|
+
grouped, key=lambda name: (name == UNCATEGORIZED, name.casefold())
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
lines = [
|
|
67
|
+
".. This file is generated by docs/audio_gallery.py. Do not edit it manually.",
|
|
68
|
+
"",
|
|
69
|
+
"=============",
|
|
70
|
+
"Audio Gallery",
|
|
71
|
+
"=============",
|
|
72
|
+
"",
|
|
73
|
+
"Audio examples demonstrating ``pyFDN``. The gallery is generated",
|
|
74
|
+
"automatically from every packaged ``.wav`` file, grouped by resource category.",
|
|
75
|
+
"",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
for category in categories:
|
|
79
|
+
entries = sorted(grouped[category], key=lambda item: item.filename.casefold())
|
|
80
|
+
|
|
81
|
+
lines.extend(
|
|
82
|
+
[
|
|
83
|
+
category,
|
|
84
|
+
"-" * len(category),
|
|
85
|
+
"",
|
|
86
|
+
".. raw:: html",
|
|
87
|
+
"",
|
|
88
|
+
]
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
for example in entries:
|
|
92
|
+
label_html = html.escape(example.display_label)
|
|
93
|
+
src = example.audio_url
|
|
94
|
+
|
|
95
|
+
if example.filename in audio_references:
|
|
96
|
+
audio_ref = audio_references[example.filename]
|
|
97
|
+
|
|
98
|
+
title = html.escape(audio_ref["source"])
|
|
99
|
+
url = html.escape(audio_ref["source_url"])
|
|
100
|
+
creator = html.escape(audio_ref["creator"])
|
|
101
|
+
license_name = html.escape(audio_ref["license"])
|
|
102
|
+
license_url = html.escape(audio_ref["license_url"])
|
|
103
|
+
|
|
104
|
+
lines.extend(
|
|
105
|
+
[
|
|
106
|
+
f" <p>{label_html}<br>",
|
|
107
|
+
f' Source: <a href="{url}">{title}</a> — {creator}<br>',
|
|
108
|
+
f' Terms: <a href="{license_url}">{license_name}</a><br>',
|
|
109
|
+
" <audio controls>",
|
|
110
|
+
f' <source src="{src}" type="audio/wav">',
|
|
111
|
+
" Your browser does not support the audio element.",
|
|
112
|
+
" </audio>",
|
|
113
|
+
" </p>",
|
|
114
|
+
]
|
|
115
|
+
)
|
|
116
|
+
else:
|
|
117
|
+
lines.extend(
|
|
118
|
+
[
|
|
119
|
+
f" <p>{label_html}<br>",
|
|
120
|
+
" <audio controls>",
|
|
121
|
+
f' <source src="{src}" type="audio/wav">',
|
|
122
|
+
" Your browser does not support the audio element.",
|
|
123
|
+
" </audio>",
|
|
124
|
+
" </p>",
|
|
125
|
+
]
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
lines.append("")
|
|
129
|
+
|
|
130
|
+
lines.extend(
|
|
131
|
+
[
|
|
132
|
+
"----",
|
|
133
|
+
"",
|
|
134
|
+
"All audio files can also be browsed in the repository's",
|
|
135
|
+
"`packaged audio directory <https://github.com/artificial-audio/pyFDN/tree/main/src/pyFDN/resources/audio>`_.",
|
|
136
|
+
"",
|
|
137
|
+
]
|
|
138
|
+
)
|
|
139
|
+
return "\n".join(lines)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def generate_audio_gallery(output_file: Path = OUTPUT_FILE) -> str:
|
|
143
|
+
examples = discover_audio_files()
|
|
144
|
+
rendered = render_gallery(examples)
|
|
145
|
+
output_file.write_text(rendered, encoding="utf-8")
|
|
146
|
+
return rendered
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
if __name__ == "__main__":
|
|
150
|
+
generate_audio_gallery()
|
|
@@ -9,12 +9,14 @@ sys.path.insert(
|
|
|
9
9
|
0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
+
from audio_gallery import generate_audio_gallery
|
|
12
13
|
from example_gallery import generate_gallery # noqa: E402
|
|
13
14
|
|
|
14
15
|
import pyFDN # noqa: E402
|
|
15
16
|
|
|
16
|
-
# Keep the gallery in sync with every marimo notebook before Sphinx reads it.
|
|
17
|
+
# Keep the gallery in sync with every marimo notebook and audio file before Sphinx reads it.
|
|
17
18
|
generate_gallery()
|
|
19
|
+
generate_audio_gallery()
|
|
18
20
|
|
|
19
21
|
# -- Project information ------------------------------------------------------
|
|
20
22
|
project = "pyFDN"
|
|
@@ -45,6 +47,11 @@ autosummary_imported_members = True
|
|
|
45
47
|
# Napoleon settings (Google / NumPy docstrings)
|
|
46
48
|
napoleon_google_docstring = True
|
|
47
49
|
napoleon_numpy_docstring = True
|
|
50
|
+
# Render "Attributes" sections as :ivar: fields instead of standalone
|
|
51
|
+
# ``.. attribute::`` directives. Without this, every documented attribute is
|
|
52
|
+
# registered twice (once by napoleon, once by autodoc's member scan) and Sphinx
|
|
53
|
+
# warns about duplicate object descriptions.
|
|
54
|
+
napoleon_use_ivar = True
|
|
48
55
|
|
|
49
56
|
|
|
50
57
|
# Intersphinx mapping
|
|
@@ -112,7 +119,9 @@ latex_documents = [
|
|
|
112
119
|
marimo_notebook_dir = "../examples"
|
|
113
120
|
marimo_default_height = "800px"
|
|
114
121
|
marimo_default_width = "100%"
|
|
115
|
-
|
|
122
|
+
# ``True`` is rendered as the extension's overlay mode. Keep this a boolean;
|
|
123
|
+
# sphinx-marimo declares the setting as such and Sphinx warns on string values.
|
|
124
|
+
marimo_click_to_load = True
|
|
116
125
|
marimo_load_button_text = "Load Interactive Notebook"
|
|
117
126
|
|
|
118
127
|
# Build notebooks serially in-process. The export-mode override below patches the
|