int main(int argc, char **argv){ track_t *t = trackRead("samples/test-guitare-raw.raw"); /* fun_t *env = note(0,10,700,500,2000,1,0.2); fun_t *f = add( cool_sound(c(880),env,0,0.5), add( cool_sound(c(140),env,500,1), add( cool_sound(c(130),env,1000,1), add( cool_sound(c(110),env,1500,1), add( cool_sound(c(130),env,2000,1), add( cool_sound(c(440),env,2500,1), add( cool_sound(c(130),env,3000,1), add( cool_sound(c(110),env,3500,1), c(0) )))))))); */ //fun_t *f2 = add(c(0.5), square(c(5),c(0.5),0,0.5)); //f = sine(c(440.0),0.0,0.5); //trackAdd(t,f,f); //trackMult(t,c(0.2),c(0.2)); //fx_reverb(t); fx_echo(t,c(500),c(0.2),3); fx_cutoff(t,c(0.09),c(0.2),WAVE_BOTH); //trackMult(t,f2,f2); //fx_echo(t,c(500),c(0.3),4); fx_flange(t,sine(c(0.2),0,500)); //void fx_echo(track_t *t, fun_t *delay, fun_t *amp, int count); //void fx_power_dist(track_t*t, fun_t *gain, fun_t*clip, fun_t *power, // int wave); //fx_disto(t,WAVE_BOTH); initAudio(); //trackPlay(t); trackWrite(t,"test01.wav"); return 1; }
char *play(t_platine *p) { char *str; if (p->cmd[p->index][0] == '#') str = strdup("shrrrck"); else str = remove_cut(strdup(p->cmd[p->index])); if (p->lowpass == 1) str = filter_lowpass(str); if (p->highpass == 1) str = filter_highpass(str); if (p->doubl == 1) str = fx_double(str); if (p->flanger == 1) str = flanger(str); if (p->echo == 1) str = fx_echo(str); reset_all_fx(p); if (p->reversed == 1) return (revstr(str)); return (str); }