Moved to new location https://gitlab.com/pab44/3d-audio-producer
This is a fork of the binaural-audio-editor project, but wxwidgets and openscenegraph are replaced with raygui and raylib.
This project is an audio application that produces 3D audio from 2D mono audio samples and positional information given through the graphical user interface. Listen to 3D audio through stereo headphones or surround sound system.
Features from binaural-audio-editor will be ported to 3d audio producer.
-
OpenAL Soft https://github.com/kcat/openal-soft
-
raylib 4.2
-
Boost Math Quaternion headers and Boost ASIO serial https://www.boost.org/users/history/version_1_70_0.html
-
PugiXML https://github.com/zeux/pugixml/
- Install required libraries.
- Clone this repository
- cd 3d-audio-producer
- mkdir build
- cd build
- cmake ..
- make
- ./3d-audio-producer
Mouse Wheel to Zoom in-out
Mouse Wheel Pressed to Pan
Alt + Mouse Wheel Pressed to Rotate
Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom
Z to zoom to (0, 0, 0)
Use W,A,S,D,Q,E keys to move the listener(blue cube) in 3d space.
Select the sound producer(red cube) and then move the sound producer with I,J,K,L,U,O keys.
Like OpenAL, the application uses a right handed coordinate system to move listener and sound producers, where in a frontal default view X (thumb) points right, Y points up (index finger), and Z points towards the viewer/camera (middle finger).
-
Up is positive y. Down is negative y.
-
Back is positive z. Forward is negative z.
-
Right is positive x. Left is negative x.
Stereo(2 channel) audio does not get 3d spatialization and is instead used to play as background music.
Have audio that you want to be played in 3D be mono(1 channel) audio and load it into the audio track.
Stereo audio can be changed to mono audio using Audacity or other programs.
sndfile-mix-to-mono is an application that successfully turns multi-channel audio mix into mono-channel audio mix.
Run the alsoft-config program that came with the installation of OpenAL Soft to set the output to 5.1, 6.1, or 7.1 channels. OpenAL Soft should automatically convert 3d audio information into audio output for surround sound.
For more information, read https://github.com/kcat/openal-soft/blob/master/docs/3D7.1.txt
TODO
Key 1 - Edit whatever was picked with mouse in 3d space.
Key Delete or Key Del - Remove whatever was picked with mouse in 3d space. Also remove current selected timeline point.
Control S - Save project data to file.
Control O - Load project data from file.
Key B - Add position point to timeline.
Key Z - Add start / restart playback marker.
Key X - Add pause playback marker.
Key C - Add resume playback marker.
Key V - Add end playback marker.
Key P - Show timeline parameters properties.
Key Left Arrow - Timeline frame decrement.
Key Right Arrow - Timeline frame increment.
Key Enter - Select timeline frame.
One timeline controls only 1 object(soundproducer, listener), and the object controlled can be selected.
Make a new timeline to control a different object.
- Open timeline by clicking on timeline button.
- Select sound producer from object dropdown box.
- Select a timeline frame for start of playback of audio linked to sound producer. Line should be highlighted yellow.
- Add start playback marker by pressing the 'z' key.
- Click on "Play" button and wait for timeline to pass the selected timeline frame.
Projects save and load audio and timeline data from specific directories within the project directory. The project directory path is automatically extracted by the program.
This allows for sharing of projects by putting the project directory and its files into a compressed archive(.e.g .zip, .gz, etc.)
- Click on 'New Project' button.
- Choose where to put the project directory.
- Put in a name for project in the text box.
- Press 'Select' button when finished with name. The project directory and project .xml file will be created.
- Click on 'Load Project' button.
- Choose the project directory/folder.
- Open the project .xml file.
- Press 'Select' button.
- Click on 'Save Project' button.
- 3D Audio Producer works with a copy of the audio data for audio files that are uploaded to sound bank. The sound format that his copy of audio data uses is a signed 32-bit integer format. This is done to prevent corruption of audio files.
Please email questions or comments to this email address bringerofawesomefood @ gmail . com without spaces.