Giter Site home page Giter Site logo

rg3d-sound's Introduction

Contents of this repository was moved to rg3d/rg3d-sound and development will be continued there.

rg3d-sound

Sound library for games and interactive applications written in Rust.

Key features

  • Generic and Spatial sound sources.
  • Built-in streaming for large sounds.
  • Raw samples playback support.
  • WAV format support (non-compressed).
  • Vorbis/ogg support (using lewton).
  • HRTF support for excellent positioning and binaural effects.
  • Reberb effect.

Examples

Examples can be found in ./examples. Make sure you run examples with --release flag, debug version is very slow and may cause tearing of output sound.

Supported OS

  • Windows (DirectSound)
  • Linux (alsa)

How to build

Add rg3d-sound = "0.11.0" to your Cargo.toml. Supported Rust version is >= 1.38.

HRTF

Library has full HRTF support, it uses HRIR spheres generated using IRCAM HRIR database. HRIR spheres are produced using small tool written in C++ - hrir_sphere_builder. It is very important to find HRTF that suits you because they're very individual and overall perception fully defined by use of correct HRTF.

Contributions

Any contributions are very appreciated! Check Issues page to see how can you help project.

License

MIT

References

This library wouldn't have been ever created without work of these people. Thank you all!

  1. Digital signal processing and filters
  2. Physical Audio Signal Processing
  3. Hannes Gamper, "Head-related transfer function interpolation in azimuth, elevation, and distance", The Journal of the Acoustical Society of America 134, EL547 (2013); doi: 10.1121/1.4828983
  4. Fábio P. Freeland, Luiz W. P. Biscainho, Paulo S. R. Diniz, "Interpolation of Head-related transfer function (HRTFS): A Multi-source approarch"
  5. IRCAM Head-related impulse response database
  6. Reverb
  7. Overlap-add convolution - not used anymore due to significant distortions at segment boundary when impulse response changes.
  8. Overlap-save convolution - works much better when impulse response changes, there are only phase shift issues which are more less acceptable.
  9. OpenAL Specification - distance models and general design considerations.
  10. http://csoundjournal.com/issue9/newHRTFOpcodes.html - some ideas to remove clicks in hrtf renderer
  11. https://phaidra.kug.ac.at/open/o:11024

rg3d-sound's People

Contributors

mrdimas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rg3d-sound's Issues

Audible clicks in HRTF renderer on fast moving sounds

HRTF renderer suffers from tiny audible clicks when sound changing its position too fast. This probably relates to lack of interpolation between frames - sound produced at previous frame has lower/higher amplitude and on at the junction of two frames signal has high gap in amplitude which causes clicks.

Interested in `hrtf` for a non-rg3d project - any interest in splitting it into a separate crate?

Hey there! I've been doing a bit of investigating into what's available w.r.t. binaural audio in Rust. I have an existing project using nannou, but would love to take advantage of this hrtf work.

Is there any chance you would be interested in splitting the hrtf module into its own independent crate? I can imagine there would be a lot of interest in collaboration / co-maintaining from other pro-audio / creative-coder / gamedev folks out there too :)

What is the difference between the diferent mods of "3d music"

In the readme It's write that this library can support various format of "3d sound".

Spatial sound sources.
HRTF support for excellent positioning and binaural effects.

What are the differences between these two mods of "3d sound" ?
HRTF is related to the head, so how I can choose the best between the HRTF sphere models ?
What is a Spatial sound ? How it work ?

And what is the best ? For what ?

Explicitly versioning rg3d-core

Hello,

Right now rg3d-core in cargo.toml is using a relative path. It would be very useful to make this use an actual version-I want to use this in a game that isn't using the rg3d engine but nevertheless would love to have the sound capabilities of this crate.

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.