#! /usr/bin/env python
# -*- coding: utf-8 -*-

import hark
import numpy

nch   = 8
freqs = numpy.logspace(0, 3, endpoint=False, num=nch+1, base=2)[:nch] * 440
phase = numpy.arange(16000) * freqs[:, None] / 16000 * 2 * numpy.pi
audio = numpy.sin(phase).astype(numpy.float32)

# reframing
input = numpy.lib.stride_tricks.sliding_window_view(audio, (nch, 512))[0, ::160]

mf = hark.node.MultiFFT()
output = mf(INPUT=input)

print(output.OUTPUT)

# end of file