Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Sep 9, 2024
1 parent f69b565 commit 8e25779
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Cavern/Channels/ChannelPrototype.Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static readonly ChannelPrototype
new Vector3(1, 0, .677419f), // WideRight
new Vector3(-1, 1, -1), // TopRearLeft
new Vector3(1, 1, -1), // TopRearRight
new Vector3(-1, 1, 0) // TopRearCenter
new Vector3(0, 1, -1) // TopRearCenter
};

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ These examples use the Cavern library to show how it works. The solution
containing all sample projects is found at `CavernSamples/CavernSamples.sln`.
The same build instructions apply as to the base project.

Single-purpose sample codes are found under `docs/Code`.
Single-purpose sample codes are found under `docs/Code samples`.

### Cavern for Unity
Open the `CavernUnity DLL.sln` solution with Microsoft Visual Studio 2022.
Expand Down Expand Up @@ -191,8 +191,8 @@ component browser, under audio, and they will automatically add all their Unity
dependencies.

## Development documents
* [Documentations of specific use-cases](./docs)
* [Scripting API](http://cavern.sbence.hu/cavern/doc.php?if=api/index) with descriptions of all public members for all public classes
* [Knowledge base](./docs)
* [API browser](http://cavern.sbence.hu/cavern/doc.php?if=api/index) with descriptions of all public members for all public classes
* [Virtualizer repository](https://github.com/VoidXH/HRTF) which contains the raw IR measurements and detailed information about their use

## Disclaimers
Expand Down
27 changes: 6 additions & 21 deletions docs/Cavern DCP channel order.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Cavern DCP channel order
This is the recommended DCP channel ordering, and also the recommended wiring.
This is the recommended DCP channel ordering, and also the recommended wiring
for Digital Cinema Packages, the standard content delivery format for commercial
theatres. This documentation is for DCP producing entities, not for home movies.

Cavern DCPs only take advantage of currently or always unused channels, thus
systems built for Cavern are perfectly backwards compatible, including 7.1,
hearing/visually impaired tracks, and all sync signals. Cavern is using a 7.1.2
bed only, with the Top Surround channels as Left/Right ceiling arrays. Cavern XL
adds an additional Bottom Surround channel.
adds an additional Bottom Surround channel array. Speakers that are part of the
Bottom Surround array shall be placed into the stairs in the theatre room.

| Channel | 5.1 | 7.1 SDDS | 7.1 DS | Auro 11.1 | Cavern | Cavern XL | Notes |
|--------:|:---:|:--------:|:------:|:---------:|:------:|:---------:|-----------------------------------------------|
Expand All @@ -24,22 +28,3 @@ adds an additional Bottom Surround channel.
| 14 | ES | ES | ES | ES | ES | ES | External Sync Signal |
| 15 | SL | SL | SL | SL | SL | SL | Sign Language Video |
| 16 | - | - | - | - | - | Bs | Bottom Surround |

# Channel angles
For home and studios with a single speaker per channel, the recommended angles
(+/- 10°) are:

| Channel | W / Y | H / X |
|---------------------|:-----:|:-----:|
| Front Left | -30° ||
| Front Right | 30° ||
| Front Center |||
| Left Side Surround | -110° ||
| Right Side Surround | 110° ||
| Left Rear Surround | -150° ||
| Right Rear Surround | 150° ||
| Front Left Center | -15° ||
| Front Right Center | 15° ||
| Left Top Surround | -70° | -45° |
| Right Top Surround | 70° | -45° |
| Bottom Surround || 90° |
67 changes: 67 additions & 0 deletions docs/Channel placement guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Channel placement guide for object-based audio
Contrary to popular belief, speakers for object-based systems do not adhere to
specific angles. By design, object-based renderers place objects relative to the
room's walls, by the ratio between opposing walls. This happens because of the
industry's chosen rendering method, called balance-based rendering.

## How balance-based rendering works
![Balance-based renderer](img/rnd_balance.png)
Point object sources are rendered in a bounding speaker box by the ratio between
them. This requires a channel layout to be symmetric, because not only there are
front/rear, upper/lower channel pairs, but a left/right also has to be found to
get all corners. When the pairs are found, the closer wall to the object will be
louder. This is calculated on each axis, and the values corresponding to the
corner of each speaker will be multiplied together to get the final gain.

## What the true channel positions are
Reverse-engineering object-based content with Cavern resulted in the following
findings. Mixes rendered to the final channel layout contain a single,
motionless object at the channel's exact position so they get rendered to that
exact channel. This is only possible if the renderer chooses that position as
an output channel, meaning these are the true channel possitions.

<sub>These positions are also confirmed to be used by Dolby in Table B.10 of
ETSI TS 103 420 V1.2.1, which is the description of E-AC-3 + JOC.</sub>

Screen channels assume the screen spans perfectly from wall to wall. Because
this is mostly not the case at home, and no content or renderer known as of 2024
uses screen-anchored objects, it is inherent that the front left and right
channels have to be placed on the sides of the screen.

| Channel | Euclidean coordinates | Y angle | X angle | Human-readable position |
|------------------|-----------------------|---------|---------|-----------------------------------------|
| Front Left | -1, 0, 1 | -45° || Front wall, left side of the screen |
| Front Right | 1, 0, 1 | 45° || Front wall, right side of the screen |
| Front Center | 0, 0, 1 ||| Front wall, middle of the screen |
| Rear Left | -1, 0, -1 | -135° || Rear left corner |
| Rear Right | 1, 0, -1 | 135° || Rear right corner |
| Side Left | -1, 0, 0 | -90° || Middle of the left wall |
| Side Right | 1, 0, 0 | 90° || Middle of the right wall |
| Wide Left | -1, 0, 0.677419 | -55.89° || Left wall, about 16% from the front |
| Wide Right | 1, 0, 0.677419 | 55.89° || Right wall, about 16% from the front |
| Top Front Left | -1, 1, 1 | -45° | -45° | Ceiling, perfectly above Front Left |
| Top Front Right | 1, 1, 1 | 45° | -45° | Ceiling, perfectly above Front Right |
| Top Front Center | 0, 1, 1 || -45° | Center of the front wall/ceiling corner |
| Top Rear Left | -1, 1, -1 | -135° | -45° | Top rear left corner |
| Top Rear Right | 1, 1, -1 | 135° | -45° | Top rear right corner |
| Top Rear Center | 0, 1, -1 | 180° | -45° | Center of the rear wall/ceiling corner |
| Top Side Left | -1, 1, 0 | -90° | -45° | Midway between TFL and TRL positions |
| Top Side Right | 1, 1, 0 | 90° | -45° | Midway between TFR and TRR positions |
| God's Voice | 0, 1, 0 || -90° | Middle of the ceiling |

### Transforming the angles to specific rooms
The angles shown in the table on the Y (horizontal) and X (vertical) axes are
calculated from the center of the room, for a perfectly cubical room. The ideal
listening position is not that, it's about 2/3 to the back, but the angles
should stay, because these are not individual channels, but channel arrays. In a
commercial cinema, all speakers on the left wall used to play the left surround
channel's signal before object-based content appeared, giving all listeners the
experience of left sounds coming exactly from the left. Because in modern home
content, there are only two options on the side walls, side and wide speakers,
this directionality shall be preserved.

Knowing these, the most mathematically optimal way to get the actually mixed
soundstage is using a laser pointer from the main listener's head pointing to
the directions described here, and putting the speakers where they hit any wall
or the ceiling. This conveys the exact object movements described in content
rendered with Cavern, all other setups warp the space in a direction.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions docs/Quality modes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cavern quality modes
| Quality | Doppler/pitch | Resampling | Object downmix | Angle precision | Asymmetric mixing |
|----------|---------------|--------------|----------------|-----------------|-------------------|
| Perfect | High | Catmull-Rom | All channels | Arcsine | As-is |
| High | High | Linear | All channels | Arcsine | Triangulated |
| Medium | Low | Nearest | First channel | Linear | Triangulated |
| Low | Disabled | Nearest | First channel | Linear | Triangulated |
Binary file added docs/img/rnd_balance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8e25779

Please sign in to comment.