]> _ Git - colon3sampler.git/commitdiff
realized i did pitch v wrong so just saying that :p
authorparking_turkeys <roya1060wien@gmail.com>
Tue, 20 Oct 2026 13:16:00 +0000 (09:16 -0400)
committerparking_turkeys <roya1060wien@gmail.com>
Tue, 20 Oct 2026 13:16:00 +0000 (09:16 -0400)
get_pitch.c

index 8ae18a4..71bed29 100644 (file)
@@ -1,8 +1,23 @@
 #include "colon3sampler.h"
 
 static int is_through_zero(int16_t last, int16_t current);
+static float old_get_pitch(int16_t w[], int w_B);
 float get_pitch(int16_t w[], int w_B)
 {
+       return old_get_pitch(w, w_B);
+};
+
+static int is_through_zero(int16_t l, int16_t c)
+{
+       if (c == 0) return 1;
+       if ((c > 0) && (l < 0)) return 1;
+       if ((c < 0) && (l > 0)) return 1;
+       return 0;
+};
+
+static float old_get_pitch(int16_t w[], int w_B)
+{
+       /* this is very wrong lmao */
        /* count the things. */
        int P = 0; int P_i = 0;
        int *Ps = malloc(w_B);
@@ -40,13 +55,4 @@ float get_pitch(int16_t w[], int w_B)
        return frq;
        error:
                return -1;
-
-};
-
-static int is_through_zero(int16_t l, int16_t c)
-{
-       if (c == 0) return 1;
-       if ((c > 0) && (l < 0)) return 1;
-       if ((c < 0) && (l > 0)) return 1;
-       return 0;
 };