Giter VIP home page Giter VIP logo

Comments (15)

mbillingr avatar mbillingr commented on August 11, 2024

Hi, thanks for your interest in ambisonic!

It's not dead, yet... let's say it's sleeping instead.

I'm not currently using audio, that's why no new features are being added to this project at the moment.
However, I'm happy to provide support or update dependencies if there is demand. Pull requests are welcome too :)

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

Hi, thanks for the quick response! I might have something cooked up for a merge request! Hint: Speed of sound

from ambisonic.

mbillingr avatar mbillingr commented on August 11, 2024

Sounds interesting. Physical speed of sound, such as used for doppler effects or speed of playback?

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

from ambisonic.

mbillingr avatar mbillingr commented on August 11, 2024

This might come at a cost, though. In the general case a realistic simulation requires a variable-length buffer for each sound source. Maybe it's enough to avoid the buffer and simply delay the start of a sound. I don't know if that would be realistic enough.

What are your thoughts on how this could be implemented?

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

So my idea was, just like you'd suggested, to give each positional sound a starting time and then start a second thread, that on a certain interval calculates the distance's to every object with this flag enabled. It would also check for every object if the calculated time, for when it should start playing, is greater then the system time and then plays the sound.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

I will probably commence work on this on Sunday. For now I will create a fork and a draft PR.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

I just created the fork and created the draft PR: #18. You are welcome.

from ambisonic.

mbillingr avatar mbillingr commented on August 11, 2024

For the doppler effect there is a speed of sound parameter. It would be nice if that could be used to determine the scale too.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

It probably shouldn't be used to determine the scale, rather the opposite. As far as I understand the code now just arbitrarily assumes 1v-unit=1m.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

I'm pretty sure, that this assumption will be false in 90% of cases.

from ambisonic.

mbillingr avatar mbillingr commented on August 11, 2024

Actually, most of the code does not need to make any assumptions about scale. The only place where it does matter for now is computing the doppler rate.

For a distance-based delay works similarly - twice the scale or half the speed of sound is the same thing.

Now here is where the current simple assumption starts to break down:
Only the scale (but not the speed of sound) should matter for distance-based attenuation - but it doesn't (yet).
In order to make that physically correctish a separate scale parameter will be needed anyway.

Sorry for the rant. In short:
Right, please add a scale parameter. We'll just need to make sure it correctly interacts with the doppler effect.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

Might I suggest, that (maybe as a separate PR) we switch to using cgmath or some other lightweight vector library since it removes a lot of repetition from the code(see distance calculation).

from ambisonic.

mbillingr avatar mbillingr commented on August 11, 2024

While hesitant to add further dependencies (rodio alone is a nightmare to maintain) I'm not strictly opposed. This should go into a separate issue, though.

from ambisonic.

Frostie314159 avatar Frostie314159 commented on August 11, 2024

Agreed

from ambisonic.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.