ftp.nice.ch/pub/next/unix/audio/Cmix.N.s.tar.gz#/cmix/sys/gen10.c

This is gen10.c in view mode; [Download] [Up]

#include "../H/ugens.h"

gen10(gen)
register struct gen *gen;
{
	int i,j;
	double sin();
	for(i = 0; i<gen->size; i++) gen->array[i] = 0;
	j=gen->nargs;
	while(j--) {
		if(gen->pvals[j] != 0) {
			for(i=0; i<gen->size; i++) {
				gen->array[i]+=sin((double)(PI2*(float)i/
				(gen->size/(j+1))))*gen->pvals[j];
			}
		}
	}
	fnscl(gen);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.