Skip to content

Instantly share code, notes, and snippets.

View a2800276's full-sized avatar

Tim Becker a2800276

  • Press Every Key
  • Germany
View GitHub Profile
@rejuvyesh
rejuvyesh / gcc-phat.m
Last active November 26, 2021 15:17
gcc phat algo
for i = 1:3
tau(i) = gcc_phat(x{i}(1,:), x{i}(2,:))
end
function tau = gcc_phat(sig1, sig2)
% Find FFT for the signals
fft1 = fft(sig1, fftSize(sig1));
fft2 = fft(sig2, fftSize(sig2));
% Find R(\Tau)
G12 = fft1.*conj(fft2);
@jbenet
jbenet / current_utc_time.c
Created July 17, 2011 16:17
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@endolith
endolith / A_weighting.py
Last active September 14, 2024 01:28
A-weighting audio files in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Translated from a MATLAB script (which also includes C-weighting, octave
and one-third-octave digital filters).
Author: Christophe Couvreur, Faculte Polytechnique de Mons (Belgium)
[email protected]
Last modification: Aug. 20, 1997, 10:00am.
BSD license