Skip to content

Instantly share code, notes, and snippets.

View PabRod's full-sized avatar

Pablo Rodríguez-Sánchez PabRod

View GitHub Profile
@PabRod
PabRod / chirp.m
Created April 19, 2016 14:25 — forked from Enchufa2/chirp.m
Simulation of the chirp echo created in the staircases of Mesoamerican pyramids
clap = audioread('clap.wav');
fs = 96e3; % sampling frequency
N = 40; % steps
ssize = 0.15; % step size
delay = ssize * 2 / 340;
samples = round(delay * fs);
stairs = zeros(samples * N + length(clap) + N, N);
for i = 1:N
samples = samples + 1;
indexes = (i-1)*samples+1 : length(clap)+(i-1)*samples;