Use calibrated chirp-bin emission plans
This commit is contained in:
parent
488fda5362
commit
56ff798b8b
12 changed files with 473 additions and 109 deletions
|
|
@ -1,8 +1,25 @@
|
|||
{
|
||||
"ModelId": "chirp-bin-20260523T191655Z",
|
||||
"CreatedAt": "2026-05-23T19:16:55.9803706+00:00",
|
||||
"ModelId": "chirp-bin-20260523T192955Z",
|
||||
"CreatedAt": "2026-05-23T19:29:55.6287406+00:00",
|
||||
"SampleRate": 192000,
|
||||
"ReferenceSourceId": "asio-ch2",
|
||||
"EmissionPlan": {
|
||||
"ReliableSymbolCount": 10,
|
||||
"RecommendedOrder": 6,
|
||||
"ReliableSymbolIds": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
31
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"Paths": [
|
||||
{
|
||||
"SourceId": "asio-ch0",
|
||||
|
|
@ -274,10 +291,28 @@
|
|||
],
|
||||
"UsableBandCount": 15
|
||||
},
|
||||
"EmissionPlan": {
|
||||
"ReliableSymbolCount": 10,
|
||||
"RecommendedOrder": 6,
|
||||
"ReliableSymbolIds": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
31
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"CodebookPlan": {
|
||||
"ReliableSymbolCount": 0,
|
||||
"RecommendedOrder": 8,
|
||||
"ReliableSymbolIds": []
|
||||
"ReliableSymbolIds": [],
|
||||
"IsAdaptive": false
|
||||
},
|
||||
"Symbols": [],
|
||||
"Confusion": [],
|
||||
|
|
@ -290,9 +325,9 @@
|
|||
"SourceId": "asio-ch1",
|
||||
"SampleRate": 192000,
|
||||
"FrameCount": 23,
|
||||
"AnchorCount": 21,
|
||||
"ClockConfidence": 0.8630578147481293,
|
||||
"MeanAnchorErrorSamples": 37.291584033245464,
|
||||
"AnchorCount": 9,
|
||||
"ClockConfidence": 0.8854209145795446,
|
||||
"MeanAnchorErrorSamples": 12.591755943532819,
|
||||
"Bands": [
|
||||
{
|
||||
"CenterHz": 3625,
|
||||
|
|
@ -553,34 +588,52 @@
|
|||
],
|
||||
"UsableBandCount": 2
|
||||
},
|
||||
"EmissionPlan": {
|
||||
"ReliableSymbolCount": 10,
|
||||
"RecommendedOrder": 6,
|
||||
"ReliableSymbolIds": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
31
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"CodebookPlan": {
|
||||
"ReliableSymbolCount": 2,
|
||||
"RecommendedOrder": 8,
|
||||
"ReliableSymbolIds": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"Symbols": [
|
||||
{
|
||||
"SymbolId": 1,
|
||||
"Reliability": 0.02319056845550582,
|
||||
"Reliability": 0.02338947289373043,
|
||||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4468.75,
|
||||
"MeanEnergy": 0.9902022429801735,
|
||||
"MeanTimingResidualSamples": 807.8313302832285,
|
||||
"TimingResidualSpreadSamples": 208.19093681468166,
|
||||
"MeanTimingResidualSamples": 797.9807757331619,
|
||||
"TimingResidualSpreadSamples": 206.01228513677142,
|
||||
"MeanPhaseRadians": -1.1959642801490071,
|
||||
"ObservationCount": 8
|
||||
},
|
||||
{
|
||||
"SymbolId": 2,
|
||||
"Reliability": 0.16743780377184878,
|
||||
"Reliability": 0.16959717331712612,
|
||||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4475,
|
||||
"MeanEnergy": 0.9196472718940074,
|
||||
"MeanTimingResidualSamples": -106.64683404730425,
|
||||
"TimingResidualSpreadSamples": 186.34542688028313,
|
||||
"MeanTimingResidualSamples": -116.56194124453597,
|
||||
"TimingResidualSpreadSamples": 183.36166029984568,
|
||||
"MeanPhaseRadians": 1.008577262190213,
|
||||
"ObservationCount": 9
|
||||
},
|
||||
|
|
@ -590,7 +643,7 @@
|
|||
"ExpectedCenterHz": 4975,
|
||||
"ObservedCenterHz": 4975,
|
||||
"MeanEnergy": 1.148185667935492,
|
||||
"MeanTimingResidualSamples": -22.558693408966064,
|
||||
"MeanTimingResidualSamples": -38.79995955526829,
|
||||
"TimingResidualSpreadSamples": 0,
|
||||
"MeanPhaseRadians": -0.5902763444645657,
|
||||
"ObservationCount": 1
|
||||
|
|
@ -601,7 +654,7 @@
|
|||
"ExpectedCenterHz": 5425,
|
||||
"ObservedCenterHz": 4975,
|
||||
"MeanEnergy": 0.30966049519505534,
|
||||
"MeanTimingResidualSamples": -720.2603219151497,
|
||||
"MeanTimingResidualSamples": -733.0157453864813,
|
||||
"TimingResidualSpreadSamples": 0,
|
||||
"MeanPhaseRadians": 2.5499560816611844,
|
||||
"ObservationCount": 1
|
||||
|
|
@ -612,7 +665,7 @@
|
|||
"ExpectedCenterHz": 6325,
|
||||
"ObservedCenterHz": 6775,
|
||||
"MeanEnergy": 0.8679642624875925,
|
||||
"MeanTimingResidualSamples": 896.3364210426807,
|
||||
"MeanTimingResidualSamples": 890.5526829659939,
|
||||
"TimingResidualSpreadSamples": 0,
|
||||
"MeanPhaseRadians": 3.098070627204246,
|
||||
"ObservationCount": 1
|
||||
|
|
@ -623,7 +676,7 @@
|
|||
"ExpectedCenterHz": 6775,
|
||||
"ObservedCenterHz": 7225,
|
||||
"MeanEnergy": 0.5299773190124039,
|
||||
"MeanTimingResidualSamples": 1098.634792521596,
|
||||
"MeanTimingResidualSamples": 1096.3368971347809,
|
||||
"TimingResidualSpreadSamples": 0,
|
||||
"MeanPhaseRadians": 0.19503307191358674,
|
||||
"ObservationCount": 1
|
||||
|
|
@ -634,7 +687,7 @@
|
|||
"ExpectedCenterHz": 7225,
|
||||
"ObservedCenterHz": 7225,
|
||||
"MeanEnergy": 0.6732785913925556,
|
||||
"MeanTimingResidualSamples": -8.06683599948883,
|
||||
"MeanTimingResidualSamples": -6.878888696432114,
|
||||
"TimingResidualSpreadSamples": 0,
|
||||
"MeanPhaseRadians": 2.6277982959406794,
|
||||
"ObservationCount": 1
|
||||
|
|
@ -648,9 +701,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.6320307152592042,
|
||||
"TimingResidualSamples": 969.2773541212082,
|
||||
"TimingResidualSamples": 947.2263501733541,
|
||||
"Confidence": 0.6320307152592042,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -1.6624052502584878
|
||||
},
|
||||
{
|
||||
|
|
@ -660,9 +714,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.8652845939929102,
|
||||
"TimingResidualSamples": 2.7101446241140366,
|
||||
"TimingResidualSamples": -18.17891177535057,
|
||||
"Confidence": 0.8652845939929102,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0180307422947092
|
||||
},
|
||||
{
|
||||
|
|
@ -672,9 +727,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.8922343380058734,
|
||||
"TimingResidualSamples": 2.142935112118721,
|
||||
"TimingResidualSamples": -17.58417372405529,
|
||||
"Confidence": 0.8922343380058734,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0220387933489175
|
||||
},
|
||||
{
|
||||
|
|
@ -684,9 +740,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 1.2266248952300964,
|
||||
"TimingResidualSamples": 902.5757256150246,
|
||||
"TimingResidualSamples": 884.0105643421412,
|
||||
"Confidence": 1.2266248952300964,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -0.7101835897546481
|
||||
},
|
||||
{
|
||||
|
|
@ -696,9 +753,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.9053756459646586,
|
||||
"TimingResidualSamples": 1.008516103029251,
|
||||
"TimingResidualSamples": -16.394697606563568,
|
||||
"Confidence": 0.9053756459646586,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0334368755807082
|
||||
},
|
||||
{
|
||||
|
|
@ -708,9 +766,10 @@
|
|||
"ExpectedCenterHz": 4975,
|
||||
"ObservedCenterHz": 4975,
|
||||
"ObservedEnergy": 1.148185667935492,
|
||||
"TimingResidualSamples": -22.558693408966064,
|
||||
"TimingResidualSamples": -38.79995955526829,
|
||||
"Confidence": 1.148185667935492,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -0.5902763444645656
|
||||
},
|
||||
{
|
||||
|
|
@ -720,9 +779,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 1.1922110739849172,
|
||||
"TimingResidualSamples": 900.8740970939398,
|
||||
"TimingResidualSamples": 885.7947785109282,
|
||||
"Confidence": 1.1922110739849172,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -0.7107129185351657
|
||||
},
|
||||
{
|
||||
|
|
@ -732,9 +792,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.8953269035780607,
|
||||
"TimingResidualSamples": -0.6931124180555344,
|
||||
"TimingResidualSamples": -14.610483437776566,
|
||||
"Confidence": 0.8953269035780607,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0251732541617515
|
||||
},
|
||||
{
|
||||
|
|
@ -744,9 +805,10 @@
|
|||
"ExpectedCenterHz": 5425,
|
||||
"ObservedCenterHz": 4975,
|
||||
"ObservedEnergy": 0.30966049519505534,
|
||||
"TimingResidualSamples": -720.2603219151497,
|
||||
"TimingResidualSamples": -733.0157453864813,
|
||||
"Confidence": 0.30966049519505534,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": -1,
|
||||
"PhaseRadians": 2.5499560816611844
|
||||
},
|
||||
{
|
||||
|
|
@ -756,9 +818,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.6198462152151802,
|
||||
"TimingResidualSamples": 964.2498763252806,
|
||||
"TimingResidualSamples": 952.6564004321408,
|
||||
"Confidence": 0.6198462152151802,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -1.6367658651449744
|
||||
},
|
||||
{
|
||||
|
|
@ -768,9 +831,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.8629764995587222,
|
||||
"TimingResidualSamples": -2.39474093914032,
|
||||
"TimingResidualSamples": -12.826269268989563,
|
||||
"Confidence": 0.8629764995587222,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0292647496608314
|
||||
},
|
||||
{
|
||||
|
|
@ -780,9 +844,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.6170315850664282,
|
||||
"TimingResidualSamples": 962.4708400517702,
|
||||
"TimingResidualSamples": 954.3632068485022,
|
||||
"Confidence": 0.6170315850664282,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -1.6334918021334714
|
||||
},
|
||||
{
|
||||
|
|
@ -792,9 +857,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.8633924891830707,
|
||||
"TimingResidualSamples": -4.096369445323944,
|
||||
"TimingResidualSamples": -11.04205510020256,
|
||||
"Confidence": 0.8633924891830707,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0289449583188552
|
||||
},
|
||||
{
|
||||
|
|
@ -804,9 +870,10 @@
|
|||
"ExpectedCenterHz": 6325,
|
||||
"ObservedCenterHz": 6775,
|
||||
"ObservedEnergy": 0.8679642624875925,
|
||||
"TimingResidualSamples": 896.3364210426807,
|
||||
"TimingResidualSamples": 890.5526829659939,
|
||||
"Confidence": 0.8679642624875925,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": 3.098070627204246
|
||||
},
|
||||
{
|
||||
|
|
@ -816,9 +883,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 1.1921949851942821,
|
||||
"TimingResidualSamples": 895.7692115306854,
|
||||
"TimingResidualSamples": 891.1474210172892,
|
||||
"Confidence": 1.1921949851942821,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -0.703020204805768
|
||||
},
|
||||
{
|
||||
|
|
@ -828,9 +896,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.881859333373252,
|
||||
"TimingResidualSamples": -5.7979979664087296,
|
||||
"TimingResidualSamples": -9.257840931415558,
|
||||
"Confidence": 0.881859333373252,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0345538888401813
|
||||
},
|
||||
{
|
||||
|
|
@ -840,9 +909,10 @@
|
|||
"ExpectedCenterHz": 6775,
|
||||
"ObservedCenterHz": 7225,
|
||||
"ObservedEnergy": 0.5299773190124039,
|
||||
"TimingResidualSamples": 1098.634792521596,
|
||||
"TimingResidualSamples": 1096.3368971347809,
|
||||
"Confidence": 0.5299773190124039,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": 0.19503307191358674
|
||||
},
|
||||
{
|
||||
|
|
@ -852,9 +922,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4075,
|
||||
"ObservedEnergy": 1.2388193344455247,
|
||||
"TimingResidualSamples": -24.9324169754982,
|
||||
"TimingResidualSamples": -26.068364813923836,
|
||||
"Confidence": 1.2388193344455247,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8128993540776832
|
||||
},
|
||||
{
|
||||
|
|
@ -864,9 +935,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 0.9011319584205876,
|
||||
"TimingResidualSamples": -7.499626487493515,
|
||||
"TimingResidualSamples": -7.473626762628555,
|
||||
"Confidence": 0.9011319584205876,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 1.0288652611619757
|
||||
},
|
||||
{
|
||||
|
|
@ -876,9 +948,10 @@
|
|||
"ExpectedCenterHz": 7225,
|
||||
"ObservedCenterHz": 7225,
|
||||
"ObservedEnergy": 0.6732785913925556,
|
||||
"TimingResidualSamples": -8.06683599948883,
|
||||
"TimingResidualSamples": -6.878888696432114,
|
||||
"Confidence": 0.6732785913925556,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 2.6277982959406794
|
||||
},
|
||||
{
|
||||
|
|
@ -888,9 +961,10 @@
|
|||
"ExpectedCenterHz": 4075,
|
||||
"ObservedCenterHz": 4525,
|
||||
"ObservedEnergy": 1.202859139445754,
|
||||
"TimingResidualSamples": 892.365954503417,
|
||||
"TimingResidualSamples": 894.7158493548632,
|
||||
"Confidence": 1.202859139445754,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": 1,
|
||||
"PhaseRadians": -0.7043348957346999
|
||||
},
|
||||
{
|
||||
|
|
@ -900,9 +974,10 @@
|
|||
"ExpectedCenterHz": 4525,
|
||||
"ObservedCenterHz": 4075,
|
||||
"ObservedEnergy": 1.209243684968931,
|
||||
"TimingResidualSamples": -945.2012550085783,
|
||||
"TimingResidualSamples": -941.6894125938416,
|
||||
"Confidence": 1.209243684968931,
|
||||
"DelayHypothesisSamples": -71375003.58864856,
|
||||
"DelayHypothesisSamples": -71371524,
|
||||
"BinShift": -1,
|
||||
"PhaseRadians": -1.9807483218485091
|
||||
}
|
||||
],
|
||||
|
|
@ -1178,6 +1253,23 @@
|
|||
],
|
||||
"UsableBandCount": 2
|
||||
},
|
||||
"EmissionPlan": {
|
||||
"ReliableSymbolCount": 10,
|
||||
"RecommendedOrder": 6,
|
||||
"ReliableSymbolIds": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
31
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"CodebookPlan": {
|
||||
"ReliableSymbolCount": 9,
|
||||
"RecommendedOrder": 6,
|
||||
|
|
@ -1191,7 +1283,8 @@
|
|||
3,
|
||||
0,
|
||||
1
|
||||
]
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"Symbols": [
|
||||
{
|
||||
|
|
@ -1305,6 +1398,7 @@
|
|||
"TimingResidualSamples": -2.5433450834352698,
|
||||
"Confidence": 1.9831585964902498,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 3.0592955096959598
|
||||
},
|
||||
{
|
||||
|
|
@ -1317,6 +1411,7 @@
|
|||
"TimingResidualSamples": -2.6111917724629166,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1329,6 +1424,7 @@
|
|||
"TimingResidualSamples": -2.6790384614942013,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1341,6 +1437,7 @@
|
|||
"TimingResidualSamples": -2.746885150525486,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1353,6 +1450,7 @@
|
|||
"TimingResidualSamples": -2.814731839534943,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1365,6 +1463,7 @@
|
|||
"TimingResidualSamples": -2.8825785285444,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1377,6 +1476,7 @@
|
|||
"TimingResidualSamples": 2.0495747824315913,
|
||||
"Confidence": 1.98317479150165,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.1988765139742783
|
||||
},
|
||||
{
|
||||
|
|
@ -1389,6 +1489,7 @@
|
|||
"TimingResidualSamples": -3.0182719065924175,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1401,6 +1502,7 @@
|
|||
"TimingResidualSamples": -3.08611859564553,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1413,6 +1515,7 @@
|
|||
"TimingResidualSamples": 1.846034715330461,
|
||||
"Confidence": 1.9831581977468316,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.1546958595762624
|
||||
},
|
||||
{
|
||||
|
|
@ -1425,6 +1528,7 @@
|
|||
"TimingResidualSamples": -3.2218119737226516,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1437,6 +1541,7 @@
|
|||
"TimingResidualSamples": -3.2896586627466604,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1449,6 +1554,7 @@
|
|||
"TimingResidualSamples": -3.357505351770669,
|
||||
"Confidence": 1.9831595137173625,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -2.031073191995889
|
||||
},
|
||||
{
|
||||
|
|
@ -1461,6 +1567,7 @@
|
|||
"TimingResidualSamples": -3.425352040794678,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1473,6 +1580,7 @@
|
|||
"TimingResidualSamples": -3.493198729818687,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1485,6 +1593,7 @@
|
|||
"TimingResidualSamples": -3.5610454188426957,
|
||||
"Confidence": 1.983165098459816,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -2.075246822614443
|
||||
},
|
||||
{
|
||||
|
|
@ -1497,6 +1606,7 @@
|
|||
"TimingResidualSamples": -3.6288921078667045,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1509,6 +1619,7 @@
|
|||
"TimingResidualSamples": -3.6967387968907133,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1521,6 +1632,7 @@
|
|||
"TimingResidualSamples": 1.235414514085278,
|
||||
"Confidence": 1.9831633177029786,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.0221685852666889
|
||||
},
|
||||
{
|
||||
|
|
@ -1533,6 +1645,7 @@
|
|||
"TimingResidualSamples": -3.832432174938731,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1545,6 +1658,7 @@
|
|||
"TimingResidualSamples": -3.9002788639627397,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -1557,6 +1671,7 @@
|
|||
"TimingResidualSamples": 1.0318744470132515,
|
||||
"Confidence": 1.9831607953145476,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -0.9779871637154909
|
||||
},
|
||||
{
|
||||
|
|
@ -1569,6 +1684,7 @@
|
|||
"TimingResidualSamples": -4.035972242010757,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -1581,6 +1697,7 @@
|
|||
"TimingResidualSamples": -4.103818931034766,
|
||||
"Confidence": 1.8861434373187795,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8703739684798266
|
||||
}
|
||||
],
|
||||
|
|
@ -1885,6 +2002,23 @@
|
|||
],
|
||||
"UsableBandCount": 2
|
||||
},
|
||||
"EmissionPlan": {
|
||||
"ReliableSymbolCount": 10,
|
||||
"RecommendedOrder": 6,
|
||||
"ReliableSymbolIds": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
31
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"CodebookPlan": {
|
||||
"ReliableSymbolCount": 9,
|
||||
"RecommendedOrder": 6,
|
||||
|
|
@ -1898,7 +2032,8 @@
|
|||
3,
|
||||
0,
|
||||
1
|
||||
]
|
||||
],
|
||||
"IsAdaptive": true
|
||||
},
|
||||
"Symbols": [
|
||||
{
|
||||
|
|
@ -2012,6 +2147,7 @@
|
|||
"TimingResidualSamples": -2.5433450834352698,
|
||||
"Confidence": 1.9831585964902498,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": 3.0592955096959598
|
||||
},
|
||||
{
|
||||
|
|
@ -2024,6 +2160,7 @@
|
|||
"TimingResidualSamples": -2.6111917724629166,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2036,6 +2173,7 @@
|
|||
"TimingResidualSamples": -2.6790384614942013,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2048,6 +2186,7 @@
|
|||
"TimingResidualSamples": -2.746885150525486,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2060,6 +2199,7 @@
|
|||
"TimingResidualSamples": -2.814731839534943,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2072,6 +2212,7 @@
|
|||
"TimingResidualSamples": -2.8825785285444,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2084,6 +2225,7 @@
|
|||
"TimingResidualSamples": 2.0495747824315913,
|
||||
"Confidence": 1.98317479150165,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.1988765139742783
|
||||
},
|
||||
{
|
||||
|
|
@ -2096,6 +2238,7 @@
|
|||
"TimingResidualSamples": -3.0182719065924175,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2108,6 +2251,7 @@
|
|||
"TimingResidualSamples": -3.08611859564553,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2120,6 +2264,7 @@
|
|||
"TimingResidualSamples": 1.846034715330461,
|
||||
"Confidence": 1.9831581977468316,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.1546958595762624
|
||||
},
|
||||
{
|
||||
|
|
@ -2132,6 +2277,7 @@
|
|||
"TimingResidualSamples": -3.2218119737226516,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2144,6 +2290,7 @@
|
|||
"TimingResidualSamples": -3.2896586627466604,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2156,6 +2303,7 @@
|
|||
"TimingResidualSamples": -3.357505351770669,
|
||||
"Confidence": 1.9831595137173625,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -2.031073191995889
|
||||
},
|
||||
{
|
||||
|
|
@ -2168,6 +2316,7 @@
|
|||
"TimingResidualSamples": -3.425352040794678,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2180,6 +2329,7 @@
|
|||
"TimingResidualSamples": -3.493198729818687,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2192,6 +2342,7 @@
|
|||
"TimingResidualSamples": -3.5610454188426957,
|
||||
"Confidence": 1.983165098459816,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -2.075246822614443
|
||||
},
|
||||
{
|
||||
|
|
@ -2204,6 +2355,7 @@
|
|||
"TimingResidualSamples": -3.6288921078667045,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2216,6 +2368,7 @@
|
|||
"TimingResidualSamples": -3.6967387968907133,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2228,6 +2381,7 @@
|
|||
"TimingResidualSamples": 1.235414514085278,
|
||||
"Confidence": 1.9831633177029786,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.0221685852666889
|
||||
},
|
||||
{
|
||||
|
|
@ -2240,6 +2394,7 @@
|
|||
"TimingResidualSamples": -3.832432174938731,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2252,6 +2407,7 @@
|
|||
"TimingResidualSamples": -3.9002788639627397,
|
||||
"Confidence": 1.9831852678192377,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8985378977427367
|
||||
},
|
||||
{
|
||||
|
|
@ -2264,6 +2420,7 @@
|
|||
"TimingResidualSamples": 1.0318744470132515,
|
||||
"Confidence": 1.9831607953145476,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -0.9779871637154909
|
||||
},
|
||||
{
|
||||
|
|
@ -2276,6 +2433,7 @@
|
|||
"TimingResidualSamples": -4.035972242010757,
|
||||
"Confidence": 1.9831606924956897,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8543981407092287
|
||||
},
|
||||
{
|
||||
|
|
@ -2288,6 +2446,7 @@
|
|||
"TimingResidualSamples": -4.103818931034766,
|
||||
"Confidence": 1.8861434373187795,
|
||||
"DelayHypothesisSamples": 1238.9999232024563,
|
||||
"BinShift": 0,
|
||||
"PhaseRadians": -1.8703739684798266
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -83,7 +83,10 @@ profile is kept even when a timing report is rejected, because a failed sync
|
|||
window can still teach us which bands survived the speaker/room/mic path. The
|
||||
decoder can consume the persisted model to weight reliable symbols, downweight
|
||||
dead bands, apply first-order group-delay correction, and seed global delay
|
||||
hypotheses before selecting the coherent anchor path.
|
||||
hypotheses before selecting the coherent anchor path. The model also owns the
|
||||
active emission plan: if the measured path only leaves a smaller alphabet, Mimir
|
||||
emits that reliable symbol set and raises the de Bruijn order so the timeline
|
||||
remains unique without pretending the dead bins still carry code.
|
||||
The synthetic invariant is
|
||||
`dotnet run --project .\src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj -- --chirp-bin-self-test`;
|
||||
it renders the chirp-bin timeline, decodes by dechirp plus Goertzel bins, and
|
||||
|
|
|
|||
|
|
@ -106,7 +106,10 @@ a named invariant that the native runtime cannot protect yet.
|
|||
bands, expected-symbol versus observed-bin confusion observations, timing
|
||||
residuals, delay hypotheses, phase summaries, and an adaptive codebook plan.
|
||||
The active decoder can consume that model as learned response weighting,
|
||||
first-order group-delay correction, and global delay-hypothesis seeds.
|
||||
first-order group-delay correction, and global delay-hypothesis seeds. The
|
||||
runtime emitter also consumes the model's emission plan, rendering the smaller
|
||||
reliable symbol alphabet at the higher recommended de Bruijn order when the
|
||||
physical path cannot support all 32 bins.
|
||||
Reports/states expose delay in microseconds as well as fractional samples.
|
||||
Hybrid emits this as low-gain half-second bursts every two seconds only while
|
||||
passive confidence is weak.
|
||||
|
|
|
|||
|
|
@ -117,7 +117,10 @@ timing residuals, delay hypotheses, phase summaries, and an adaptive codebook
|
|||
plan. The analyzer keeps raw profiles even when no timing report is accepted,
|
||||
and the active decoder can consume a persisted model for learned response
|
||||
weighting, first-order group-delay correction, and global delay-hypothesis
|
||||
seeding. Reports/states expose `delayUs` next to fractional sample delay.
|
||||
seeding. Runtime chirp-bin emission consumes the same model's emission plan, so
|
||||
the emitted timeline can use the measured reliable symbol set at a higher
|
||||
de Bruijn order instead of continuing to spend code on dead bins. Reports/states
|
||||
expose `delayUs` next to fractional sample delay.
|
||||
`Mimir.BufferSmoke
|
||||
--chirp-only-sync-self-test --sample-rate 192000` and `--hybrid-sync-self-test
|
||||
--sample-rate 192000` both recover a 1269.5-sample synthetic delay with printed
|
||||
|
|
|
|||
|
|
@ -94,7 +94,10 @@ Get-Content .\state\evidence.jsonl -Tail 8
|
|||
measured usable bands, response/confusion observations, timing residuals,
|
||||
delay hypotheses, phase summaries, and adaptive codebook plans. The active
|
||||
decoder can load the model for learned weighting, first-order group-delay
|
||||
correction, and global delay-hypothesis seeds.
|
||||
correction, and global delay-hypothesis seeds. Runtime chirp-bin emission
|
||||
loads the same model's emission plan, so a physical calibration can shrink the
|
||||
emitted alphabet and raise sequence order instead of continuing to use dead
|
||||
bins.
|
||||
`Mimir.BufferSmoke
|
||||
--chirp-only-sync-self-test --sample-rate 192000` and
|
||||
`--hybrid-sync-self-test --sample-rate 192000` both recover a 1269.5-sample
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ if (args.Any(arg => string.Equals(arg, "--render-chirp-bin-f32", StringCompariso
|
|||
return RenderChirpBinFloat32(
|
||||
ParseStringOption(args, "--output", "artifacts/asio/chirp-bin-f32.raw"),
|
||||
ParseIntOption(args, "--sample-rate", MimirChirpBinTimeline.SampleRate),
|
||||
ParseDoubleOption(args, "--seconds", 3.0));
|
||||
ParseDoubleOption(args, "--seconds", 3.0),
|
||||
LoadOptionalCalibration(args)?.EmissionPlan);
|
||||
}
|
||||
|
||||
if (args.Any(arg => string.Equals(arg, "--analyze-asio-f32", StringComparison.OrdinalIgnoreCase)))
|
||||
|
|
@ -455,13 +456,17 @@ static int RenderChirpletFloat32(string outputPath, int sampleRate, double secon
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int RenderChirpBinFloat32(string outputPath, int sampleRate, double seconds)
|
||||
static int RenderChirpBinFloat32(
|
||||
string outputPath,
|
||||
int sampleRate,
|
||||
double seconds,
|
||||
MimirChirpBinCodebookPlan? codebookPlan = null)
|
||||
{
|
||||
var segmentCount = Math.Max(1, (int)Math.Ceiling(seconds / MimirChirpBinTimeline.SegmentSeconds));
|
||||
var samples = new List<float>(Math.Max(1, (int)Math.Ceiling(seconds * sampleRate)));
|
||||
for (var segment = 0; segment < segmentCount; segment++)
|
||||
{
|
||||
samples.AddRange(MimirChirpBinTimeline.Default.RenderSegmentMonoFloat((ulong)segment, sampleRate));
|
||||
samples.AddRange(MimirChirpBinTimeline.Default.RenderSegmentMonoFloat((ulong)segment, sampleRate, codebookPlan));
|
||||
}
|
||||
|
||||
var requestedSamples = Math.Max(1, (int)Math.Round(seconds * sampleRate));
|
||||
|
|
@ -483,10 +488,18 @@ static int RenderChirpBinFloat32(string outputPath, int sampleRate, double secon
|
|||
}
|
||||
|
||||
File.WriteAllBytes(outputPath, bytes);
|
||||
Console.WriteLine($"chirp-bin-render-f32 path={outputPath} sampleRate={sampleRate} seconds={seconds:0.000} samples={samples.Count}");
|
||||
Console.WriteLine($"chirp-bin-render-f32 path={outputPath} sampleRate={sampleRate} seconds={seconds:0.000} samples={samples.Count} adaptiveSymbols={codebookPlan?.ReliableSymbolIds.Count ?? MimirChirpBinTimeline.SymbolCount} order={codebookPlan?.RecommendedOrder ?? MimirChirpBinTimeline.TimelineOrder}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static MimirChirpBinCalibrationModel? LoadOptionalCalibration(string[] args)
|
||||
{
|
||||
var path = ParseStringOption(args, "--calibration", "");
|
||||
return string.IsNullOrWhiteSpace(path) || !File.Exists(path)
|
||||
? null
|
||||
: MimirChirpBinCalibrationModel.Load(path);
|
||||
}
|
||||
|
||||
static int AnalyzeAsioFloat32(
|
||||
string inputPath,
|
||||
int sampleRate,
|
||||
|
|
@ -595,7 +608,7 @@ static int CalibrateChirpBinAsioFloat32(
|
|||
var seconds = ParseDoubleOption(args, "--seconds", 6.0);
|
||||
var gain = ParseDoubleOption(args, "--gain", 1.0);
|
||||
var renderPath = Path.Combine("artifacts", "asio", $"chirp-bin-calibration-{sampleRate}.raw");
|
||||
RenderChirpBinFloat32(renderPath, sampleRate, seconds);
|
||||
RenderChirpBinFloat32(renderPath, sampleRate, seconds, LoadOptionalCalibration(args)?.EmissionPlan);
|
||||
var probeExit = RunAsioProbeCapture(probe, renderPath, inputPath, sampleRate, seconds, gain);
|
||||
if (probeExit != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ public sealed class MimirRuntime : IAquariumRuntime
|
|||
calibrationSegmentIndex,
|
||||
segmentCount,
|
||||
UseChirpBinTimeline(audioSyncSettings.Mode),
|
||||
synchronization.ChirpBinEmissionPlan,
|
||||
out var peak);
|
||||
visualRuntime.Audio.EnqueuePcm16Base64(
|
||||
batch,
|
||||
|
|
@ -223,6 +224,7 @@ public sealed class MimirRuntime : IAquariumRuntime
|
|||
ulong firstSegment,
|
||||
int segmentCount,
|
||||
bool useChirpBinTimeline,
|
||||
MimirChirpBinCodebookPlan? chirpBinCodebookPlan,
|
||||
out float peak)
|
||||
{
|
||||
var samplesPerSegment = (int)Math.Round(MimirChirpletTimeline.SegmentSeconds * MimirChirpletTimeline.SampleRate);
|
||||
|
|
@ -232,7 +234,7 @@ public sealed class MimirRuntime : IAquariumRuntime
|
|||
for (var segment = 0; segment < segmentCount; segment++)
|
||||
{
|
||||
var samples = useChirpBinTimeline
|
||||
? MimirChirpBinTimeline.Default.RenderSegmentMonoFloat(firstSegment + (ulong)segment)
|
||||
? MimirChirpBinTimeline.Default.RenderSegmentMonoFloat(firstSegment + (ulong)segment, MimirChirpBinTimeline.SampleRate, chirpBinCodebookPlan)
|
||||
: MimirChirpletTimeline.Default.RenderSegmentMonoFloat(firstSegment + (ulong)segment);
|
||||
for (var index = 0; index < samples.Length; index++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ public sealed record MimirChirpBinCalibrationModel(
|
|||
DateTimeOffset CreatedAt,
|
||||
int SampleRate,
|
||||
string ReferenceSourceId,
|
||||
MimirChirpBinCodebookPlan EmissionPlan,
|
||||
IReadOnlyList<MimirChirpBinPathCalibration> Paths)
|
||||
{
|
||||
private static readonly JsonSerializerOptions JsonOptions = new()
|
||||
|
|
@ -44,11 +45,14 @@ public sealed record MimirChirpBinCalibrationModel(
|
|||
.OrderBy(pair => pair.Key, StringComparer.Ordinal)
|
||||
.Select(pair => MimirChirpBinPathCalibration.FromDecode(pair.Key, sampleRate, pair.Value))
|
||||
.ToArray();
|
||||
var emissionPlan = MimirChirpBinCodebookPlan.ForSharedEmission(paths);
|
||||
paths = paths.Select(path => path with { EmissionPlan = emissionPlan }).ToArray();
|
||||
return new MimirChirpBinCalibrationModel(
|
||||
$"chirp-bin-{DateTimeOffset.UtcNow:yyyyMMddTHHmmssZ}",
|
||||
DateTimeOffset.UtcNow,
|
||||
sampleRate,
|
||||
referenceSourceId,
|
||||
emissionPlan,
|
||||
paths);
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +61,7 @@ public sealed record MimirChirpBinPathCalibration(
|
|||
string SourceId,
|
||||
int SampleRate,
|
||||
MimirChirpBinCalibrationProfile Profile,
|
||||
MimirChirpBinCodebookPlan EmissionPlan,
|
||||
MimirChirpBinCodebookPlan CodebookPlan,
|
||||
IReadOnlyList<MimirChirpBinSymbolCalibration> Symbols,
|
||||
IReadOnlyList<MimirChirpBinConfusionObservation> Confusion,
|
||||
|
|
@ -114,6 +119,7 @@ public sealed record MimirChirpBinPathCalibration(
|
|||
sampleRate,
|
||||
profile,
|
||||
plan,
|
||||
plan,
|
||||
symbols,
|
||||
observations,
|
||||
hypotheses);
|
||||
|
|
@ -135,7 +141,7 @@ public sealed record MimirChirpBinPathCalibration(
|
|||
var residual = group.Average(anchor => Math.Abs(anchor.SampleOffset - (delay + anchor.TimelineSeconds * decode.ClockFit!.EffectiveSampleRate)));
|
||||
return new MimirChirpBinDelayHypothesis(
|
||||
delay,
|
||||
0,
|
||||
DominantBinShift(group),
|
||||
group.Count(),
|
||||
group.Average(anchor => anchor.Confidence),
|
||||
residual);
|
||||
|
|
@ -150,10 +156,37 @@ public sealed record MimirChirpBinPathCalibration(
|
|||
}
|
||||
|
||||
return Math.Abs(decode.ClockFit.SourceOffsetSamples) <= liveHorizonSamples
|
||||
? [new MimirChirpBinDelayHypothesis(decode.ClockFit.SourceOffsetSamples, 0, decode.ClockFit.AnchorCount, decode.ClockFit.Confidence, decode.ClockFit.MeanAbsoluteErrorSamples)]
|
||||
? [new MimirChirpBinDelayHypothesis(decode.ClockFit.SourceOffsetSamples, DominantBinShift(decode.Anchors), decode.ClockFit.AnchorCount, decode.ClockFit.Confidence, decode.ClockFit.MeanAbsoluteErrorSamples)]
|
||||
: [];
|
||||
}
|
||||
|
||||
private static int DominantBinShift(IEnumerable<MimirChirpletTimelineAnchor> anchors)
|
||||
{
|
||||
return anchors
|
||||
.Select(anchor =>
|
||||
{
|
||||
var expected = MimirChirpBinTimeline.Default.EventForIndex(anchor.EventIndex).SymbolId;
|
||||
var observed = anchor.Symbols.FirstOrDefault()?.SymbolId ?? expected;
|
||||
var shift = observed - expected;
|
||||
if (shift > MimirChirpBinTimeline.SymbolCount / 2)
|
||||
{
|
||||
shift -= MimirChirpBinTimeline.SymbolCount;
|
||||
}
|
||||
else if (shift < -MimirChirpBinTimeline.SymbolCount / 2)
|
||||
{
|
||||
shift += MimirChirpBinTimeline.SymbolCount;
|
||||
}
|
||||
|
||||
return shift;
|
||||
})
|
||||
.GroupBy(shift => shift)
|
||||
.OrderByDescending(group => group.Count())
|
||||
.ThenBy(group => Math.Abs(group.Key))
|
||||
.Select(group => group.Key)
|
||||
.DefaultIfEmpty(0)
|
||||
.First();
|
||||
}
|
||||
|
||||
private static double CircularMean(IEnumerable<double> radians)
|
||||
{
|
||||
var sin = 0.0;
|
||||
|
|
@ -175,6 +208,8 @@ public sealed record MimirChirpBinCodebookPlan(
|
|||
int RecommendedOrder,
|
||||
IReadOnlyList<int> ReliableSymbolIds)
|
||||
{
|
||||
public bool IsAdaptive => ReliableSymbolIds.Count >= 2 && ReliableSymbolIds.Count < MimirChirpBinTimeline.SymbolCount;
|
||||
|
||||
public static MimirChirpBinCodebookPlan FromSymbols(IReadOnlyList<MimirChirpBinSymbolCalibration> symbols)
|
||||
{
|
||||
var reliable = symbols
|
||||
|
|
@ -192,6 +227,27 @@ public sealed record MimirChirpBinCodebookPlan(
|
|||
|
||||
return new MimirChirpBinCodebookPlan(reliable.Length, order, reliable);
|
||||
}
|
||||
|
||||
public static MimirChirpBinCodebookPlan ForSharedEmission(IReadOnlyList<MimirChirpBinPathCalibration> paths)
|
||||
{
|
||||
var reliable = paths
|
||||
.SelectMany(path => path.CodebookPlan.ReliableSymbolIds)
|
||||
.Distinct()
|
||||
.Order()
|
||||
.ToArray();
|
||||
if (reliable.Length < 2)
|
||||
{
|
||||
return new MimirChirpBinCodebookPlan(MimirChirpBinTimeline.SymbolCount, MimirChirpBinTimeline.TimelineOrder, []);
|
||||
}
|
||||
|
||||
var order = 3;
|
||||
while (Math.Pow(reliable.Length, order) < 120_000.0 && order < 8)
|
||||
{
|
||||
order++;
|
||||
}
|
||||
|
||||
return new MimirChirpBinCodebookPlan(reliable.Length, order, reliable);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed record MimirChirpBinSymbolCalibration(
|
||||
|
|
@ -215,6 +271,7 @@ public sealed record MimirChirpBinConfusionObservation(
|
|||
double TimingResidualSamples,
|
||||
double Confidence,
|
||||
double DelayHypothesisSamples,
|
||||
int BinShift,
|
||||
double PhaseRadians);
|
||||
|
||||
public sealed record MimirChirpBinDelayHypothesis(
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@ internal sealed record ChirpBinScore(
|
|||
double Energy,
|
||||
double PhaseRadians);
|
||||
|
||||
internal sealed record ChirpBinTimelinePlan(
|
||||
int[] Symbols,
|
||||
int Order,
|
||||
int[] TimelineSymbols,
|
||||
Dictionary<string, int> CodeToIndex);
|
||||
|
||||
public sealed class MimirChirpBinTimeline
|
||||
{
|
||||
public const int SampleRate = 48_000;
|
||||
|
|
@ -41,6 +47,7 @@ public sealed class MimirChirpBinTimeline
|
|||
private static readonly Dictionary<int, int> TripleToIndex = BuildTripleIndex(TimelineSymbols);
|
||||
private static readonly MimirChirpBinSymbolDefinition[] Symbols = BuildSymbols();
|
||||
private static readonly ConcurrentDictionary<int, ChirpBinKernelSet> KernelSets = new();
|
||||
private static readonly ConcurrentDictionary<string, ChirpBinTimelinePlan> TimelinePlans = new();
|
||||
|
||||
public static MimirChirpBinTimeline Default { get; } = new();
|
||||
|
||||
|
|
@ -49,11 +56,14 @@ public sealed class MimirChirpBinTimeline
|
|||
public float[] RenderSegmentMonoFloat(ulong segmentIndex)
|
||||
=> RenderSegmentMonoFloat(segmentIndex, SampleRate);
|
||||
|
||||
public float[] RenderSegmentMonoFloat(ulong segmentIndex, int sampleRate)
|
||||
public float[] RenderSegmentMonoFloat(
|
||||
ulong segmentIndex,
|
||||
int sampleRate,
|
||||
MimirChirpBinCodebookPlan? codebookPlan = null)
|
||||
{
|
||||
var segmentStartSeconds = segmentIndex * SegmentSeconds;
|
||||
var samples = new float[(int)Math.Round(SegmentSeconds * sampleRate)];
|
||||
foreach (var timelineEvent in EventsOverlapping(segmentStartSeconds, SegmentSeconds))
|
||||
foreach (var timelineEvent in EventsOverlapping(segmentStartSeconds, SegmentSeconds, codebookPlan))
|
||||
{
|
||||
AddChirp(samples, sampleRate, timelineEvent, segmentStartSeconds);
|
||||
}
|
||||
|
|
@ -101,7 +111,7 @@ public sealed class MimirChirpBinTimeline
|
|||
var observations = new List<MimirChirpBinConfusionObservation>(decode.Frames.Count);
|
||||
foreach (var frame in decode.Frames)
|
||||
{
|
||||
if (!TryExpectedEventForSample(frame.SampleOffset, sampleRate, decode.ClockFit, out var timelineEvent))
|
||||
if (!TryExpectedEventForSample(frame.SampleOffset, sampleRate, decode.ClockFit, null, out var timelineEvent))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -121,6 +131,7 @@ public sealed class MimirChirpBinTimeline
|
|||
frame.SampleOffset - expectedSample,
|
||||
best.Energy,
|
||||
decode.ClockFit.SourceOffsetSamples,
|
||||
SymbolShift(best.SymbolId, timelineEvent.SymbolId),
|
||||
bestBand?.PhaseRadians ?? 0.0));
|
||||
}
|
||||
|
||||
|
|
@ -128,8 +139,13 @@ public sealed class MimirChirpBinTimeline
|
|||
}
|
||||
|
||||
public MimirChirpletTimelineEvent EventForIndex(ulong eventIndex)
|
||||
=> EventForIndex(eventIndex, null);
|
||||
|
||||
public MimirChirpletTimelineEvent EventForIndex(
|
||||
ulong eventIndex,
|
||||
MimirChirpBinCodebookPlan? codebookPlan)
|
||||
{
|
||||
var symbolId = SymbolForEvent(eventIndex);
|
||||
var symbolId = SymbolForEvent(eventIndex, codebookPlan);
|
||||
var startSeconds = EventStartSeconds(eventIndex);
|
||||
var symbol = Symbols[symbolId];
|
||||
return new MimirChirpletTimelineEvent(
|
||||
|
|
@ -144,7 +160,10 @@ public sealed class MimirChirpBinTimeline
|
|||
Gain));
|
||||
}
|
||||
|
||||
public IReadOnlyList<MimirChirpletTimelineEvent> EventsOverlapping(double startSeconds, double durationSeconds)
|
||||
public IReadOnlyList<MimirChirpletTimelineEvent> EventsOverlapping(
|
||||
double startSeconds,
|
||||
double durationSeconds,
|
||||
MimirChirpBinCodebookPlan? codebookPlan = null)
|
||||
{
|
||||
var endSeconds = startSeconds + durationSeconds;
|
||||
var firstIndex = Math.Max(0, (long)Math.Floor((startSeconds - FirstEventSeconds - ChirpDurationSeconds) / EventSpacingSeconds) - 2);
|
||||
|
|
@ -152,7 +171,7 @@ public sealed class MimirChirpBinTimeline
|
|||
var events = new List<MimirChirpletTimelineEvent>((int)(lastIndex - firstIndex + 1));
|
||||
for (var eventIndex = firstIndex; eventIndex <= lastIndex; eventIndex++)
|
||||
{
|
||||
var timelineEvent = EventForIndex((ulong)eventIndex);
|
||||
var timelineEvent = EventForIndex((ulong)eventIndex, codebookPlan);
|
||||
if (timelineEvent.StartSeconds < endSeconds &&
|
||||
timelineEvent.StartSeconds + ChirpDurationSeconds > startSeconds)
|
||||
{
|
||||
|
|
@ -413,60 +432,93 @@ public sealed class MimirChirpBinTimeline
|
|||
int sampleRate,
|
||||
MimirChirpBinPathCalibration? calibration)
|
||||
{
|
||||
if (frames.Count < TimelineOrder)
|
||||
var plan = GetTimelinePlan(calibration?.EmissionPlan);
|
||||
if (frames.Count < plan.Order)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
var candidates = new List<MimirChirpletTimelineAnchor>();
|
||||
for (var index = 0; index <= frames.Count - TimelineOrder; index++)
|
||||
for (var index = 0; index <= frames.Count - plan.Order; index++)
|
||||
{
|
||||
var firstFrame = frames[index];
|
||||
var secondFrame = frames[index + 1];
|
||||
var thirdFrame = frames[index + 2];
|
||||
if (!IsConsecutive(firstFrame, secondFrame, sampleRate) ||
|
||||
!IsConsecutive(secondFrame, thirdFrame, sampleRate))
|
||||
var window = frames.Skip(index).Take(plan.Order).ToArray();
|
||||
var consecutive = true;
|
||||
for (var gap = 0; gap < window.Length - 1; gap++)
|
||||
{
|
||||
if (!IsConsecutive(window[gap], window[gap + 1], sampleRate))
|
||||
{
|
||||
consecutive = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!consecutive)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var first in firstFrame.Candidates)
|
||||
foreach (var second in secondFrame.Candidates)
|
||||
foreach (var third in thirdFrame.Candidates)
|
||||
foreach (var candidatePath in CandidateSymbolPaths(window))
|
||||
{
|
||||
var code = TripleCode(first.SymbolId, second.SymbolId, third.SymbolId);
|
||||
if (!TripleToIndex.TryGetValue(code, out var eventIndex))
|
||||
var code = CodeKey(candidatePath.Select(candidate => candidate.SymbolId));
|
||||
if (!plan.CodeToIndex.TryGetValue(code, out var eventIndex))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var firstEvent = Default.EventForIndex((ulong)eventIndex);
|
||||
var measuredGapA = (second.SampleOffset - first.SampleOffset) / sampleRate;
|
||||
var measuredGapB = (third.SampleOffset - second.SampleOffset) / sampleRate;
|
||||
var gapError = Math.Abs(measuredGapA - EventSpacingSeconds) + Math.Abs(measuredGapB - EventSpacingSeconds);
|
||||
var firstEvent = Default.EventForIndex((ulong)eventIndex, calibration?.EmissionPlan);
|
||||
var gapError = 0.0;
|
||||
for (var gap = 0; gap < candidatePath.Count - 1; gap++)
|
||||
{
|
||||
var measuredGap = (candidatePath[gap + 1].SampleOffset - candidatePath[gap].SampleOffset) / sampleRate;
|
||||
gapError += Math.Abs(measuredGap - EventSpacingSeconds);
|
||||
}
|
||||
|
||||
var gapConfidence = 1.0 / (1.0 + gapError / 0.003);
|
||||
if (gapConfidence < 0.55)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var energyConfidence = Math.Clamp((first.Energy + second.Energy + third.Energy) / 3.0, 0.0, 1.0);
|
||||
var energyConfidence = Math.Clamp(candidatePath.Average(candidate => candidate.Energy), 0.0, 1.0);
|
||||
candidates.Add(new MimirChirpletTimelineAnchor(
|
||||
(ulong)eventIndex,
|
||||
firstEvent.StartSeconds,
|
||||
first.SampleOffset,
|
||||
candidatePath[0].SampleOffset,
|
||||
gapConfidence * 0.60 + energyConfidence * 0.40,
|
||||
[
|
||||
new MimirChirpletSymbolObservation(first.SymbolId, first.SampleOffset, first.Energy),
|
||||
new MimirChirpletSymbolObservation(second.SymbolId, second.SampleOffset, second.Energy),
|
||||
new MimirChirpletSymbolObservation(third.SymbolId, third.SampleOffset, third.Energy),
|
||||
]));
|
||||
candidatePath
|
||||
.Select(candidate => new MimirChirpletSymbolObservation(candidate.SymbolId, candidate.SampleOffset, candidate.Energy))
|
||||
.ToArray()));
|
||||
}
|
||||
}
|
||||
|
||||
return SelectCoherentAnchorPath(candidates, sampleRate, calibration);
|
||||
}
|
||||
|
||||
private static IEnumerable<IReadOnlyList<MimirChirpletSymbolCandidate>> CandidateSymbolPaths(
|
||||
IReadOnlyList<MimirChirpletTransformFrame> frames)
|
||||
{
|
||||
var path = new MimirChirpletSymbolCandidate[frames.Count];
|
||||
IEnumerable<IReadOnlyList<MimirChirpletSymbolCandidate>> Recurse(int index)
|
||||
{
|
||||
if (index == frames.Count)
|
||||
{
|
||||
yield return path.ToArray();
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var candidate in frames[index].Candidates.OrderByDescending(candidate => candidate.Energy).Take(2))
|
||||
{
|
||||
path[index] = candidate;
|
||||
foreach (var child in Recurse(index + 1))
|
||||
{
|
||||
yield return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Recurse(0);
|
||||
}
|
||||
|
||||
private static IReadOnlyList<MimirChirpletTimelineAnchor> SelectCoherentAnchorPath(
|
||||
IReadOnlyList<MimirChirpletTimelineAnchor> candidates,
|
||||
int sampleRate,
|
||||
|
|
@ -768,6 +820,21 @@ public sealed class MimirChirpBinTimeline
|
|||
private static int ShiftSymbol(int symbolId, int shift) =>
|
||||
(symbolId + shift + SymbolCount) % SymbolCount;
|
||||
|
||||
private static int SymbolShift(int observedSymbolId, int expectedSymbolId)
|
||||
{
|
||||
var shift = observedSymbolId - expectedSymbolId;
|
||||
if (shift > SymbolCount / 2)
|
||||
{
|
||||
shift -= SymbolCount;
|
||||
}
|
||||
else if (shift < -SymbolCount / 2)
|
||||
{
|
||||
shift += SymbolCount;
|
||||
}
|
||||
|
||||
return shift;
|
||||
}
|
||||
|
||||
private static double BinShiftSamples(int sampleRate)
|
||||
{
|
||||
var slope = (BaseEndHz - BaseStartHz) / ChirpDurationSeconds;
|
||||
|
|
@ -815,8 +882,11 @@ public sealed class MimirChirpBinTimeline
|
|||
return symbols;
|
||||
}
|
||||
|
||||
private static int SymbolForEvent(ulong eventIndex) =>
|
||||
TimelineSymbols[(int)(eventIndex % (ulong)TimelineSymbols.Length)];
|
||||
private static int SymbolForEvent(ulong eventIndex, MimirChirpBinCodebookPlan? codebookPlan)
|
||||
{
|
||||
var plan = GetTimelinePlan(codebookPlan);
|
||||
return plan.TimelineSymbols[(int)(eventIndex % (ulong)plan.TimelineSymbols.Length)];
|
||||
}
|
||||
|
||||
private static double EventStartSeconds(ulong eventIndex) =>
|
||||
FirstEventSeconds + eventIndex * EventSpacingSeconds;
|
||||
|
|
@ -825,6 +895,7 @@ public sealed class MimirChirpBinTimeline
|
|||
double sampleOffset,
|
||||
int sampleRate,
|
||||
MimirChirpletClockFit clockFit,
|
||||
MimirChirpBinCodebookPlan? codebookPlan,
|
||||
out MimirChirpletTimelineEvent timelineEvent)
|
||||
{
|
||||
var timelineSeconds = (sampleOffset - clockFit.SourceOffsetSamples) / clockFit.EffectiveSampleRate;
|
||||
|
|
@ -835,10 +906,35 @@ public sealed class MimirChirpBinTimeline
|
|||
return false;
|
||||
}
|
||||
|
||||
timelineEvent = Default.EventForIndex((ulong)eventIndex);
|
||||
timelineEvent = Default.EventForIndex((ulong)eventIndex, codebookPlan);
|
||||
return Math.Abs(timelineSeconds - timelineEvent.StartSeconds) <= Math.Max(0.012, 6.0 / sampleRate);
|
||||
}
|
||||
|
||||
private static ChirpBinTimelinePlan GetTimelinePlan(MimirChirpBinCodebookPlan? codebookPlan)
|
||||
{
|
||||
if (codebookPlan is not { IsAdaptive: true })
|
||||
{
|
||||
return TimelinePlans.GetOrAdd("default", _ => new ChirpBinTimelinePlan(
|
||||
Enumerable.Range(0, SymbolCount).ToArray(),
|
||||
TimelineOrder,
|
||||
TimelineSymbols,
|
||||
BuildCodeIndex(TimelineSymbols, TimelineOrder)));
|
||||
}
|
||||
|
||||
var key = $"{codebookPlan.RecommendedOrder}:{string.Join(",", codebookPlan.ReliableSymbolIds)}";
|
||||
return TimelinePlans.GetOrAdd(key, _ =>
|
||||
{
|
||||
var symbols = codebookPlan.ReliableSymbolIds.Distinct().Order().ToArray();
|
||||
var alphabetSequence = RotateToDistinctOpening(BuildDeBruijn(symbols.Length, codebookPlan.RecommendedOrder));
|
||||
var timelineSymbols = alphabetSequence.Select(index => symbols[index]).ToArray();
|
||||
return new ChirpBinTimelinePlan(
|
||||
symbols,
|
||||
codebookPlan.RecommendedOrder,
|
||||
timelineSymbols,
|
||||
BuildCodeIndex(timelineSymbols, codebookPlan.RecommendedOrder));
|
||||
});
|
||||
}
|
||||
|
||||
private static int[] BuildDeBruijn(int alphabetSize, int order)
|
||||
{
|
||||
var a = new int[alphabetSize * order];
|
||||
|
|
@ -908,4 +1004,22 @@ public sealed class MimirChirpBinTimeline
|
|||
|
||||
private static int TripleCode(int first, int second, int third) =>
|
||||
first * SymbolCount * SymbolCount + second * SymbolCount + third;
|
||||
|
||||
private static Dictionary<string, int> BuildCodeIndex(IReadOnlyList<int> symbols, int order)
|
||||
{
|
||||
var map = new Dictionary<string, int>(symbols.Count, StringComparer.Ordinal);
|
||||
for (var index = 0; index < symbols.Count; index++)
|
||||
{
|
||||
var code = CodeKey(Enumerable.Range(0, order).Select(offset => symbols[(index + offset) % symbols.Count]));
|
||||
if (!map.ContainsKey(code))
|
||||
{
|
||||
map[code] = index;
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private static string CodeKey(IEnumerable<int> symbols) =>
|
||||
string.Join(",", symbols);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ public sealed class MimirSynchronizationHub : IDisposable
|
|||
public IReadOnlyList<MimirChirpBinCalibrationProfile> AudioChirpBinCalibrationProfiles =>
|
||||
audioSynchronization.LastCalibrationProfiles;
|
||||
|
||||
public MimirChirpBinCodebookPlan? ChirpBinEmissionPlan =>
|
||||
chirpBinCalibrationModel?.EmissionPlan;
|
||||
|
||||
public void AddSource(IMimirStreamSource source)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(disposed, this);
|
||||
|
|
|
|||
|
|
@ -72,3 +72,4 @@
|
|||
{"ts": "2026-05-23T19:47:34+01:00", "type": "implementation", "status": "ok", "note": "Active chirp-bin decoding now preserves calibration evidence as well as timing: each classified chirp carries the full dechirped 32-bin energy surface, stream decodes aggregate those bins into BandResponses, and sync reports print/expose those per-band response estimates. This makes the chirp stream a timing witness and a frequency-response calibration surface. Verified dotnet build, 192 kHz chirp-only self-test, 500 ms standalone self-test, and Scarlett ASIO loopback artifact with response bands."}
|
||||
{"ts": "2026-05-23T20:03:21+01:00", "type": "implementation", "status": "ok", "note": "Added chirp-bin calibration profiles as the live meatspace response surface. MimirChirpBinCalibrationProfile summarizes per-source frames, anchors, clock confidence, anchor error, usable bins, and strongest measured bands from active chirp-bin decodes. MimirAudioSynchronizationAnalyzer keeps profiles even when timing reports are rejected, and BufferSmoke now prints them for runtime and ASIO artifact analysis. Verified build, 192 kHz chirp-only self-test, 500 ms standalone receiver self-test, Scarlett loopback sync, and physical input calibration evidence from the stored ASIO artifact."}
|
||||
{"ts": "2026-05-23T20:19:36+01:00", "type": "implementation", "status": "ok", "note": "Replaced the profile-only chirp-bin calibration cut with a usable physical calibration model. The model records per-source usable bands, symbol reliability, expected-vs-observed confusion observations, timing residuals, delay hypotheses, phase summaries, and an adaptive codebook plan. MimirChirpBinTimeline can now decode with learned per-symbol weights, group-delay correction, and persisted delay-hypothesis seeds. BufferSmoke can run --calibrate-chirp-bin-asio-f32 to render/capture/analyze/persist the model, and --analyze-asio-f32 can load it via --calibration. The ASIO native worker now supports --emit-json-blocks so Focusrite ASIO callbacks can feed Mimir.Runtime continuously through the existing frame-event adapter while the native ABI cut is still pending."}
|
||||
{"ts": "2026-05-23T20:31:27+01:00", "type": "implementation", "status": "ok", "note": "Completed the physical chirp-bin calibration loop instead of stopping at summaries. The calibration model now owns a shared emission plan from measured reliable symbols, and MimirRuntime renders chirp-bin calibration with that plan so dead bins are removed from the emitted alphabet and sequence order rises as needed. MimirChirpBinTimeline decodes variable-order codewords from the same emission plan, keeps learned response weights/group-delay correction, records bin-shift in confusion/delay hypotheses, and still preserves the default 32-symbol path when no model is loaded. ASIO callback ingestion remains continuous through the ASIO worker's sample-bearing runtime stream path; the next native ABI cut removes process transport overhead, not clock-domain ownership."}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,10 @@ accepted_design:
|
|||
confusion observations, timing residuals, delay hypotheses, phase summaries,
|
||||
and an adaptive codebook plan. The active decoder can consume a persisted
|
||||
model for learned response weighting, first-order group-delay correction,
|
||||
and global delay-hypothesis seeding. The analyzer keeps calibration profiles
|
||||
and global delay-hypothesis seeding. Runtime chirp-bin emission consumes the
|
||||
same model's emission plan, so Mimir can render the measured reliable symbol
|
||||
alphabet at a higher de Bruijn order instead of spending code on dead bins.
|
||||
The analyzer keeps calibration profiles
|
||||
even when a source fails pairwise timing, so physical mic failures can still
|
||||
guide acoustic codebook and response-weighting work. Reports and sync states expose
|
||||
delay in microseconds as well as fractional samples. Hybrid emits it as low-gain half-second
|
||||
|
|
|
|||
Loading…
Reference in a new issue