Fortran · 466 bytes Raw Blame History
1 module convolution_reverb_mod
2 implicit none
3 contains
4
5 subroutine conv_reverb(input, ir, output, n, ir_len)
6 integer, intent(in) :: n, ir_len
7 real(8), intent(in) :: input(n), ir(ir_len)
8 real(8), intent(out) :: output(n+ir_len-1)
9 integer :: i, j
10
11 output = 0.0
12 do i = 1, n
13 do j = 1, ir_len
14 output(i+j-1) = output(i+j-1) + input(i) * ir(j)
15 end do
16 end do
17 end subroutine conv_reverb
18
19 end module convolution_reverb_mod