Chains - a Sunday afternoon math riddle

^ cool.

Easter things coming up, will be able to contribute after that…

okay then!

I’ve just added my varichain algorithm to the repo (+testcase and gcc makefile).

The output looks like this:


$ ./libsamplechain_test.exe
[trc] STA=  0.00 origSz=     16980 padSz=    2844 chSz=     19824 stepSz=1239
[trc] STA= 16.00 origSz=      5878 padSz=    2795 chSz=      8673 stepSz=1239
[trc] STA= 23.00 origSz=     19156 padSz=    3146 chSz=     22302 stepSz=1239
[trc] STA= 41.00 origSz=     17850 padSz=    3213 chSz=     21063 stepSz=1239
[trc] STA= 58.00 origSz=      2395 padSz=    2561 chSz=      4956 stepSz=1239
[trc] STA= 62.00 origSz=      6531 padSz=    2142 chSz=      8673 stepSz=1239
[trc] STA= 69.00 origSz=      7401 padSz=    2511 chSz=      9912 stepSz=1239
[trc] STA= 77.00 origSz=      7619 padSz=    2293 chSz=      9912 stepSz=1239
[trc] STA= 85.00 origSz=     16980 padSz=    2844 chSz=     19824 stepSz=1239
[trc] STA=101.00 origSz=     21551 padSz=    3229 chSz=     24780 stepSz=1239
[trc] STA=121.00 origSz=      2830 padSz=    2126 chSz=      4956 stepSz=1239
[...] newTotalSmpSz=154875
[...] newNumSlices=125.000000 int=125
[...] newSlcSz=1290.625000 int=1291
[trc] STA=  0.00 origSz=     16980 padSz=    2385 chSz=     19365 stepSz=1291
[trc] STA= 15.00 origSz=      5878 padSz=    1868 chSz=      7746 stepSz=1291
[trc] STA= 21.00 origSz=     19156 padSz=    2791 chSz=     21947 stepSz=1291
[trc] STA= 38.00 origSz=     17850 padSz=    2806 chSz=     20656 stepSz=1291
[trc] STA= 54.00 origSz=      2395 padSz=    1478 chSz=      3873 stepSz=1291
[trc] STA= 57.00 origSz=      6531 padSz=    1215 chSz=      7746 stepSz=1291
[trc] STA= 63.00 origSz=      7401 padSz=    1636 chSz=      9037 stepSz=1291
[trc] STA= 70.00 origSz=      7619 padSz=    1418 chSz=      9037 stepSz=1291
[trc] STA= 77.00 origSz=     16980 padSz=    2385 chSz=     19365 stepSz=1291
[trc] STA= 92.00 origSz=     21551 padSz=    2978 chSz=     24529 stepSz=1291
[trc] STA=111.00 origSz=      2830 padSz=    1043 chSz=      3873 stepSz=1291
[...] padNewNumSlices=114.000000 int=114
[...] finalNumSlices=120.000000 int=120
[...] origTotalSmpSz=125171
[...] total padding:29749 ratio to unpadded orig=123.766687%
[...] ratio to padded orig=105.265304%
[...] avg slice padding=2479.083333
[...] totalSmpSz=154920  /120=1291.000000
[...] (309840 bytes)
[dbg] num iterations=1
total samplechain size is 154920 sample frames

You should be able to build on that.

Would be cool if you added yours, too!