From a users standpoint here's my 2 cents.
I have 2 tunes that use Reason's FFT vocoder. In FFT mode it has 32 frequency bands. The carrier input on these tunes are water recordings at 96k and the modulator is drum beats of which samples were recorded at 44.1k. I usually work in 48khz. So being able to work with differen't sample rates and have the audio playing at sample rate of file would be great.
http://sites.google.com/site/chuxlingchaxrazauralarielz/bp1.mp3 http://sites.google.com/site/chuxlingchaxrazauralarielz/bp2.mp3
performance of reason and latency was good enough to record live midi input while vocoding on a 2.2GHz. AMD with 1Gb of ram. I'm not sure of the latency at the time of those recordings but was using pd along with reason. pd was used to retune midi notes with pitchbend. I don't know how they do it but It but would sure like to know. fast convolution is a feature I would love to be able to use in pd.
I remember there were lots of tricks that could be done with graphics and integer math as well as binary bit twidling before math coprocessors were in every machine. Look at fractint.
Example of circle code seems like I optimized this further but can't remember.
///////////////////////////////////////////////////////////////////////// void bcircle(int x0,int y0,int radius,int c) { int x,y; long a, asquared, twoasquared; long b, bsquared, twobsquared; long d, dx, dy; int Aspecty,Aspectx; getaspectratio(&Aspectx,&Aspecty); x=0; y=radius; //a=radius*Aspecty/Aspectx; a=radius*1.33333333; asquared=a*a; twoasquared=2*asquared; b=radius; bsquared=b*b; twobsquared=2*bsquared; d=bsquared-asquared*b+asquared/4L; dx=0; dy=twoasquared*b; while(dx<dy) { if(d>0) { y=y-1; dy=dy-twoasquared; d=d-dy; putpixel(x0+x,y0+y,c); putpixel(x0-x,y0+y,c); putpixel(x0+x,y0-y,c); putpixel(x0-x,y0-y,c); x=x+1; dx=dx+twobsquared; d=d+bsquared+dx; }else{ x=x+1; dx=dx+twobsquared; d=d+bsquared+dx; putpixel(x0+x,y0+y,c); putpixel(x0-x,y0+y,c); putpixel(x0+x,y0-y,c); putpixel(x0-x,y0-y,c); }; }; d=d+(3L*(asquared-bsquared)/2L-(dx+dy))/2L; while(y>0) { if(d<0) { x=x+1; dx=dx+twobsquared; d=d+dx; }; y=y-1; putpixel(x0+x,y0+y,c); putpixel(x0-x,y0+y,c); putpixel(x0+x,y0-y,c); putpixel(x0-x,y0-y,c);
dy=dy-twoasquared;
d=d+asquared-dy;
};
}; /////////////////////////////////////////////////////////////////////////
Could something like this be done with audio to speed up operations?
I just looked and with 512 sample buffer Reason defaults to 15ms latency output at 44.1k and 48k. at 96k it is 9ms output latency.
On Tue, 5 Apr 2011, Billy Stiltner wrote:
I remember there were lots of tricks that could be done with graphics and integer math as well as binary bit twidling before math coprocessors were in every machine. Look at fractint. Example of circle code seems like I optimized this further but can't remember.
Yeah, I remember the Bresenham techniques, but the whole concept of the convolution theorem and the FFT is a lot deeper than that... it's a really deep optimisation.
BTW, the only Bresenham I'm aware of in Pd is [#draw_polygon]. I used it for making stuff like this :
http://gridflow.ca/gallery/koch_polygon_3a.png http://gridflow.ca/gallery/koch_polygon_2d.png http://gridflow.ca/gallery/bezier.png http://gridflow.ca/gallery/supercycloid.mov
etc. see the rest of the koch series on http://gridflow.ca/gallery
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC