Skip to content

FEAT: General auralization #90

Merged
mberz merged 12 commits intoengd_project_2026from
feat/generalized_auralization_cleaned
May 10, 2026
Merged

FEAT: General auralization #90
mberz merged 12 commits intoengd_project_2026from
feat/generalized_auralization_cleaned

Conversation

@mberz
Copy link
Copy Markdown
Contributor

@mberz mberz commented May 10, 2026

Changes

  • Add generalized *.wav export after a simulation is finished in the SimulationService
  • Add a simplified and generalized mono-aural auralization function based on convolution with the RIR

These new functions should replace individual/method specific implementations which are based on simple convolution with the RIR returned by the simulation methods.

Replaces #83

@mberz mberz force-pushed the feat/generalized_auralization_cleaned branch 2 times, most recently from 5d1d4a9 to fb9cdc7 Compare May 10, 2026 18:00
@mberz mberz marked this pull request as ready for review May 10, 2026 18:01
@mberz mberz requested a review from Copilot May 10, 2026 18:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a generalized auralization/export path so simulations produce a standardized impulse-response WAV on completion, and auralizations can be generated via a simplified convolution-based pipeline (intended to replace method-specific implementations).

Changes:

  • Add pyfar dependency for WAV IO, normalization, resampling, and convolution.
  • Generate an impulse-response .wav after solver completion in SimulationService.
  • Add mono_aural_auralization to convolve a dry input signal with an exported IR WAV for non-DE/DG methods.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
requirements.txt Adds pyfar dependency used for audio processing and WAV export.
app/services/simulation_service.py Writes impulse-response WAV after solver run; refactors export flow and cancellation handling.
app/services/auralization_service.py Adds generalized convolution-based auralization path and helper function for non-DE/DG methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/services/simulation_service.py Outdated
Comment thread app/services/simulation_service.py
Comment thread app/services/simulation_service.py Outdated
Comment on lines 291 to +309
match simulation.simulationMethod:
case "DE":
_, _ = auralization_calculation(signal_file_name, pressure_file_name, wav_output_file_name)
case "DG":
_, _ = auralization_calculation_DG(signal_file_name, pressure_file_name, wav_output_file_name)

case _:
#TODO: We want a single universal auralization method,
# without having to switch logic between them for each simulation method.
# This will be implemented in the function mono_aural_auralization, which will be a
# general convolution-based auralization method using the RIR.
# This method does not rely on the pressure.csv file, but the wav file directly
pressure_file_name_wav = os.path.join(
DefaultConfig.UPLOAD_FOLDER_NAME, export.name.replace(".xlsx", ".wav")
)
mono_aural_auralization(
signal_file_name,
pressure_file_name_wav,
wav_output_file_name
)
mberz and others added 10 commits May 10, 2026 20:08
### Proposed changes

It seems they were not updated on code refactoring. I'm marking them to
skip and create an issue to keep track of the issue.
The executor tests require setting up Mocks and Docker. The set-up for
these is currently located in .github/workflows/engd2026.yml
### Proposed changes

- Remove the documentation entries for removed simulation backends
- Remove obsolete entries for example gallery
- Remove example gallery plugin
…tion method and result export in the SimulationService and AuralizationService)
…oach. Also refactored a bit so that a not-working xlsx export will not break the auralization.
@mberz mberz force-pushed the feat/generalized_auralization_cleaned branch from fb9cdc7 to 3d829d2 Compare May 10, 2026 18:12
@mberz mberz merged commit ca12578 into engd_project_2026 May 10, 2026
5 checks passed
@mberz mberz deleted the feat/generalized_auralization_cleaned branch May 10, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants