justinsalamon / scaper

A library for soundscape synthesis and augmentation
BSD 3-Clause "New" or "Revised" License
378 stars 55 forks source link

Spatializing mixtures #56

Open pseeth opened 5 years ago

pseeth commented 5 years ago

Just wondering if we have any thoughts about spatializing mixtures, say with a library of room impulse responses added as a directory for Scaper? Opening the issue early because I think this will be a rather complex change (that possibly won't happen). However, if we had the ability to spatialize sources in a mixture with varying degrees of reverberation or receiver/source placement, we could make some pretty cool stuff I think!

Here's a library out there that could be interesting: https://github.com/LCAV/pyroomacoustics

andresperezEUT commented 5 years ago

Some time ago I forked Scaper (master branch, commit e0cc1c9701bb4bcd96a02cd1737c723d765dcd16) with the aim of supporting spatial scenes, namely Ambisonics. The result software is unsurprisingly named AmbiScaper. It supports Ambisonics Room Impulse Responses, both simulated (by calling the Matlab's great SMIR GENERATOR) or recorded (using databases formatted with the SOFA AmbisonicsDRIR Convention). Despite it is already functional, I momentarily stopped adding functionality due to priority issues. But I'm planning to come back to it in a couple of months. Any help would be welcomed!

justinsalamon commented 5 years ago

I love that scaper was helpful in putting together ambiscaper :)

It might make sense to consider folding AmbiScaper into Scaper - they both achieve very similar goals, the only difference being the synthesis engine - but that could be an option in Scaper, e.g. when you create a Scaper object you can select a "standard" synthesizer or an "ambisonic" synthesizer, the rest is mostly unchanged.

This would not only have the advantage of consolidating related features into the same package, but also of consolidating development efforts, with improvements (like the ones currently being implemented) benefitting both engines.

Just a thought.

andresperezEUT commented 5 years ago

It was indeed helpful! Many thanks! About the potential folding of AmbiScaper into Scaper: the arguments sound very reasonable, so I will definitely consider it. There might be some minor implementation/architecture issues, but in general I agree with you. Let's keep it in mind, and continue the discussion later.