예제 #1
0
파일: growl.c 프로젝트: andreamazz/AudioKit
void growl_init(sp_data *sp, growl_d *form)
{
    int i;
    for(i = 0; i < 4; i++) {
        sp_reson_init(sp, form->filt[i]);
        form->filt[i]->freq = formants[i];
        form->filt[i]->bw =
            (formants[i] * 0.02) + 50;
    }
    sp_bal_init(sp, form->bal);
    sp_dcblock_init(sp, form->dcblk);
    form->x = 0;
    form->y = 0;
}
예제 #2
0
int main() {
    udata ud;
    sp_data *sp;
    sp_create(&sp);
    sp_srand(sp, 12345);
    sp_noise_create(&ud.ns);
    sp_reson_create(&ud.reson);
    sp_noise_init(sp, ud.ns);
    ud.ns->amp = 1.0;
    sp_reson_init(sp, ud.reson);
    sp->len = 44100 * 5;
    sp_process(sp, &ud, write_noise);
    sp_noise_destroy(&ud.ns);
    sp_reson_destroy(&ud.reson);
    sp_destroy(&sp);
    return 0;
}