Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ft2-clone for openSUSE:Factory checked in at 2025-12-08 11:54:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ft2-clone (Old) and /work/SRC/openSUSE:Factory/.ft2-clone.new.1939 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ft2-clone" Mon Dec 8 11:54:05 2025 rev:28 rq:1321338 version:2.01 Changes: -------- --- /work/SRC/openSUSE:Factory/ft2-clone/ft2-clone.changes 2025-11-24 14:12:58.534824540 +0100 +++ /work/SRC/openSUSE:Factory/.ft2-clone.new.1939/ft2-clone.changes 2025-12-08 11:55:12.616644717 +0100 @@ -1,0 +2,7 @@ +Fri Dec 5 13:31:37 UTC 2025 - Martin Hauke <[email protected]> + +- Update to version 2.01 + * Reverted interpolation LUT size (phases) and calculation to + that of v1.99 + +------------------------------------------------------------------- Old: ---- ft2-clone-2.00.tar.gz New: ---- ft2-clone-2.01.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ft2-clone.spec ++++++ --- /var/tmp/diff_new_pack.meqh6W/_old 2025-12-08 11:55:13.772693149 +0100 +++ /var/tmp/diff_new_pack.meqh6W/_new 2025-12-08 11:55:13.776693317 +0100 @@ -17,7 +17,7 @@ Name: ft2-clone -Version: 2.00 +Version: 2.01 Release: 0 Summary: Fasttracker II clone License: BSD-3-Clause AND CC-BY-NC-SA-4.0 ++++++ ft2-clone-2.00.tar.gz -> ft2-clone-2.01.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/CMakeLists.txt new/ft2-clone-2.01/CMakeLists.txt --- old/ft2-clone-2.00/CMakeLists.txt 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/CMakeLists.txt 2025-12-05 14:00:47.000000000 +0100 @@ -7,6 +7,11 @@ find_package(SDL2 REQUIRED) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${ft2-clone_SOURCE_DIR}/release/other/") +if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU")) + add_compile_options(-O3) + add_compile_options(-ffast-math) +endif() + file(GLOB ft2-clone_SRC "${ft2-clone_SOURCE_DIR}/src/rtmidi/*.cpp" "${ft2-clone_SOURCE_DIR}/src/*.c" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/ft2_header.h new/ft2-clone-2.01/src/ft2_header.h --- old/ft2-clone-2.00/src/ft2_header.h 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/ft2_header.h 2025-12-05 14:00:47.000000000 +0100 @@ -12,7 +12,7 @@ #endif #include "ft2_replayer.h" -#define PROG_VER_STR "2.00" +#define PROG_VER_STR "2.01" // do NOT change these! It will only mess things up... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_cubic_spline.c new/ft2-clone-2.01/src/mixer/ft2_cubic_spline.c --- old/ft2-clone-2.00/src/mixer/ft2_cubic_spline.c 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_cubic_spline.c 2025-12-05 14:00:47.000000000 +0100 @@ -20,19 +20,19 @@ float *fPtr = fCubicSplineLUT; for (int32_t i = 0; i < CUBIC_SPLINE_PHASES; i++) { - const float x1 = (float)i * (1.0f / CUBIC_SPLINE_PHASES); - const float x2 = x1 * x1; // x^2 - const float x3 = x2 * x1; // x^3 - - const float t1 = (x1 * -0.5f) + (x2 * 1.0f) + (x3 * -0.5f); - const float t2 = (x2 * -2.5f) + (x3 * 1.5f) + 1.0f; - const float t3 = (x1 * 0.5f) + (x2 * 2.0f) + (x3 * -1.5f); - const float t4 = (x2 * -0.5f) + (x3 * 0.5f); - - *fPtr++ = t1; // tap #1 at sample offset -1 - *fPtr++ = t2; // tap #2 at sample offset 0 (center) - *fPtr++ = t3; // tap #3 at sample offset 1 - *fPtr++ = t4; // tap #4 at sample offset 2 + const double x1 = i * (1.0 / CUBIC_SPLINE_PHASES); + const double x2 = x1 * x1; // x^2 + const double x3 = x2 * x1; // x^3 + + const double t1 = (x1 * -0.5) + (x2 * 1.0) + (x3 * -0.5); + const double t2 = (x2 * -2.5) + (x3 * 1.5) + 1.0; + const double t3 = (x1 * 0.5) + (x2 * 2.0) + (x3 * -1.5); + const double t4 = (x2 * -0.5) + (x3 * 0.5); + + *fPtr++ = (float)t1; // tap #1 at sample offset -1 + *fPtr++ = (float)t2; // tap #2 at sample offset 0 (center) + *fPtr++ = (float)t3; // tap #3 at sample offset 1 + *fPtr++ = (float)t4; // tap #4 at sample offset 2 } /* @@ -43,23 +43,23 @@ /* for (int32_t i = 0; i < CUBIC_SPLINE_PHASES; i++) { - const float x1 = i * (1.0f / CUBIC_SPLINE_PHASES); - const float x2 = x1 * x1; // x^2 - const float x3 = x2 * x1; // x^3 - - const float t1 = (x1 * (1.0f/12.0f)) + (x2 * -(1.0f/ 6.0f)) + (x3 * (1.0f/12.0f)); - const float t2 = (x1 * -(2.0f/ 3.0f)) + (x2 * (5.0f/ 4.0f)) + (x3 * -(7.0f/12.0f)); - const float t3 = (x2 * -(7.0f/ 3.0f)) + (x3 * (4.0f/ 3.0f)) + 1.0f; - const float t4 = (x1 * (2.0f/ 3.0f)) + (x2 * (5.0f/ 3.0f)) + (x3 * -(4.0f/ 3.0f)); - const float t5 = (x1 * -(1.0f/12.0f)) + (x2 * -(1.0f/ 2.0f)) + (x3 * (7.0f/12.0f)); - const float t6 = (x2 * (1.0f/12.0f)) + (x3 * -(1.0f/12.0f)); - - *fPtr++ = t1; // tap #1 at sample offset -2 - *fPtr++ = t2; // tap #2 at sample offset -1 - *fPtr++ = t3; // tap #3 at sample offset 0 (center) - *fPtr++ = t4; // tap #4 at sample offset 1 - *fPtr++ = t5; // tap #5 at sample offset 2 - *fPtr++ = t6; // tap #6 at sample offset 3 + const double x1 = i * (1.0 / CUBIC_SPLINE_PHASES); + const double x2 = x1 * x1; // x^2 + const double x3 = x2 * x1; // x^3 + + const double t1 = (x1 * (1.0/12.0)) + (x2 * -(1.0/ 6.0)) + (x3 * (1.0/12.0)); + const double t2 = (x1 * -(2.0/ 3.0)) + (x2 * (5.0/ 4.0)) + (x3 * -(7.0/12.0)); + const double t3 = (x2 * -(7.0/ 3.0)) + (x3 * (4.0/ 3.0)) + 1.0; + const double t4 = (x1 * (2.0/ 3.0)) + (x2 * (5.0/ 3.0)) + (x3 * -(4.0/ 3.0)); + const double t5 = (x1 * -(1.0/12.0)) + (x2 * -(1.0/ 2.0)) + (x3 * (7.0/12.0)); + const double t6 = (x2 * (1.0/12.0)) + (x3 * -(1.0/12.0)); + + *fPtr++ = (float)t1; // tap #1 at sample offset -2 + *fPtr++ = (float)t2; // tap #2 at sample offset -1 + *fPtr++ = (float)t3; // tap #3 at sample offset 0 (center) + *fPtr++ = (float)t4; // tap #4 at sample offset 1 + *fPtr++ = (float)t5; // tap #5 at sample offset 2 + *fPtr++ = (float)t6; // tap #6 at sample offset 3 } */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_cubic_spline.h new/ft2-clone-2.01/src/mixer/ft2_cubic_spline.h --- old/ft2-clone-2.00/src/mixer/ft2_cubic_spline.h 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_cubic_spline.h 2025-12-05 14:00:47.000000000 +0100 @@ -6,8 +6,8 @@ #define CUBIC_SPLINE_WIDTH 4 #define CUBIC_SPLINE_WIDTH_BITS 2 /* log2(CUBIC_SPLINE_WIDTH) */ -#define CUBIC_SPLINE_PHASES 4096 -#define CUBIC_SPLINE_PHASES_BITS 12 /* log2(CUBIC_SPLINE_PHASES) */ +#define CUBIC_SPLINE_PHASES 8192 +#define CUBIC_SPLINE_PHASES_BITS 13 /* log2(CUBIC_SPLINE_PHASES) */ #define CUBIC_SPLINE_FRACSHIFT (MIXER_FRAC_BITS-(CUBIC_SPLINE_PHASES_BITS+CUBIC_SPLINE_WIDTH_BITS)) #define CUBIC_SPLINE_FRACMASK ((CUBIC_SPLINE_WIDTH*CUBIC_SPLINE_PHASES)-CUBIC_SPLINE_WIDTH) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_quadratic_spline.c new/ft2-clone-2.01/src/mixer/ft2_quadratic_spline.c --- old/ft2-clone-2.00/src/mixer/ft2_quadratic_spline.c 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_quadratic_spline.c 2025-12-05 14:00:47.000000000 +0100 @@ -20,16 +20,16 @@ float *fPtr = fQuadraticSplineLUT; for (int32_t i = 0; i < QUADRATIC_SPLINE_PHASES; i++) { - const float x1 = (float)i * (1.0f / QUADRATIC_SPLINE_PHASES); - const float x2 = x1 * x1; // x^2 + const double x1 = i * (1.0 / QUADRATIC_SPLINE_PHASES); + const double x2 = x1 * x1; // x^2 - const float t1 = (x1 * -1.5f) + (x2 * 0.5f) + 1.0f; - const float t2 = (x1 * 2.0f) + (x2 * -1.0f); - const float t3 = (x1 * -0.5f) + (x2 * 0.5f); + const double t1 = (x1 * -1.5) + (x2 * 0.5) + 1.0; + const double t2 = (x1 * 2.0) + (x2 * -1.0); + const double t3 = (x1 * -0.5) + (x2 * 0.5); - *fPtr++ = t1; // tap #1 at sample offset 0 (center) - *fPtr++ = t2; // tap #2 at sample offset 1 - *fPtr++ = t3; // tap #3 at sample offset 2 + *fPtr++ = (float)t1; // tap #1 at sample offset 0 (center) + *fPtr++ = (float)t2; // tap #2 at sample offset 1 + *fPtr++ = (float)t3; // tap #3 at sample offset 2 } return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_quadratic_spline.h new/ft2-clone-2.01/src/mixer/ft2_quadratic_spline.h --- old/ft2-clone-2.00/src/mixer/ft2_quadratic_spline.h 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_quadratic_spline.h 2025-12-05 14:00:47.000000000 +0100 @@ -5,8 +5,8 @@ #include "ft2_mix.h" // MIXER_FRAC_BITS #define QUADRATIC_SPLINE_WIDTH 3 -#define QUADRATIC_SPLINE_PHASES 4096 -#define QUADRATIC_SPLINE_PHASES_BITS 12 /* log2(QUADRATIC_SPLINE_PHASES) */ +#define QUADRATIC_SPLINE_PHASES 8192 +#define QUADRATIC_SPLINE_PHASES_BITS 13 /* log2(QUADRATIC_SPLINE_PHASES) */ #define QUADRATIC_SPLINE_FRACSHIFT (MIXER_FRAC_BITS-QUADRATIC_SPLINE_PHASES_BITS) extern float *fQuadraticSplineLUT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_windowed_sinc.c new/ft2-clone-2.01/src/mixer/ft2_windowed_sinc.c --- old/ft2-clone-2.00/src/mixer/ft2_windowed_sinc.c 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_windowed_sinc.c 2025-12-05 14:00:47.000000000 +0100 @@ -10,7 +10,7 @@ typedef struct { - float kaiserBeta, sincCutoff; + double kaiserBeta, sincCutoff; } sincKernel_t; // globalized @@ -22,76 +22,72 @@ /* Some notes on the Kaiser-Bessel beta parameter: ** Lower beta = less treble cut off, more aliasing (narrower mainlobe, stronger sidelobe) ** Higher beta = more treble cut off, less aliasing (wider mainlobe, weaker sidelobe) - ** - ** The 8-point kernel should not have a beta lower than around 9.2, as it results - ** in audible ringing at very low resampling ratios (well below 1.0, that is). */ - { // -- settings for 8-point sinc -- // beta, cutoff - { 9.2f, 1.000f }, // kernel #1 - { 8.5f, 0.750f }, // kernel #2 - { 7.3f, 0.425f } // kernel #3 + { 9.20, 1.000 }, // kernel #1 (beta < ~9.2 leads to audible aliasing here) + { 8.50, 0.750 }, // kernel #2 + { 7.30, 0.425 } // kernel #3 }, { // -- settings for 16-point sinc -- // beta, cutoff - { 8.6f, 1.000f }, // kernel #1 - { 8.5f, 0.750f }, // kernel #2 - { 7.3f, 0.425f } // kernel #3 + { 8.61, 1.000 }, // kernel #1 (beta 8.61 = Blackman-window approximation) + { 8.50, 0.750 }, // kernel #2 + { 7.30, 0.425 } // kernel #3 } }; // zeroth-order modified Bessel function of the first kind (series approximation) -static inline float besselI0(float z) +static inline double besselI0(double z) { - float s = 1.0f, ds = 1.0f, d = 2.0f; - const float zz = z * z; + double s = 1.0, ds = 1.0, d = 2.0; + const double zz = z * z; do { ds *= zz / (d * d); s += ds; - d += 2.0f; + d += 2.0; } - while (ds > s*(1E-7f)); + while (ds > s*(1E-12)); return s; } -static inline float sinc(float x, const float cutoff) +static inline double sinc(double x, double cutoff) { - if (x == 0.0f) + if (x == 0.0) { return cutoff; } else { - x *= (float)PI; - return sinf(cutoff * x) / x; + x *= PI; + return sin(cutoff * x) / x; } } -// note: numPoints must be 2^n! -static void makeSincKernel(float *out, int32_t numPoints, int32_t numPhases, float beta, float cutoff) +// note: numPoints/numPhases must be 2^n! +static void makeSincKernel(float *out, int32_t numPoints, int32_t numPhases, double beta, double cutoff) { const int32_t kernelLen = numPhases * numPoints; const int32_t pointBits = (int32_t)log2(numPoints); const int32_t pointMask = numPoints - 1; const int32_t centerPoint = (numPoints / 2) - 1; - const float besselI0Beta = 1.0f / besselI0(beta); - const float phaseMul = 1.0f / numPhases; - const float xMul = 1.0f / (numPoints / 2); + const double besselI0Beta = 1.0 / besselI0(beta); + const double phaseMul = 1.0 / numPhases; + const double xMul = 1.0 / (numPoints / 2); for (int32_t i = 0; i < kernelLen; i++) { - const float x = (float)((i & pointMask) - centerPoint) - ((float)(i >> pointBits) * phaseMul); + const double x = ((i & pointMask) - centerPoint) - ((i >> pointBits) * phaseMul); // Kaiser-Bessel window - const float n = x * xMul; - const float window = besselI0(beta * sqrtf(1.0f - n * n)) * besselI0Beta; + const double n = x * xMul; + const double window = besselI0(beta * sqrt(1.0 - n * n)) * besselI0Beta; - out[i] = sinc(x, cutoff) * window; + out[i] = (float)(sinc(x, cutoff) * window); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/mixer/ft2_windowed_sinc.h new/ft2-clone-2.01/src/mixer/ft2_windowed_sinc.h --- old/ft2-clone-2.00/src/mixer/ft2_windowed_sinc.h 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/mixer/ft2_windowed_sinc.h 2025-12-05 14:00:47.000000000 +0100 @@ -5,8 +5,8 @@ #include "ft2_mix.h" // MIXER_FRAC_BITS #define SINC_KERNELS 3 -#define SINC_PHASES 4096 -#define SINC_PHASES_BITS 12 /* log2(SINC_PHASES) */ +#define SINC_PHASES 8192 +#define SINC_PHASES_BITS 13 /* log2(SINC_PHASES) */ #define SINC8_WIDTH_BITS 3 /* log2(8) */ #define SINC8_FRACSHIFT (MIXER_FRAC_BITS-(SINC_PHASES_BITS+SINC8_WIDTH_BITS)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ft2-clone-2.00/src/scopes/ft2_scopedraw.c new/ft2-clone-2.01/src/scopes/ft2_scopedraw.c --- old/ft2-clone-2.00/src/scopes/ft2_scopedraw.c 2025-11-21 22:49:27.000000000 +0100 +++ new/ft2-clone-2.01/src/scopes/ft2_scopedraw.c 2025-12-05 14:00:47.000000000 +0100 @@ -31,7 +31,7 @@ int16_t *ptr16 = scopeIntrpLUT; for (int32_t i = 0; i < SCOPE_INTRP_PHASES; i++) { - const float x1 = i * (1.0f / SCOPE_INTRP_PHASES); + const float x1 = (float)i * (1.0f / SCOPE_INTRP_PHASES); const float x2 = x1 * x1; // x^2 const float x3 = x2 * x1; // x^3 @@ -40,7 +40,7 @@ const float t3 = (x1 * (1.0f/2.0f)) + (x2 * (1.0f/2.0f)) + (x3 * -(1.0f/2.0f)) + (1.0f/6.0f); const float t4 = x3 * (1.0f/6.0f); - // truncate, do not round! + // note: truncate, do not round! *ptr16++ = (int16_t)(t1 * SCOPE_INTRP_SCALE); // tap #1 at sample offset -1 *ptr16++ = (int16_t)(t2 * SCOPE_INTRP_SCALE); // tap #2 at sample offset 0 (center) *ptr16++ = (int16_t)(t3 * SCOPE_INTRP_SCALE); // tap #3 at sample offset 1
