Commit 66095b64 authored by ericlyon's avatar ericlyon

first commit

parents
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
/* for compiling under XP */
#ifndef PIOVERTWO
#define PIOVERTWO 1.5707963268
#endif
#ifndef TWOPI
#define TWOPI 6.2831853072
#endif
This diff is collapsed.
#include <math.h>
#include "PenroseOscil.h"
t_float frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength ) {
return (frequency / samplingRate) * (t_float) bufferLength;
}
void makeSineBuffer( t_float *buffer, int bufferLength ) {
int i;
float myTwoPi = 8. * atan(1.);
for ( i=0; i <= bufferLength; i++ )
*(buffer+i) = sin( myTwoPi * ((t_float) i / (t_float) bufferLength) );
return;
}
t_float bufferOscil( t_float *phase, t_float increment, t_float *buffer,
int bufferLength )
{
t_float sample;
while ( *phase > bufferLength )
*phase -= bufferLength;
while ( *phase < 0. )
*phase += bufferLength;
sample = *( buffer + (int) (*phase) );
*phase += increment;
return sample;
}
#include "fftease.h"
t_float frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength );
void makeSineBuffer( t_float *buffer, int bufferLength );
t_float bufferOscil( t_float *phase, t_float increment, t_float *buffer, int bufferLength );
File added
#include "PenroseRand.h"
float rrand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/16384. - 1.);
}
float prand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/32768.);
}
float rrand(int *seed);
float prand(int *seed);
File added
Port Max 6 to Pd
0. add external to Makefile SOURCES
1. change all t_doubles and doubles to t_float
2. change t_pxobject to t_object
3. float x_f;
4. add prototypes for XXX_dsp() & XXX_perform()
5. write XXX-tilde_setup
6. comment out main() function
7. modify new() function:
pd_new() for object_alloc()
outlet_new(&x->x_obj, gensym("signal"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd,gensym("signal"), gensym("signal"));
Make note of z_no_inplace issues
add non-signal outlets *after* signal outlets
add optional arguments
if(argc > 0){ fft->N = (int) atom_getfloatarg(0, argc, argv); }
x->mybang = outlet_new(&x->x_obj, gensym("bang"));
x->m_clock = clock_new(x,(void *)sigseq_tick);
8. modify init()
kill use of obj.z_disabled
9. modify perform() function
deal with pointers
change sysmem_copyptr to memcpy
replace vectorsize with MSPVectorSize
remove inlet-connected conditionals
return w+XXX
10. modify DSP method
11. Remove dsp_free from free function
12. add back any messages from attributes
13. clean up vestigial code
#include "fftease.h" void bloscbank( t_float *S, t_float *O, int D, t_float iD, t_float *lf, t_float *la, t_float *index, t_float *tab, int len, t_float synt, int lo, int hi ) { int amp,freq,chan, i; t_float a,ainc,f,finc,address; for ( chan = lo; chan < hi; chan++ ) { freq = ( amp = ( chan << 1 ) ) + 1; if ( S[amp] > synt ){ finc = ( S[freq] - ( f = lf[chan] ) )* iD; ainc = ( S[amp] - ( a = la[chan] ) )* iD; address = index[chan]; for ( i = 0; i < D ; i++ ) { O[i] += a*tab[ (int) address ]; address += f; while ( address >= len ) address -= len; while ( address < 0 ) address += len; a += ainc; f += finc; } lf[chan] = S[freq]; la[chan] = S[amp]; index[chan] = address; } } }
\ No newline at end of file
File added
#N canvas 1169 280 575 554 10;
#X obj 153 209 bthresher~;
#X obj 29 180 noise~;
#X obj 155 293 *~ 0.05;
#X obj 156 350 dac~;
#X msg 259 335 \; pd dsp \$1;
#X obj 259 304 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 218 242 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 1500 1;
#X floatatom 194 273 5 0 0 0 - - -, f 5;
#X floatatom 258 174 5 0 0 0 - - -, f 5;
#X obj 261 148 hsl 128 15 0.25 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 12700 1;
#X floatatom 182 124 5 0 0 0 - - -, f 5;
#X obj 185 98 hsl 128 15 0.5 1.25 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 12700 1;
#X obj 38 358 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 63 146 r fftz.bthresh.msg;
#X obj 38 525 s fftz.bthresh.msg;
#X msg 39 390 inf_hold 0;
#X text 129 392 broken!;
#X msg 208 405 oscbank \$1;
#X obj 217 374 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X msg 332 403 max_hold 100000;
#X msg 330 493 transpose \$1;
#X floatatom 329 471 5 0 0 0 - - -, f 5;
#X obj 332 445 hsl 128 15 0.25 1.1 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 8100 1;
#X text 415 492 (oscbank only);
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 2 0 3 1;
#X connect 5 0 4 0;
#X connect 6 0 7 0;
#X connect 7 0 2 1;
#X connect 8 0 0 2;
#X connect 9 0 8 0;
#X connect 10 0 0 1;
#X connect 11 0 10 0;
#X connect 12 0 15 0;
#X connect 13 0 0 0;
#X connect 15 0 14 0;
#X connect 17 0 14 0;
#X connect 18 0 17 0;
#X connect 19 0 14 0;
#X connect 20 0 14 0;
#X connect 21 0 20 0;
#X connect 22 0 21 0;
This diff is collapsed.
File added
#N canvas 579 460 937 510 10;
#X obj 246 254 burrow~;
#X obj 246 336 *~ 0.05;
#X obj 246 394 dac~;
#X msg 350 378 \; pd dsp \$1;
#X obj 350 347 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 288 294 hsl 128 15 0 1 0 0 empty empty Gain -2 -8 0 10 -262144
-1 -1 8200 1;
#X floatatom 285 316 5 0 0 0 - - -, f 5;
#X floatatom 436 79 5 -90 0 0 - - -, f 5;
#X obj 424 183 pow;
#X msg 424 154 10;
#X obj 436 103 * 0.05;
#X obj 436 131 t b f;
#X text 430 60 filtering threshold (dB);
#X floatatom 609 82 5 0 0 0 - - -, f 5;
#X obj 597 186 pow;
#X msg 597 157 10;
#X obj 609 106 * 0.05;
#X obj 609 134 t b f;
#X text 603 63 filtering multiplier (dB);
#X msg 63 270 invert \$1;
#X obj 63 237 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 77 100 phasor~ 200;
#X obj 77 129 -~ 0.5;
#X obj 193 101 noise~;
#X obj 235 165 bp~ 600 30;
#X floatatom 270 110 5 0 0 0 - - -, f 5;
#X text 194 77 filtering sound;
#X text 508 233 burrow~ filters the sound in the left input by utlizing
a second signal input as a filter threshold reference. The threshold
controls the extent of the filtering. Threshold inversion is available
via the invert message. Since the spectral shape of the second sound
is *subtracted* from the first \, the normal behavior of burrow~ is
inverse to more familiar filtering. When the "inverse" flag is set
\, the second sound becomes a positive (and perhaps more intuitively
understandable) filter.;
#X msg 63 212 1;
#X obj 63 181 loadbang;
#X obj 320 28 loadbang;
#X msg 320 50 600;
#X obj 797 61 loadbang;
#X msg 797 83 -20;
#X obj 506 12 loadbang;
#X msg 506 34 -45;
#X text 73 78 source sound;
#X msg 112 355 mute \$1;
#X obj 112 328 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 2 1;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 1 1;
#X connect 7 0 10 0;
#X connect 8 0 0 2;
#X connect 9 0 8 0;
#X connect 10 0 11 0;
#X connect 11 0 9 0;
#X connect 11 1 8 1;
#X connect 13 0 16 0;
#X connect 14 0 0 3;
#X connect 15 0 14 0;
#X connect 16 0 17 0;
#X connect 17 0 15 0;
#X connect 17 1 14 1;
#X connect 19 0 0 0;
#X connect 20 0 19 0;
#X connect 21 0 22 0;
#X connect 22 0 0 0;
#X connect 23 0 24 0;
#X connect 24 0 0 1;
#X connect 25 0 24 1;
#X connect 28 0 20 0;
#X connect 29 0 28 0;
#X connect 30 0 31 0;
#X connect 31 0 25 0;
#X connect 32 0 33 0;
#X connect 33 0 13 0;
#X connect 34 0 35 0;
#X connect 35 0 7 0;
#X connect 37 0 0 0;
#X connect 38 0 37 0;
This diff is collapsed.
File added
This diff is collapsed.
File added
#N canvas 979 487 505 383 10;
#X obj 193 107 cavoc~;
#X obj 193 199 *~ 0.05;
#X obj 193 257 dac~;
#X msg 297 241 \; pd dsp \$1;
#X obj 297 210 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 235 157 hsl 128 15 0 1 0 0 empty empty Gain -2 -8 0 10 -262144
-1 -1 200 1;
#X floatatom 232 179 5 0 0 0 - - -, f 5;
#X text 16 323 cavoc~ generates spectra with an 8 rule cellular automaton.
Start with very low gain.;
#X obj 193 75 r fftz.cavoc.msgs;
#N canvas 1230 207 504 565 more-messages 0;
#X obj 74 472 s fftz.cavoc.msgs;
#X msg 70 129 retune 0.5 1.5;
#X msg 273 163 bottomfreq \$1;
#X msg 231 84 topfreq \$1;
#X floatatom 232 49 8 500 8000 0 - - -, f 8;
#X floatatom 271 134 8 0 400 0 - - -, f 8;
#X msg 23 103 mute \$1;
#X obj 23 73 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 99 30 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X msg 99 60 external_trigger \$1;
#X msg 170 163 bang;
#X msg 259 259 hold_time \$1;
#X floatatom 258 230 5 100 1000 0 - - -, f 5;
#X floatatom 328 49 5 0.01 0.25 0 - - -, f 5;
#X msg 328 68 density \$1;
#X msg 270 387 oscbank \$1;
#X obj 278 347 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 326 26 hsl 128 15 0.01 0.2 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 8300 1;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 3 0;
#X connect 5 0 2 0;
#X connect 6 0 0 0;
#X connect 7 0 6 0;
#X connect 8 0 9 0;
#X connect 9 0 0 0;
#X connect 10 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 11 0;
#X connect 13 0 14 0;
#X connect 14 0 0 0;
#X connect 15 0 0 0;
#X connect 16 0 15 0;
#X connect 17 0 13 0;
#X restore 30 247 pd more-messages;
#N canvas 805 281 465 670 rules 0;
#X obj 30 503 s fftz.cavoc.msgs;
#X msg 87 107 rule 0 1 0 1 0 0 1 1;
#X msg 59 79 rule 0 1 1 0 1 0 0 1;
#X msg 122 127 rule 0 0 0 0 1 1 1 1;
#X msg 129 158 rule 0 0 0 1 1 0 0 0;
#X msg 153 215 rule 1 0 0 1 1 0 0 1;
#X msg 180 259 rule 1 1 0 1 0 1 0 0;
#X msg 205 302 rule 1 1 0 1 0 1 1 0;
#X msg 223 342 rule 1 1 0 0 1 1 0 0;
#X msg 233 387 rule 0 0 1 0 1 0 1 1;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X connect 8 0 0 0;
#X connect 9 0 0 0;
#X restore 27 105 pd rules;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 2 1;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 1 1;
#X connect 8 0 0 0;
This diff is collapsed.
File added
This diff is collapsed.
File added
This diff is collapsed.
File added
#include "fftease.h"
/* S is a spectrum in rfft format, i.e., it contains N real values
arranged as real followed by imaginary values, except for first
two values, which are real parts of 0 and Nyquist frequencies;
convert first changes these into N/2+1 PAIRS of magnitude and
phase values to be stored in output array C; the phases are then
unwrapped and successive phase differences are used to compute
estimates of the instantaneous frequencies for each phase vocoder
analysis channel; decimation rate D and sampling rate R are used
to render these frequency values directly in Hz. */
void convert(t_fftease *fft)
{
t_float *buffer = fft->buffer;
t_float *channel = fft->channel;
int N2 = fft->N2;
t_float *lastphase = fft->c_lastphase_in;
t_float fundamental = fft->c_fundamental;
t_float factor = fft->c_factor_in;
t_float phase, phasediff;
int real,imag,amp,freq;
t_float a,b;
int i;
for ( i = 0; i <= N2; i++ ) {
imag = freq = ( real = amp = i<<1 ) + 1;
a = ( i == N2 ? buffer[1] : buffer[real] );
b = ( i == 0 || i == N2 ? 0. : buffer[imag] );
channel[amp] = hypot( a, b );
if ( channel[amp] == 0. )
phasediff = 0.;
else {
phasediff = ( phase = -atan2( b, a ) ) - lastphase[i];
lastphase[i] = phase;
while ( phasediff > PI )
phasediff -= TWOPI;
while ( phasediff < -PI )
phasediff += TWOPI;
}
channel[freq] = phasediff*factor + i*fundamental;
}
}
File added
/* Pd 32-bit FFTease 3.0 */
#include "fftease.h"
static t_class *cross_class;
#define OBJECT_NAME "cross~"
typedef struct _cross
{
t_object x_obj;
float x_f;
t_fftease *fft;
t_fftease *fft2;
t_float threshie;
short thresh_connected;
short mute;//flag
short bypass;
short autonorm;// for self gain regulation
} t_cross;
void *cross_new(t_symbol *s, int argc, t_atom *argv);
t_int *cross_perform(t_int *w);
void cross_dsp(t_cross *x, t_signal **sp);
void *cross_new(t_symbol *s, int argc, t_atom *argv);
void cross_init(t_cross *x);
void cross_fftinfo(t_cross *x);
void cross_mute(t_cross *x, t_floatarg toggle);
void cross_autonorm(t_cross *x, t_floatarg toggle);
void cross_free(t_cross *x);
void cross_tilde_setup(void)
{
t_class *c;
c = class_new(gensym("cross~"), (t_newmethod)cross_new,
(t_method)cross_free,sizeof(t_cross), 0,A_GIMME,0);
CLASS_MAINSIGNALIN(c, t_cross, x_f);
class_addmethod(c,(t_method)cross_dsp,gensym("dsp"),0);
class_addmethod(c,(t_method)cross_mute,gensym("mute"),A_FLOAT,0);
class_addmethod(c,(t_method)cross_fftinfo,gensym("fftinfo"),0);
class_addmethod(c,(t_method)cross_autonorm, gensym("autonorm"), A_DEFFLOAT, 0);
cross_class = c;
fftease_announce(OBJECT_NAME);
}
void cross_autonorm(t_cross *x, t_floatarg toggle)
{
x->autonorm = (short) toggle;
}
void cross_fftsize(t_cross *x, t_floatarg f)
{
x->fft->N = (int) f;
x->fft2->N = (int) f;
cross_init(x);
}
void cross_overlap(t_cross *x, t_floatarg f)
{
x->fft->overlap = (int) f;
x->fft2->overlap = (int) f;
cross_init(x);
}
void cross_winfac(t_cross *x, t_floatarg f)
{
x->fft->winfac = (int) f;
x->fft2->winfac = (int) f;
cross_init(x);
}
void cross_fftinfo( t_cross *x )
{
fftease_fftinfo(x->fft, OBJECT_NAME);
}
void cross_bypass(t_cross *x, t_floatarg toggle)
{
x->bypass = (short)toggle;
}
void cross_mute(t_cross *x, t_floatarg toggle)
{
x->mute = (short)toggle;
}
void cross_free(t_cross *x)
{
fftease_free(x->fft);
fftease_free(x->fft2);
free(x->fft);
free(x->fft2);
}
void *cross_new(t_symbol *s, int argc, t_atom *argv)
{
t_fftease *fft, *fft2;
t_cross *x = (t_cross *)pd_new(cross_class);
inlet_new(&x->x_obj, &x->x_obj.ob_pd,gensym("signal"), gensym("signal"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd,gensym("signal"), gensym("signal"));
outlet_new(&x->x_obj, gensym("signal"));
x->fft = (t_fftease *) calloc(1,sizeof(t_fftease));
x->fft2 = (t_fftease *) calloc(1,sizeof(t_fftease));
fft = x->fft;
fft2 = x->fft2;
fft->initialized = 0;
fft2->initialized = 0;
fft->N = FFTEASE_DEFAULT_FFTSIZE;
fft->overlap = FFTEASE_DEFAULT_OVERLAP;
fft->winfac = FFTEASE_DEFAULT_WINFAC;
fft2->N = FFTEASE_DEFAULT_FFTSIZE;
fft2->overlap = FFTEASE_DEFAULT_OVERLAP;
fft2->winfac = FFTEASE_DEFAULT_WINFAC;
if(argc > 0){ fft->N = fft2->N = (int) atom_getfloatarg(0, argc, argv); }
if(argc > 1){ fft->overlap = fft2->overlap = (int) atom_getfloatarg(1, argc, argv); }
return x;
}
void cross_init(t_cross *x)
{
t_fftease *fft = x->fft;
t_fftease *fft2 = x->fft2;
short initialized;
initialized = fft->initialized;
fftease_init(fft);
fftease_init(fft2);
if(!initialized){
x->threshie = .001 ;
x->autonorm = 0;
x->mute = 0;
}
}
void do_cross(t_cross *x)
{
t_fftease *fft = x->fft;
t_fftease *fft2 = x->fft2;
int i;
int N2 = fft->N2;
t_float a1, b1, a2, b2;
t_float *buffer1 = fft->buffer;
t_float *buffer2 = fft2->buffer;
t_float *channel1 = fft->channel;
short autonorm = x->autonorm;
int N = fft->N;
t_float mult = fft->mult;
int even, odd;
t_float gainer;
t_float threshie = x->threshie;
t_float ingain = 0;
t_float outgain, rescale;
t_float mymult;
fold(fft);
fold(fft2);
rdft(fft,1);
rdft(fft2,1);
/* changing algorithm for window flexibility */
if(autonorm){
ingain = 0;
for(i = 0; i < N; i+=2){
ingain += hypot(buffer1[i], buffer1[i+1]);
}
}
for ( i = 0; i <= N2; i++ ) {
odd = ( even = i<<1 ) + 1;
a1 = ( i == N2 ? *(buffer1+1) : *(buffer1+even) );
b1 = ( i == 0 || i == N2 ? 0. : *(buffer1+odd) );
a2 = ( i == N2 ? *(buffer2+1) : *(buffer2+even) );
b2 = ( i == 0 || i == N2 ? 0. : *(buffer2+odd) );
gainer = hypot(a2, b2);
if( gainer > threshie )
*(channel1+even) = hypot( a1, b1 ) * gainer;
*(channel1+odd) = -atan2( b1, a1 );
*(buffer1+even) = *(channel1+even) * cos( *(channel1+odd) );
if ( i != N2 )
*(buffer1+odd) = -(*(channel1+even)) * sin( *(channel1+odd) );
}
if(autonorm){
outgain = 0;
for(i = 0; i < N; i+=2){
outgain += hypot(buffer1[i], buffer1[i+1]);
}
if(ingain <= .0000001){
// post("gain emergency!");
rescale = 1.0;
} else {
rescale = ingain / outgain;
}
// post("ingain %f outgain %f rescale %f",ingain, outgain, rescale);
mymult = mult * rescale;
} else {
mymult = mult;
}
rdft(fft, -1);
overlapadd(fft);
}
t_int *cross_perform(t_int *w)
{
int i, j;
t_cross *x = (t_cross *) (w[1]);
t_float *MSPInputVector1 = (t_float *)(w[2]);
t_float *MSPInputVector2 = (t_float *)(w[3]);
t_float *threshold = (t_float *)(w[4]);
t_float *MSPOutputVector = (t_float *)(w[5]);
t_fftease *fft = x->fft;
t_fftease *fft2 = x->fft2;
int MSPVectorSize = fft->MSPVectorSize;
int operationRepeat = fft->operationRepeat;
int operationCount = fft->operationCount;
t_float *internalInputVector1 = fft->internalInputVector;
t_float *internalInputVector2 = fft2->internalInputVector;
t_float *internalOutputVector = fft->internalOutputVector;
t_float *inputOne = fft->input;
t_float *inputTwo = fft2->input;
t_float *output = fft->output;
int D = fft->D;
int Nw = fft->Nw;
t_float mult = fft->mult;
if(x->mute){
for(i=0; i < MSPVectorSize; i++){ MSPOutputVector[i] = 0.0; }
return w+6;
}
x->threshie = *threshold;
if( fft->bufferStatus == EQUAL_TO_MSP_VECTOR ){
memcpy(inputOne, inputOne + D, (Nw - D) * sizeof(t_float));
memcpy(inputOne + (Nw - D), MSPInputVector1, D * sizeof(t_float));
memcpy(inputTwo, inputTwo + D, (Nw - D) * sizeof(t_float));
memcpy(inputTwo + (Nw - D), MSPInputVector2, D * sizeof(t_float));
do_cross(x);
for ( j = 0; j < D; j++ ){ *MSPOutputVector++ = output[j] * mult; }
memcpy(output, output + D, (Nw-D) * sizeof(t_float));
for(j = (Nw-D); j < Nw; j++){ output[j] = 0.0; }
}
else if( fft->bufferStatus == SMALLER_THAN_MSP_VECTOR ) {
for( i = 0; i < operationRepeat; i++ ){
memcpy(inputOne, inputOne + D, (Nw - D) * sizeof(t_float));
memcpy(inputOne + (Nw-D), MSPInputVector1 + (D*i), D * sizeof(t_float));
memcpy(inputTwo, inputTwo + D, (Nw - D) * sizeof(t_float));
memcpy(inputTwo + (Nw-D), MSPInputVector2 + (D*i), D * sizeof(t_float));
do_cross(x);
for ( j = 0; j < D; j++ ){ *MSPOutputVector++ = output[j] * mult; }
memcpy(output, output + D, (Nw-D) * sizeof(t_float));
for(j = (Nw-D); j < Nw; j++){ output[j] = 0.0; }
}
}
else if( fft->bufferStatus == BIGGER_THAN_MSP_VECTOR ) {
memcpy(internalInputVector1 + (operationCount * MSPVectorSize), MSPInputVector1, MSPVectorSize * sizeof(t_float));
memcpy(internalInputVector2 + (operationCount * MSPVectorSize), MSPInputVector2, MSPVectorSize * sizeof(t_float));
memcpy(MSPOutputVector, internalOutputVector + (operationCount * MSPVectorSize), MSPVectorSize * sizeof(t_float));
operationCount = (operationCount + 1) % operationRepeat;
if( operationCount == 0 ) {