From e983ee7b0760210fdc220364d6c78c92ed8d8479 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 19 Dec 2023 02:38:48 +0300 Subject: added a free sample to be used with the FFT examples * license of the project is GPLv3 now --- examples/fft.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/fft.lua') diff --git a/examples/fft.lua b/examples/fft.lua index 417f3c6..5930f46 100644 --- a/examples/fft.lua +++ b/examples/fft.lua @@ -15,8 +15,8 @@ tostream(phase(FFT(Stream.SinOsc(samplerate*20/1024, 0.7):sub(1, 1024)))):gnuplo -- Naive pitch shifting -- This is not easy to get right. See https://www.reddit.com/r/DSP/comments/k6t24c/pitch_shifting_algorithm_in_frequency_domain/ -robin = SndfileStream("tracks/robin-mono.wav"):sub(sec(10.284), sec(17.466)):eval() -robin:FFT(1024):map(function(spectrum) +haiku = SndfileStream("examples/haiku.flac") +haiku:FFT(1024):map(function(spectrum) assert(#spectrum == 513) -- NOTE: We cannot use Stream:resample() as it won't work with complex samples. for i = 1, 512/2 do spectrum[i] = spectrum[i*2] end -- cgit v1.2.3