MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
DuctGrid.hpp File Reference

Interleaved grid of a one dimensional acoustic bore. More...

#include <expected>
Include dependency graph for DuctGrid.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Kinesis::Acoustics::DuctGrid
 Prepared grid and update gains of one bore. More...
struct  MayaFlux::Kinesis::Acoustics::DuctSpec
 Physical and sampling constants a grid is built from. More...

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
namespace  MayaFlux::Kinesis
namespace  MayaFlux::Kinesis::Acoustics
namespace  MayaFlux::Kinesis::Acoustics::detail

Enumerations

enum class  MayaFlux::Kinesis::Acoustics::DuctError : uint8_t { MayaFlux::Kinesis::Acoustics::INVALID_SPEC , MayaFlux::Kinesis::Acoustics::INVALID_PROFILE , MayaFlux::Kinesis::Acoustics::TOO_SHORT }
 Why no grid was built. More...

Functions

std::expected< DuctGrid, DuctError > MayaFlux::Kinesis::Acoustics::detail::begin_duct_grid (const DuctSpec &spec)
size_t MayaFlux::Kinesis::Acoustics::duct_intervals (const DuctSpec &spec) noexcept
 Number of grid intervals a spec allows.
std::expected< DuctGrid, DuctError > MayaFlux::Kinesis::Acoustics::detail::finish_duct_grid (DuctGrid grid, const DuctSpec &spec)
template<typename Radius>
requires std::is_invocable_r_v<double, Radius&, double>
std::expected< DuctGrid, DuctError > MayaFlux::Kinesis::Acoustics::make_duct_grid (const DuctSpec &spec, Radius radius)
 Build a grid from a radius function of position.
std::expected< DuctGrid, DuctError > MayaFlux::Kinesis::Acoustics::make_duct_grid (const DuctSpec &spec, std::span< const double > radii)
 Build a grid from radii sampled evenly along the bore.

Detailed Description

Interleaved grid of a one dimensional acoustic bore.

Pressure sits at N + 1 points and volume velocity at the N half points between them. Each pressure point owns the volume of the two half sections around it, so the compliance of a cell is its volume over rho c^2, and the end cells are half cells. The interior and end updates all draw their gains from the two arrays prepared here.

Nothing here logs or reads a global sample rate; every value comes from the spec.

Definition in file DuctGrid.hpp.