Skip to content

Commit 911a2a1

Browse files
added protools channel layouts
1 parent e7db472 commit 911a2a1

File tree

10 files changed

+687
-2
lines changed

10 files changed

+687
-2
lines changed

examples/include/_common.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ typedef enum {
113113
LOUDSPEAKER_ARRAY_PRESET_13PX,
114114
LOUDSPEAKER_ARRAY_PRESET_22PX,
115115
LOUDSPEAKER_ARRAY_PRESET_22P2_9_10_3,
116+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_STEREO,
117+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_LCR,
118+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_QUAD,
119+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_5_0,
120+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_5_0_2,
121+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_5_0_4,
122+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_7_0,
123+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_7_0_2,
124+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_7_0_4,
125+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_7_0_6,
126+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_9_0_4,
127+
LOUDSPEAKER_ARRAY_PRESET_PROTOOLS_9_0_6,
116128
LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC,
117129
LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC_SUBSET,
118130
LOUDSPEAKER_ARRAY_PRESET_AALTO_APAJA,
@@ -148,6 +160,18 @@ typedef enum {
148160
SOURCE_CONFIG_PRESET_13PX,
149161
SOURCE_CONFIG_PRESET_22PX,
150162
SOURCE_CONFIG_PRESET_22P2_9_10_3,
163+
SOURCE_CONFIG_PRESET_PROTOOLS_STEREO,
164+
SOURCE_CONFIG_PRESET_PROTOOLS_LCR,
165+
SOURCE_CONFIG_PRESET_PROTOOLS_QUAD,
166+
SOURCE_CONFIG_PRESET_PROTOOLS_5_0,
167+
SOURCE_CONFIG_PRESET_PROTOOLS_5_0_2,
168+
SOURCE_CONFIG_PRESET_PROTOOLS_5_0_4,
169+
SOURCE_CONFIG_PRESET_PROTOOLS_7_0,
170+
SOURCE_CONFIG_PRESET_PROTOOLS_7_0_2,
171+
SOURCE_CONFIG_PRESET_PROTOOLS_7_0_4,
172+
SOURCE_CONFIG_PRESET_PROTOOLS_7_0_6,
173+
SOURCE_CONFIG_PRESET_PROTOOLS_9_0_4,
174+
SOURCE_CONFIG_PRESET_PROTOOLS_9_0_6,
151175
SOURCE_CONFIG_PRESET_AALTO_MCC,
152176
SOURCE_CONFIG_PRESET_AALTO_MCC_SUBSET,
153177
SOURCE_CONFIG_PRESET_AALTO_APAJA,

examples/include/binauraliser.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ typedef enum {
6060
INTERP_TRI_PS /**< Triangular interpolation (with phase-simplification) */
6161
}INTERP_MODES;
6262

63+
/** Default number of Sources */
64+
extern const int binauraliser_defaultNumSources;
65+
66+
/** Default Loudspeaker directions */
67+
extern const float binauraliser_defaultSourceDirections[MAX_NUM_INPUTS][2];
68+
6369

6470
/* ========================================================================== */
6571
/* Main Functions */

examples/src/binauraliser/binauraliser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ void binauraliser_create
4242
int ch, dummy;
4343

4444
/* user parameters */
45-
binauraliser_loadPreset(SOURCE_CONFIG_PRESET_DEFAULT, pData->src_dirs_deg, &(pData->new_nSources), &(dummy)); /*check setStateInformation if you change default preset*/
45+
binauraliser_loadPreset(SOURCE_CONFIG_PRESET_DEFAULT, pData->src_dirs_deg, &(pData->new_nSources), &(dummy)); /* must match binauraliser_defaultSourceDirections */
4646
pData->useDefaultHRIRsFLAG = 1; /* pars->sofa_filepath must be valid to set this to 0 */
4747
pData->enableHRIRsDiffuseEQ = 1;
4848
pData->nSources = pData->new_nSources;
49-
pData->interpMode = INTERP_TRI_PS;
49+
pData->interpMode = INTERP_TRI;
5050
pData->yaw = 0.0f;
5151
pData->pitch = 0.0f;
5252
pData->roll = 0.0f;

examples/src/binauraliser/binauraliser_internal.c

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,139 @@
3232

3333
#include "binauraliser_internal.h"
3434

35+
const int binauraliser_defaultNumSources = 1;
36+
37+
/* First 1 source(s) are for mono [0 0], the rest are for a 128 point sphere covering */
38+
const float binauraliser_defaultSourceDirections[MAX_NUM_INPUTS][2] =
39+
{ { 0.0f, 0.0f},
40+
{ -120.415474946769f, 69.7642225220975f},
41+
{ 169.426697678052f, -17.3466306179260f},
42+
{ 107.629281568279f, -10.0793856720614f},
43+
{ -59.5674172539630f, -69.7763953095265f},
44+
{ -107.629493132161f, 10.0801907586439f},
45+
{ 59.5651193014662f, 69.7750019669784f},
46+
{ -72.3715136529922f, -10.0909592824967f},
47+
{ 120.418832045969f, -69.7630732527928f},
48+
{ 72.3705387467529f, 10.0908849630425f},
49+
{ 10.5699823270029f, 17.3489915451677f},
50+
{ -169.426851150349f, 17.3476277272366f},
51+
{ -30.7728814706980f, 68.2546206344998f},
52+
{ 101.529181734204f, 18.5653877408229f},
53+
{ 149.250234431564f, 68.2619792676765f},
54+
{ 18.9183978612362f, -10.9197242075287f},
55+
{ 78.4729799557400f, -18.5558892226653f},
56+
{ -18.9161109968480f, 10.9195275229078f},
57+
{ -78.4723066816396f, 18.5565169424192f},
58+
{ -161.085243560336f, -10.9220975953767f},
59+
{ -101.530063994217f, -18.5648176173994f},
60+
{ 161.085855454581f, 10.9237834974412f},
61+
{ 30.7790837424989f, -68.2562996173874f},
62+
{ -149.255648697558f, -68.2594892022576f},
63+
{ 56.4638592172755f, 41.2645742763346f},
64+
{ 46.4626904606488f, 24.5386896277818f},
65+
{ -123.528839291756f, 41.2565889648213f},
66+
{ 32.1932295461248f, 38.8027347956192f},
67+
{ 133.534545076742f, -24.5310453346374f},
68+
{ -32.1935458377634f, -38.8041545028931f},
69+
{ -133.533477606995f, 24.5319420428588f},
70+
{ -147.797881221742f, 38.7980990097138f},
71+
{ -46.4626630742447f, -24.5400749997299f},
72+
{ 147.799544204027f, -38.7965984357137f},
73+
{ -56.4649576930965f, -41.2658215291547f},
74+
{ 123.530547454259f, -41.2555316199835f},
75+
{ 84.7385596473317f, 27.3132538556364f},
76+
{ 27.4072860474693f, 4.67593317316088f},
77+
{ -95.2612516264878f, 27.3036967398252f},
78+
{ 10.0607591758466f, 62.2287426217158f},
79+
{ 152.592710471291f, -4.67007594116539f},
80+
{ -10.0604693351594f, -62.2317767049329f},
81+
{ -152.592615409799f, 4.67188744845125f},
82+
{ -169.918387889403f, 62.2272712110016f},
83+
{ -27.4047652820400f, -4.67684895484045f},
84+
{ 169.918493477140f, -62.2246416140826f},
85+
{ -84.7390238025025f, -27.3120311727342f},
86+
{ 95.2622793653641f, -27.3027426350066f},
87+
{ 136.272846725200f, -0.726139068263599f},
88+
{ -1.05456977390436f, -46.2698051615206f},
89+
{ -43.7263256019408f, -0.737666959763443f},
90+
{ -91.0084089447853f, 43.7170295842697f},
91+
{ -178.936314291048f, 46.2682278552731f},
92+
{ 91.0100541861312f, -43.7163112498585f},
93+
{ 178.938490558618f, -46.2666218304286f},
94+
{ 88.9860902890987f, 43.7285680951606f},
95+
{ 1.05095788619312f, 46.2682407577363f},
96+
{ -88.9851906686018f, -43.7278600822776f},
97+
{ -136.273314433943f, 0.726484363994244f},
98+
{ 43.7273191822901f, 0.733967099281741f},
99+
{ 55.2321077221357f, 10.8187456245361f},
100+
{ 13.0867814081219f, 34.0654299770448f},
101+
{ -124.767898552651f, 10.8099467408727f},
102+
{ 71.4751302534919f, 53.7984109774923f},
103+
{ 166.905549455530f, -34.0625862919868f},
104+
{ -71.4765158530160f, -53.8002805142714f},
105+
{ -166.904587570338f, 34.0633858486074f},
106+
{ -108.515564585463f, 53.7864186881779f},
107+
{ -13.0869589355977f, -34.0644403811701f},
108+
{ 108.517274377512f, -53.7853093207457f},
109+
{ -55.2337689585088f, -10.8200079671294f},
110+
{ 124.767519417537f, -10.8096092876561f},
111+
{ -105.493359369733f, -68.1345228940484f},
112+
{ -111.151973933085f, -5.71277564515985f},
113+
{ 74.5244447329726f, -68.1205741555505f},
114+
{ -173.885132403874f, -21.0401043953034f},
115+
{ -68.8521018079939f, 5.70313885775370f},
116+
{ 173.885050918764f, 21.0419786777516f},
117+
{ 68.8513569996117f, -5.70297394874866f},
118+
{ 6.12041448982713f, -21.0387333986971f},
119+
{ 111.151515131908f, 5.71357243375474f},
120+
{ -6.11913621739966f, 21.0397756114589f},
121+
{ 105.487055344890f, 68.1331981897040f},
122+
{ -74.5188619841755f, 68.1214716326340f},
123+
{ 35.2822222163987f, -15.1801841162885f},
124+
{ -25.1732516880600f, 51.9826514887145f},
125+
{ -144.722913967824f, -15.1859965048827f},
126+
{ 108.386507250934f, 33.8824333892584f},
127+
{ -154.839566662519f, -51.9856067440744f},
128+
{ -108.385758587361f, -33.8826426573830f},
129+
{ 154.840828582605f, 51.9884126722963f},
130+
{ -71.6110721306039f, 33.8714084774643f},
131+
{ 25.1699762263473f, -51.9843011897216f},
132+
{ 71.6126173250777f, -33.8705490198003f},
133+
{ -35.2810594358470f, 15.1763090469469f},
134+
{ 144.722474074749f, 15.1863112389402f},
135+
{ -125.277803641269f, -28.5561977838671f},
136+
{ -146.317489805034f, -30.4888082061806f},
137+
{ 54.7220842889970f, -28.5463137051834f},
138+
{ -133.292600372594f, -45.8199818171681f},
139+
{ -33.6854220654234f, 30.4794807422719f},
140+
{ 133.295169860873f, 45.8200619710773f},
141+
{ 33.6830420572493f, -30.4828689919959f},
142+
{ 46.7098267598019f, -45.8106991831118f},
143+
{ 146.318736830907f, 30.4889588527258f},
144+
{ -46.7107531920589f, 45.8077510168776f},
145+
{ 125.278543193551f, 28.5567151663926f},
146+
{ -54.7226679373581f, 28.5424675755949f},
147+
{ -144.402199049652f, 54.7141577397485f},
148+
{ 112.382216591782f, -28.0100385212576f},
149+
{ 35.5834085793474f, 54.7193853715013f},
150+
{ -29.9155874729000f, -19.6471282266303f},
151+
{ 67.6163420587218f, 28.0211878299760f},
152+
{ 29.9151078604395f, 19.6461577548916f},
153+
{ -67.6164804090156f, -28.0221553885221f},
154+
{ 150.081679085309f, -19.6396879622134f},
155+
{ -112.381365317985f, 28.0105570315277f},
156+
{ -150.081127534239f, 19.6412999777121f},
157+
{ 144.402936805264f, -54.7127597303097f},
158+
{ -35.5837994140428f, -54.7203576209200f},
159+
{ 68.5348504928164f, -52.8527273534571f},
160+
{ -54.8218918027732f, 12.7570858971645f},
161+
{ -111.464947340552f, -52.8652964226689f},
162+
{ 164.510735700738f, 34.1892226850382f},
163+
{ -125.181243085238f, -12.7710900404128f},
164+
{ -164.510172672569f, -34.1865270720665f},
165+
{ 125.180742749445f, 12.7714932994183f},
166+
{ -15.4967238792034f, 34.1855682977571f}};
167+
35168
void binauraliser_setCodecStatus(void* const hBin, CODEC_STATUS newStatus)
36169
{
37170
binauraliser_data *pData = (binauraliser_data*)(hBin);
@@ -373,6 +506,78 @@ void binauraliser_loadPreset
373506
for(i=0; i<2; i++)
374507
dirs_deg[ch][i] = __9_10_3p2_dirs_deg[ch][i];
375508
break;
509+
case SOURCE_CONFIG_PRESET_PROTOOLS_STEREO:
510+
nCH = 2;
511+
for(ch=0; ch<nCH; ch++)
512+
for(i=0; i<2; i++)
513+
dirs_deg[ch][i] = __protools_stereo_dirs_deg[__protools_mapping_stereo_to_discrete[ch]][i];
514+
break;
515+
case SOURCE_CONFIG_PRESET_PROTOOLS_LCR:
516+
nCH = 3;
517+
for(ch=0; ch<nCH; ch++)
518+
for(i=0; i<2; i++)
519+
dirs_deg[ch][i] = __protools_LCR_dirs_deg[__protools_mapping_LCR_to_discrete[ch]][i];
520+
break;
521+
case SOURCE_CONFIG_PRESET_PROTOOLS_QUAD:
522+
nCH = 4;
523+
for(ch=0; ch<nCH; ch++)
524+
for(i=0; i<2; i++)
525+
dirs_deg[ch][i] = __protools_Quad_dirs_deg[__protools_mapping_Quad_to_discrete[ch]][i];
526+
break;
527+
case SOURCE_CONFIG_PRESET_PROTOOLS_5_0:
528+
nCH = 5;
529+
for(ch=0; ch<nCH; ch++)
530+
for(i=0; i<2; i++)
531+
dirs_deg[ch][i] = __protools_5p0_dirs_deg[__protools_mapping_5p0_to_discrete[ch]][i];
532+
break;
533+
case SOURCE_CONFIG_PRESET_PROTOOLS_5_0_2:
534+
nCH = 7;
535+
for(ch=0; ch<nCH; ch++)
536+
for(i=0; i<2; i++)
537+
dirs_deg[ch][i] = __protools_5p0p2_dirs_deg[__protools_mapping_5p0p2_to_discrete[ch]][i];
538+
break;
539+
case SOURCE_CONFIG_PRESET_PROTOOLS_5_0_4:
540+
nCH = 9;
541+
for(ch=0; ch<nCH; ch++)
542+
for(i=0; i<2; i++)
543+
dirs_deg[ch][i] = __protools_5p0p4_dirs_deg[__protools_mapping_5p0p4_to_discrete[ch]][i];
544+
break;
545+
case SOURCE_CONFIG_PRESET_PROTOOLS_7_0:
546+
nCH = 7;
547+
for(ch=0; ch<nCH; ch++)
548+
for(i=0; i<2; i++)
549+
dirs_deg[ch][i] = __protools_7p0_dirs_deg[__protools_mapping_7p0_to_discrete[ch]][i];
550+
break;
551+
case SOURCE_CONFIG_PRESET_PROTOOLS_7_0_2:
552+
nCH = 9;
553+
for(ch=0; ch<nCH; ch++)
554+
for(i=0; i<2; i++)
555+
dirs_deg[ch][i] = __protools_7p0p2_dirs_deg[__protools_mapping_7p0p2_to_discrete[ch]][i];
556+
break;
557+
case SOURCE_CONFIG_PRESET_PROTOOLS_7_0_4:
558+
nCH = 11;
559+
for(ch=0; ch<nCH; ch++)
560+
for(i=0; i<2; i++)
561+
dirs_deg[ch][i] = __protools_7p0p4_dirs_deg[__protools_mapping_7p0p4_to_discrete[ch]][i];
562+
break;
563+
case SOURCE_CONFIG_PRESET_PROTOOLS_7_0_6:
564+
nCH = 13;
565+
for(ch=0; ch<nCH; ch++)
566+
for(i=0; i<2; i++)
567+
dirs_deg[ch][i] = __protools_7p0p6_dirs_deg[__protools_mapping_7p0p6_to_discrete[ch]][i];
568+
break;
569+
case SOURCE_CONFIG_PRESET_PROTOOLS_9_0_4:
570+
nCH = 13;
571+
for(ch=0; ch<nCH; ch++)
572+
for(i=0; i<2; i++)
573+
dirs_deg[ch][i] = __protools_9p0p4_dirs_deg[__protools_mapping_9p0p4_to_discrete[ch]][i];
574+
break;
575+
case SOURCE_CONFIG_PRESET_PROTOOLS_9_0_6:
576+
nCH = 15;
577+
for(ch=0; ch<nCH; ch++)
578+
for(i=0; i<2; i++)
579+
dirs_deg[ch][i] = __protools_9p0p6_dirs_deg[__protools_mapping_9p0p6_to_discrete[ch]][i];
580+
break;
376581
case SOURCE_CONFIG_PRESET_AALTO_MCC:
377582
nCH = 45;
378583
for(ch=0; ch<nCH; ch++)

0 commit comments

Comments
 (0)