Giter Site home page Giter Site logo

nslaudio's Introduction

NSL Audio

Codebase for Six Degrees of Freedom (6DoF) Audio Rendering

Installation

pip install -r requirements.txt

Real-time Audio Simulation

Run

python3 overlapping_realtime_sim.py

Line 396 of overlapping_realtime_sim.py can be edited to change the audio files and positions of the sound objects in the Scene

Source(-1, 2, -3, "audio_sources/source_audio.wav")
# creates an object in the scene at x=-1, y=2, z=-3 that reads audio from audio_sources/source_audio.wav

Controls

  • Left arrow key = translational movement in -x direction
  • Right arrow key = translational movement in +x direction
  • Up arrow key = translational movement in +y direction
  • Down arrow key = translational movement in -y direction
  • Space key = translational movement in +z direction
  • Shift key = translational movement in -z direction
  • 'A' key = rotational movement in azimuth leftward
  • 'D' key = rotational movement in azimuth rightward
  • 'W' key = rotational movement in elevation upward
  • 'S' key = rotational movement in elevation downward

Offline Audio Simulation

  1. Edit the lines in the main function to set the HRTF set, WAV file of audio source, CVS file of audio source positions, and the output filename.
HRTF_path = "hrtf/dtf_nh2.sofa"
source_file = "audio_sources/sin_440.wav"
cvs_file = "csv/sin_source_circular_xy.csv"
output_filename = "audio_output/sin_440_circular_movement_xy_precise.wav"
output_flag = True
generate_audio_for_single_source(HRTF_path, source_file, cvs_file, output_filename, output_flag)
  1. Run
python3 spatial_movement_sim.py

nslaudio's People

Contributors

emilykuowen avatar mattbaseheart avatar rajrup avatar

Watchers

 avatar  avatar  avatar

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.