]> _ Git - colon3sampler.git/commitdiff
take notes
authorparking_turkeys <roya1060wien@gmail.com>
Sat, 15 Aug 2026 20:42:15 +0000 (16:42 -0400)
committerparking_turkeys <roya1060wien@gmail.com>
Sat, 15 Aug 2026 20:42:15 +0000 (16:42 -0400)
main.c

diff --git a/main.c b/main.c
index 0c87e46..5e2aed1 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,11 +1,15 @@
 #include <stdio.h>
 #include <math.h>
+#include <windows.h> //temporary
 
 /*
  * colon3sampler: a mediocre sampler for the UTAU singing synthesis program
  *
  * Copyright 2026 parking_turkeys
  *
+ * This file is part of colon3sampler (also written colonthreesampler or
+ * :3sampler).
+ *
  * colon3sampler is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
  * Software Foundation, either version 3 of the License, or (at your option)
  *
  * You should have received a copy of the GNU General Public License along with
  * colon3sampler. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Arguments: (taken from <https://github.com/CdrSonan/ESPER-Utau/>)
+ *
+ * note: not phrased the same it's just the best source i could find lol
+ *
+ * 1: input audio file path
+ * 2: output audio file path
+ * 3: MIDI pitch (eg C4)
+ * 4: Velocity (0 to 127)
+ * 5: Flags
+ * 6: Offset (oto.ini)
+ * 7: Desired output audio length
+ * 8: Consonant length (oto.ini)
+ * 9: Cutoff (oto.ini)
+ * 10: Volume multiplier
+ * 11: Modulation strength (0.0 to 1.0)
+ * 12: Tempo multiplier (eg: "x1.0" for no change)
+ * 13: Pitch bend data (UTAU format)
+ *
+ * OK i think this may be wrong lmao making my own list
+ * 0: FULL path to program
+ * 1: FULL path to input audio file (<teto voice>/<note>.wav)
+ * 2: FULL path to output audio file (test.cache/3_etc_etc_etc.wav)
+ * 3: Midi pitch ("F4")
+ * 4: Velocity (100)
+ * 5: Flags (nothing)
+ * 6: 17.0 (oto[1])
+ * 7: 550 (desired output length ig??)
+ * 8: 238 (oto[2])
+ * 9: 46 (oto[3])
+ * 10: 100 (volume ?)
+ * 11: 0 (modulation ?)
+ * 12: !120 (the tempo)
+ * 13: +0+x+u+q+m+j+h+i+l+r+z+8/G/R/a/k/s/z/5/9//AAAAD(something)+BJBTB(something)+Be(something)/3/N+r+8/N/e/p/t/y/n+p9g8/8/9C9CH(something)+D+R+e+s+5/G
+ * not typing that all skull 
+ * NO idea how they got that ;-;
+ * for one where:
+ * literally nothing
+ * 13: AA#95#AFANAYAmA3BJBc
+ * ??
+ * For one where PBS=-43 and PBW=84
+ * 13 = 9V9k91+l+b+u/B/S/h/u/3/9//
+ *
+ * ok i'd better look at the openutau code LOL
+ * So i dont speak c# but they're doing this to ENCODE it: (from what i can tell. rewritten more C)
+ * const string intToBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" //presumably just a key
+ * (to encode an int "data" with Base64EncodeInt12)
+ * if (data < 0) { data += 4096; } //no idea why this
+ * char[2] base64;
+ * base64[0] = intToBase64[(data >> 6) & 0x003F]; 
+ * //so. it seems this uhh divides data by 2^6 and then &s it with 0x003F haha idk. does this just make sure it's small enough??
+ * base64[1] = intToBase64[data & 0x003F] //is this doing two halves of the number?? OH so uhhhh
+ * // 0x003F is 63 i  think that means it's  0111111 in binary. so it's making sure that only a number from 0 to 63 can be there.
+ * // so this is really just normally turning a number from 0 to 255 into base64. makes sense LOL
+ * // then the thing that's actually used is the "public" one iirc.
+ * // so there is the real code!
+ * it makes a List and adds the Base64 version of each number from data[] into it.
+ * then it turns the list into a string...
+ * by doing ts (C-ified)
+ * char *last = "";
+ * int dups = 0;
+ * (base64 is some string that has any length you want!! woah)
+ * for (int i = 0; i < data_length; i++) {
+ *     if (strcmp(last, l[i]) == 0) { dups++; } //check for duplicates
+ *     else if (dups == 0) { base64.append(l[i]); }
+ *     else { base64.Append('#'); base64.Append(dups); base64.Append('#'); dups = 0; base64.Append(l[i]); };
+ *     last = l[i];
+ * };
+ * if dups != 0 base64.append('#', dups, '#'); //too lazy to type that much LOL :p
+ * return base64.toString
+ *
+ * From this i conclude 1 this should have been a notes file 2 uhh this
+ * it takes the data. then it turns each int into a 2 character string in Base64. Then it sticks those all together with THESE rules:
+ * Just stick the string together BUT
+ * if there's a duplicate dont write it multiple times. Instead, when the string is the same as the last one, increment dups
+ * when the string is different from the duplicated one, add two #s with the amount of duplicates of the string between them.
+ * Then, append the new, /different/, string.
+ *
+ * God why is it so stupidly done???
+ * ok now to find out how to get "data" (technically this should probably be in colon3utau but who cares)
+ * THANK YOU OPENUTAU. time to paste the MIT license in lmao (later)
+ * 
+ * ok so OPENUTAU gets some array called "points" like this: (possibly C-ified)
+ * actualyl fuck this
+ * im writing ts in colon3utau in a TEXT FILE. aa
+ *
+ *
+ */
+
+static int log_args(int argc, char *argv[]);
+int main(int argc, char *argv[])
+{
+       log_args(argc, argv);
+       /*
+       if (argc == 14) {
+               ;
+       } else {
+               printf("Too few arguments");
+               return 1;
+       };
+       */
+       return 0;
+}
+
+static int log_args(int argc, char *argv[])
+{
+       //using windows api because it pauses and stuff...
+       for (int i = 0; i < argc; i++) {
+               MessageBoxA(NULL, argv[i], "Argument to wavtool", MB_OK);
+       };
+};