-
Notifications
You must be signed in to change notification settings - Fork 96
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
Source directivity and various extensions to gpuRIR #27
base: master
Are you sure you want to change the base?
Conversation
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
absorption. Not yet working Co-Authored-By: fuerbringer <[email protected]>
well right now Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
splitting frequency ranges into different bands. Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
(importing into other scripts, terminal arguments) Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
testing Co-Authored-By: fuerbringer <[email protected]>
Dev air absorption improve
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]> Co-Authored-By: TheBlueFireFox <[email protected]>
Co-Authored-By: fuerbsev <[email protected]>
Implement multi-processing, increase bandpass air absorption speed dramatically
Co-Authored-By: fuerbringer <[email protected]>
and backwards filtering Co-Authored-By: fuerbringer <[email protected]>
Ready to implement into code Co-Authored-By: fuerbringer <[email protected]>
Add SM57 and iPhone X frequency responce model. Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
implement sos in freq_dep_abs_coeff Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Fix pinna offset errors Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Extending room parameters with beta Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Further refactoring Co-Authored-By: fuerbringer <[email protected]>
Further refactoring More comments Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Co-Authored-By: fuerbringer <[email protected]>
Thank you very much @fuerbringer and @corrooli for all this work. By now, I have merged your PR with the source directivity implementation and I'll review the rest of the features during the next month. |
Hello! I've made a couple of commits to the master branch of my repo today. fa32eb3 fixes a bug you had with the shared memory of Could you add those commits to your branch so I can test your PR with that bug fixed? |
I could do it myself. I'll take a look at the extensions you propose in the following days/weeks. |
Sorry about that bug! Glad it could be fixed, though. We're currently in our end-of-semester exam phase until the end of January, so couldn't respond right away. Looking forward to see what you think of the extensions. |
Don't worry about the bug, that things happen. I know this isn't a good time for students, good luck with your exams! |
Hi @fuerbringer and @corrooli, The extensions that you developed are really interesting, especially those about air absorption and frequency-dependent wall coefficients. I would love to integrate them better with the rest of the library, but I've been trying to find some time to do it during the past weeks and it was just impossible. I hope to be able to find some time for this in the future, but for now, I think I will accept the PR as you developed it. However, before accepting the PR, I think it would be interesting if you include in extensions/README.md the references for the techniques that you used for your implementations. Most of them are approximations and there might be several ways to do them in the literature, so users could be interested in knowing which techniques are you using so they can be aware of their limitations when using the library. Best regards, |
We could definitely reference the literature used and point out the limitations of our extensions. But we're in a similar situation, barely finding time for anything. We're currently working on our bachelor's thesis (computational acoustics based on parallel Adaptive Rectangular Decomposition) and job hunting and all that. Hopefully we'll find a free afternoon this semester to do it though. |
Ok, don't worry about this, there's no hurry. Just try to add the references when you have some time. Good luck with your bachelor's thesis, it sounds really interesting and I'm sure you'll do a great job. |
As part of a semester project at uni we've expanded gpuRIR with the following features:
Source Directivity (fixes #16)
You can now steer the source and apply polar patterns with the new parameters
orV_src
andspkr_pattern
.For this purpose we've generated polar plots of the various patterns by rotating the source by 360 degrees:
Note: The source directivity features has been merged in #28
Extensions
We've developed various filters to make the Room impulse responses generated by gpuRIR more realistic. They're located in
gpuRIR/extensions
and can be imported asgpuRIR.extensions.*
.You can see them in action in our example scripts
examples/mono_filters.py
andexamples/stereo_filters.py
. Also consult the readme:gpuRIR/extensions/README.md
.We've uploaded the speech+guitar tracks which we've convolved with the RIRs that have gone through our filters: https://soundcloud.com/user-500297940/sets/gpurir-sound-samples
For reference, here's a spectrogram of a RIR generated by gpuRIR without any filters:
Air absorption
We've created filters to apply the effects or air absorption to the RIRs. For this we've devised two options: Using the Short-time fourier transform or a bandpassed variant to apply the attenuations. The result is higher frequencies decaying much faster than lower frequencies which immidiately makes the RIRs sound more realistic.
STFT
Bandpass
Source and receiver characteristics
We've created filters to model frequency responses for speakers and microphones. Here's the Shure SM57 simulated:
Binaural Receivers
You can generate stereo RIRs (two channels). You can specify a position where the head shall be placed and the direction it looks towards. Then our code automatically places receivers where the "ears" should be. Here you can see a head placed in 3d space:
Head-related transfer function HRTF
We apply the effects of the HRTF to the RIRs generated by gpuRIR by using HRIRs from the CIPIC database. Note that we solely use the direct path vector between the head and source to calculate the azimuth and elevation.
Frequency dependant wall absorption coefficients
Sound is reflected by sources dependant on the frequency. For this, we've consulted literature and extracted coefficients for various materials and frequencies. You can now define the materials the six walls in a room are made out of.
Here's a room made out of wallpapers on lime cement plaster, glued parquet floors and a concrete ceiling:
We think our extensions demonstrate the great usefulness and possible application of gpuRIR. If you feel like the extensions fit in the upstream repo, then we'd greatly appreciate it. Otherwise we can also keep the on our fork and only leave the source directivity in this PR.
If there's anything unclear or change suggestions, please tell us.
Thanks to our advisor(s) @schmiph2 for the very helpful support throughout the project and @DavidDiazGuerra for answering our questions regarding source directivity in great detail.
Best regards,
Severin (@fuerbringer) and Oliver (@corrooli)