$(CC) *.h *.c -Werror -Wall -Wno-unused-label -lm -o colon3sampler -std=c99
linux-test: linux
@echo "testing the thing with an UTAU + oto stuff"
- ./colon3sampler test/a.wav test/a_out.wav F4 100 / 24.0 550 56 73 100 0 !120
+ ./colon3sampler test/a.wav test/a_out.wav F4 100 / 24.0 21000 56 73 100 0 !120
@echo "testing the thing with teto singing A on C4 (switch to G4)"
@echo "./colon3sampler test/test.wav test/test_out.wav G4 100 / 0.0 550 2 2 100 0 !120"
@echo "it doesnt work btw but i frogor how to do comments"
int change_wave_len(int16_t w[], int w_B, int16_t ow[], int co, int ow_B)
{
+ if (w_B == ow_B) return 0;
int end_samples = (w_B/2) - co;
+ int half_samples = co/2;
int i = 0;
+anfang:
+ for (i = 0; (i < half_samples) && (i < ow_B/2-end_samples); i++) {
+ ow[i] = w[i];
+ };
if (w_B < ow_B) goto loop_co;
if (w_B > ow_B) goto cut_wave;
- return 0;
loop_co:
int co_i = 0;
- for (i = 0; i < (ow_B/2-end_samples); i++) {
+ for (i = i; i < (ow_B/2-end_samples); i++) {
ow[i] = w[co_i++];
- if (co_i == co) co_i = 0;
+ if (co_i == co) co_i = half_samples;
};
goto append_end;
cut_wave:
if (end_samples >= (ow_B/2)) goto append_end;
- for (i = 0; i < (ow_B/2-end_samples); i++) {
+ for (i = i; i < (ow_B/2-end_samples); i++) {
ow[i] = w[i];
};
goto append_end;