Cavern 2.0.2

dotnet add package Cavern --version 2.0.2
NuGet\Install-Package Cavern -Version 2.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cavern" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cavern --version 2.0.2
#r "nuget: Cavern, 2.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cavern as a Cake Addin
#addin nuget:?package=Cavern&version=2.0.2

// Install Cavern as a Cake Tool
#tool nuget:?package=Cavern&version=2.0.2

Cavern

Cavern is a fully adaptive object-based audio rendering engine and (up)mixer without limitations for home, cinema, and stage use. Audio transcoding and self-calibration libraries built on the Cavern engine are also available.

Build Status GitHub release (latest by date) GitHub commits since latest release (by date) Lines of Code

Features

  • Unlimited objects and output channels without position restrictions
  • Audio transcoder library with a custom spatial format
    • Supported codecs:
      • E-AC-3 with Joint Object Coding (Dolby Digital Plus Atmos)
      • Limitless Audio Format
      • RIFF WAVE
      • Audio Definition Model Broadcast Wave Format
    • Supported containers: .ac3, .eac3, .ec3, .laf, .mka, .mkv, .mov, .mp4, .qt, .wav, .weba, .webm
  • Advanced self-calibration with a microphone
    • Results in close to perfectly flat frequency response, <0.01 dB and <0.01 ms of uniformity
    • Uniformity can be achieved without a calibration file
    • Supported software/hardware for EQ/filter set export:
    • PC: Equalizer APO, CamillaDSP
    • DSP: MiniDSP 2x4 Advanced, MiniDSP 2x4 HD, MiniDSP DDRC-88A
    • Processors: Emotiva, StormAudio
    • Amplifiers: Behringer NX series
    • Others: Audyssey MultEQ-X
  • Direction and distance virtualization for headphones
  • Real-time upconversion of regular surround sound mixes to 3D
  • Mix repositioning based on occupied seats
  • Seat movement generation
  • Unity-like listener and source functionality
  • Ultra low latency, even the upconverter can work from as low as one sample per frame

Quick start

Clip

Cavern is using audio clips to render the audio scene. A Clip is basically a single audio file, which can be an effect or music. The easiest method of loading from a file is through the Cavern.Format library, which will auto-detect the format:

Clip clip = AudioReader.ReadClip(pathToFile);

Refer to the scripting API for the complete description of this object.

Listener

The Listener is the center of the sound stage, which will render the audio sources attached to it. The listener has a Position and Rotation (Euler angles, degrees) field for spatial placement. All sources will be rendered relative to it. Here's its creation:

Listener listener = new Listener() {
    SampleRate = 48000, // Match this with your output
    UpdateRate = 256 // Match this with your buffer size
};

The Listener will set up itself automatically with the user's saved configuration. The used audio channels can be queried through Listener.Channels, which should be respected, and the output audio channel count should be set to its length. If this is not possible, the layout could be set to a standard by the number of channels, for example, this line will set up all listeners to 5.1:

Listener.ReplaceChannels(6);

Refer to the scripting API for the complete description of this object.

Source

This is an audio placed in the sound space, renders a Clip at where it's positioned relative to the Listener. Here's how to create a new source at a given position and attach it to the listener:

Source source = new Source() {
    Clip = clip,
    Position = new Vector3(10, 0, 0)
};
listener.AttachSource(source);

Sources that are no longer used should be detached from the listener using DetachSource. Refer to the scripting API for the complete description of this object.

Rendering

To generate the output of the audio space and get the audio samples which should be output to the system, use the following line:

float[] output = listener.Render();

The length of this array is listener.UpdateRate * Listener.Channels.Length.

Development documents

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cavern:

Package Downloads
Cavern.Format

Audio format support of the Cavern spatial audio engine.

Cavern.QuickEQ

Measurement and equalization tools for the Cavern spatial audio engine.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.2 209 10/10/2023
2.0.1 195 6/25/2023
2.0.0 175 5/28/2023
1.6.0 457 11/17/2022
1.5.0.1 385 5/31/2022
1.5.0 390 5/29/2022