diff options
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, |