Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rooms as objects #58

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Rooms as objects #58

wants to merge 9 commits into from

Conversation

beasteers
Copy link
Collaborator

@beasteers beasteers commented Apr 8, 2024

Currently, details about rooms and their data structures live inside the Scaper object including some adhoc handling of directory structures. Moving this out should make it easier to implement things like virtual rooms in the API.

Changes:

  • SOFARoom class
    • SOFARoom.get_ambient_noise_paths formerly Scaper.use_room_ambient_noise
      • returns a list of paths instead of sampling inside the function
      • fixed minor bug which would have returned incorrect files if you were in a folder like foa_experiments
    • SOFARoom.get_irs formerly Scaper.get_room_irs_wav_xyz
      • calls SOFARoom._format_irs formerly Scaper.get_format_irs (disable format=False)
    • SOFARoom.get_positions formerly Scaper.get_room_irs_xyz
    • SOFARoom.get_boundaries formerly Scaper._get_room_min_max
  • BaseRoom added as a generic base class. May just change to Room?
  • Scaper
    • added Scaper.room: SOFARoom
    • rir_dir, room:str, format are now under SOFARoom
    • use_room_ambient_noise=True moved from Scaper.__init__ to Scaper.add_background
      • I know add_background is only intended to be run once, but I figured this would make it possible to layer ambient noise with noise generators

This is just a sketch, so feel free to discuss alterations. This PR should all be structural so the audio outputs should stay exactly the same.

I have generated some test files successfully, but my FSD50K download is only partial right now (for some reason).

@beasteers beasteers requested a review from ChrisIck April 20, 2024 00:36
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.

1 participant