fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
SphericalHarmonics.h
1/***************************************************************************************************
2 ██████ █████ █████ █████
3 ███░░███ ░░███ ░░███ ░░███
4 ░███ ░░░ █████ ░███████ ██ ██ █████ ███████ ░███ █████
5 ███████ ███░░ ░███░░███ ░░ ░░ ███░░ ░░░███░ ░███░░███
6 ░░░███░ ░░█████ ░███ ░███ ░░█████ ░███ ░██████░
7 ░███ ░░░░███ ░███ ░███ ░░░░███ ░███ ███ ░███░░███
8 █████ ██████ ████ █████ ██ ██ ██████ ░░█████ ████ █████
9 ░░░░░ ░░░░░░ ░░░░ ░░░░░ ░░ ░░ ░░░░░░ ░░░░░ ░░░░ ░░░░░
10
11 fantastic spatial holophonic synthesis tool kit
12
13 copyright (c) fabian hummel
14 www.github.com/fshstk
15 www.fshstk.com
16
17 this file is part of the fantastic spatial holophonic synthesis toolkit (fsh::stk)
18 fsh::stk is free software: it is provided under the terms of the gnu general public license v3.0
19 www.gnu.org/licenses/gpl-3.0
20***************************************************************************************************/
21
22#pragma once
23#include "SphericalVector.h"
24#include <array>
25
26namespace fsh::util
27{
28enum class Normalization
29{
30 N3D,
31 SN3D,
32};
33
34// TODO: maybe define these in a file with a better name:
35// TODO: pack into class so doxygen can generate docs
36constexpr auto maxAmbiOrder = 5;
37constexpr auto maxNumChannels = (maxAmbiOrder + 1) * (maxAmbiOrder + 1);
38
39std::array<float, maxNumChannels> harmonics(const SphericalVector&,
40 Normalization = Normalization::SN3D);
41} // namespace fsh::util