Last active
August 29, 2015 14:21
-
-
Save nwillems/0a2fa623c8bda7f5464c to your computer and use it in GitHub Desktop.
[JACKAudio] Processing stuffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int process(jack_nframes_t nframes, void *arg){ | |
jack_default_audio_sample_t *out; | |
jack_default_audio_sample_t inp[nframes]; | |
int i =0; | |
out = jack_port_get_buffer(output_port, nframes); | |
for(i =0; i < nframes; i++){ | |
int t = state; | |
//char tmp = (t * (t >> 5 | t >> 8)) >> (t >> 16); | |
int tmp = ((p0 * t)/50) * 5 & ((((p1*t)/50)>>7)| (((p2*t*3)/50)&(t*4>>10))); | |
//int tmp = (state * 5 & state >> 7) | (state * 3 & state >> 10); | |
inp[i] = (tmp / 127.f) -1.0; | |
state++; | |
} | |
//for(i=0; i<nframes; i++) | |
memcpy(out, inp, sizeof(jack_default_audio_sample_t) * nframes); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment