Convolution Code Example

People who use hrtflib often don’t have a background in audio programming, and so they ask me what to do with the output of that library. The answer is convolution. There is tons of information on the net about it, and there is lots of cover on it but I wanted to put up a simple code sample in C, to show how convolution works. Here it is:

void Convolve(const float* const input,
	      unsigned int inputLength,
	      const float* const filter,
	      unsigned int filterLength,
	      float* output)
{
	unsigned int i;
	unsigned int j;
	unsigned int lengthOfOutput = inputLength
				    + filterLength - 1;
 
	for(i = 0; i < lengthOfOutput; ++i)
	{
		output[i] = 0.f;
	}
 
	for(i = 0; i < inputLength; ++i)
	{
		for(j = 0; j < filterLength; ++j)
		{
			output[i + j] += input[i] * filter[j];
		}
	}
}
Posted in Audio, DSP, Programming | 2 Comments

Killzone 3 Helghast Edition Unboxing

I am a massive Killzone fan, and guess what arrived today! The Helghast edition of the latest instalment! Here are some photos of what is in it!

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

Killzone 3 Helghast Edition

 

 

Posted in Gaming | Tagged , | Leave a comment

“Brand new”

This is a move from having a custom site to using WordPress based site. It will take a while to move the old website to the new one, but at least it is up!

Posted in Uncategorized | Leave a comment