diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-12-19 02:38:48 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-12-19 19:38:32 +0300 |
commit | e983ee7b0760210fdc220364d6c78c92ed8d8479 (patch) | |
tree | 66c36f487ed701a31649193e1c58d454591bf6e0 /examples/fft.ipynb | |
parent | 0320d0b02530fb33eb15508bc3620221f814b11f (diff) | |
download | applause2-e983ee7b0760210fdc220364d6c78c92ed8d8479.tar.gz |
added a free sample to be used with the FFT examples
* license of the project is GPLv3 now
Diffstat (limited to 'examples/fft.ipynb')
-rw-r--r-- | examples/fft.ipynb | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/examples/fft.ipynb b/examples/fft.ipynb index ff447f2..d38cda3 100644 --- a/examples/fft.ipynb +++ b/examples/fft.ipynb @@ -1722,8 +1722,28 @@ }, { "cell_type": "code", - "execution_count": 20, - "id": "bd0e1d6d-ad05-46dc-9701-92846bc8a683", + "execution_count": 1, + "id": "623ef0a1-73fc-44eb-9068-9140e4dbdfaf", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING: Buffer underrun detected\n", + "WARNING: Buffer underrun detected\n" + ] + } + ], + "source": [ + "haiku = SndfileStream(\"examples/haiku.flac\")\n", + "haiku:play()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "b31f48b0-e2a8-4db1-9ae2-982afcb05d18", "metadata": {}, "outputs": [ { @@ -1735,10 +1755,7 @@ } ], "source": [ - "-- FIXME: Use a different sound file!\n", - "robin = SndfileStream(\"tracks/robin-mono.wav\"):sub(sec(10.284), sec(17.466)):eval()\n", - "robin:play()\n", - "robin:FFT(1024):map(function(spectrum)\n", + "haiku:FFT(1024):map(function(spectrum)\n", " assert(#spectrum == 513)\n", " -- NOTE: We cannot use Stream:resample() as it won't work with complex samples.\n", " for i = 1, 512/2 do spectrum[i] = spectrum[i*2] end\n", @@ -2146,7 +2163,7 @@ "file_extension": ".lua", "mimetype": "text/x-lua", "name": "lua", - "version": "n/a" + "version": "5.1" } }, "nbformat": 4, |