E sharp interface - zerø x

Hello, of coders.

I got a new E sharp string, and would like to play it to interface in my program. The program listens to sounds while the string is plucked.

I’d like to a void the Fourrier Mechanism. But i’d also like an idea of the spectral contents. Besides detecting momentum intensidty, (avg, speed and jolt), I’d like to to get a fuzzy image of the spectral contents.

Since I am performing with a know window, I know I can monitor zero crossings, seems the ideal technique, and from there extrapolate results.

But it’s not yielding the info I am seeking. Anyone had a walk here and care to share some maths, algos? Thank you.

Here is my sample code.

// 	oldtotalzerocrossings = totalzerocrossings;
// 	zerocrossingsraw=0.0f;
// 	totalzerocrossings = 0;

// 	for(int i=0; i < buffersize-1; i+=2){

// 		bool sign0 = dataaudio[i]>=0;
// 		bool sign1 = dataaudio[i+1]>=0;

// 		if( (sign0 && !sign1 ) || (!sign0 && sign1 ) ){
// 			// zerocrossingsraw+=1;
// 			totalzerocrossings++;
// 		}

// 	}

Think Bin


A small disc made of lustrous metal

1 Like

What do you know, Works!
Thanks!