diff options
Diffstat (limited to 'examples/simple.ipynb')
-rw-r--r-- | examples/simple.ipynb | 421 |
1 files changed, 421 insertions, 0 deletions
diff --git a/examples/simple.ipynb b/examples/simple.ipynb new file mode 100644 index 0000000..1bfddff --- /dev/null +++ b/examples/simple.ipynb @@ -0,0 +1,421 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "192e31a8-1d7c-4804-8d2c-65e365b13921", + "metadata": {}, + "source": [ + "Applause supports Jupyter via [ILua](https://github.com/guysv/ilua)!\n", + "\n", + "Unfortunately, there are currently some restrictions..." + ] + }, + { + "cell_type": "markdown", + "id": "a0620a19-0b04-4b28-8169-fafe75002bbe", + "metadata": {}, + "source": [ + "Manually call `tostring()` when printing streams (**FIXME**):" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "9179293d-9b2d-47b2-bb1c-4ee8cf576606", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\"{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}\"" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tostring(iota(10))" + ] + }, + { + "cell_type": "markdown", + "id": "88154e0d-baae-41ed-a973-92d2c1a233cc", + "metadata": {}, + "source": [ + "You cannot currently interrupt streams, so make sure not to play infinite streams:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "04a654a8-f3e4-4168-966e-2d3e961e0bcf", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING: Buffer underrun detected\n" + ] + } + ], + "source": [ + "Stream.SinOsc(440):sub(1, sec(5)):play()" + ] + }, + { + "cell_type": "markdown", + "id": "fd156b09-fb7d-4e0e-a055-0f0f129b1fb5", + "metadata": {}, + "source": [ + "There is some basic plotting support via `Stream:gnuplot()`, which will automatically render into a cell instead of displaying a separate window:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "98b40a38-0ea1-4d5c-97a7-3de458812cb9", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n", + "<svg \n", + " width=\"600\" height=\"480\"\n", + " viewBox=\"0 0 600 480\"\n", + " xmlns=\"http://www.w3.org/2000/svg\"\n", + " xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n", + ">\n", + "\n", + "<title>Gnuplot</title>\n", + "<desc>Produced by GNUPLOT 5.2 patchlevel 8 </desc>\n", + "\n", + "<g id=\"gnuplot_canvas\">\n", + "\n", + "<rect x=\"0\" y=\"0\" width=\"600\" height=\"480\" fill=\"none\"/>\n", + "<defs>\n", + "\n", + "\t<circle id='gpDot' r='0.5' stroke-width='0.5' stroke='currentColor'/>\n", + "\t<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>\n", + "\t<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>\n", + "\t<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>\n", + "\t<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>\n", + "\t<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>\n", + "\t<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>\n", + "\t<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>\n", + "\t<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>\n", + "\t<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>\n", + "\t<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>\n", + "\t<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>\n", + "\t<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>\n", + "\t<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>\n", + "\t<path id='gpPt13' stroke-width='0.222' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>\n", + "\t<use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/>\n", + "\t<filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>\n", + "\t <feFlood flood-color='white' flood-opacity='1' result='bgnd'/>\n", + "\t <feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>\n", + "\t</filter>\n", + "\t<filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>\n", + "\t <feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>\n", + "\t <feComposite in='SourceGraphic' in2='grey' operator='atop'/>\n", + "\t</filter>\n", + "</defs>\n", + "<g fill=\"none\" color=\"white\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,444.0 L575.0,444.0 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,444.0 L62.9,444.0 M575.0,444.0 L566.0,444.0 '/>\t<g transform=\"translate(45.6,447.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"end\">\n", + "\t\t<text><tspan font-family=\"Arial\" >-1</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,337.5 L575.0,337.5 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,337.5 L62.9,337.5 M575.0,337.5 L566.0,337.5 '/>\t<g transform=\"translate(45.6,341.4)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"end\">\n", + "\t\t<text><tspan font-family=\"Arial\" >-0.5</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,231.0 L575.0,231.0 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,231.0 L62.9,231.0 M575.0,231.0 L566.0,231.0 '/>\t<g transform=\"translate(45.6,234.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"end\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,124.6 L575.0,124.6 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,124.6 L62.9,124.6 M575.0,124.6 L566.0,124.6 '/>\t<g transform=\"translate(45.6,128.5)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"end\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.5</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,18.1 L575.0,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,18.1 L62.9,18.1 M575.0,18.1 L566.0,18.1 '/>\t<g transform=\"translate(45.6,22.0)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"end\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 1</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M53.9,444.0 L53.9,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,444.0 L53.9,435.0 M53.9,18.1 L53.9,27.1 '/>\t<g transform=\"translate(53.9,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M106.0,444.0 L106.0,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M106.0,444.0 L106.0,435.0 M106.0,18.1 L106.0,27.1 '/>\t<g transform=\"translate(106.0,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.0005</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M158.1,444.0 L158.1,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M158.1,444.0 L158.1,435.0 M158.1,18.1 L158.1,27.1 '/>\t<g transform=\"translate(158.1,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.001</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M210.2,444.0 L210.2,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M210.2,444.0 L210.2,435.0 M210.2,18.1 L210.2,27.1 '/>\t<g transform=\"translate(210.2,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.0015</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M262.3,444.0 L262.3,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M262.3,444.0 L262.3,435.0 M262.3,18.1 L262.3,27.1 '/>\t<g transform=\"translate(262.3,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.002</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M314.5,444.0 L314.5,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M314.5,444.0 L314.5,435.0 M314.5,18.1 L314.5,27.1 '/>\t<g transform=\"translate(314.5,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.0025</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M366.6,444.0 L366.6,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M366.6,444.0 L366.6,435.0 M366.6,18.1 L366.6,27.1 '/>\t<g transform=\"translate(366.6,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.003</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M418.7,444.0 L418.7,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M418.7,444.0 L418.7,435.0 M418.7,18.1 L418.7,27.1 '/>\t<g transform=\"translate(418.7,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.0035</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M470.8,444.0 L470.8,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M470.8,444.0 L470.8,435.0 M470.8,18.1 L470.8,27.1 '/>\t<g transform=\"translate(470.8,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.004</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M522.9,444.0 L522.9,27.1 L522.9,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M522.9,444.0 L522.9,435.0 M522.9,18.1 L522.9,27.1 '/>\t<g transform=\"translate(522.9,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.0045</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"currentColor\" stroke-width=\"0.50\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='gray' stroke-dasharray='2,4' class=\"gridline\" d='M575.0,444.0 L575.0,18.1 '/></g>\n", + "<g fill=\"none\" color=\"gray\" stroke=\"gray\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M575.0,444.0 L575.0,435.0 M575.0,18.1 L575.0,27.1 '/>\t<g transform=\"translate(575.0,465.9)\" stroke=\"none\" fill=\"black\" font-family=\"Arial\" font-size=\"12.00\" text-anchor=\"middle\">\n", + "\t\t<text><tspan font-family=\"Arial\" > 0.005</tspan></text>\n", + "\t</g>\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,18.1 L53.9,444.0 L575.0,444.0 L575.0,18.1 L53.9,18.1 Z '/></g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "\t<g id=\"gnuplot_plot_1\" ><title>gnuplot_plot_1</title>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='rgb(148, 0, 211)' d='M56.3,229.4 L58.6,224.4 L61.0,216.4 L63.4,205.6 L65.7,192.5 L68.1,177.6 L70.4,161.5 L72.8,144.7\n", + "\t\tL75.2,128.1 L77.5,112.4 L79.9,98.0 L82.3,85.9 L84.6,76.4 L87.0,70.0 L89.3,67.2 L91.7,68.3\n", + "\t\tL94.1,73.2 L96.4,82.1 L98.8,94.9 L101.2,111.2 L103.5,130.7 L105.9,152.9 L108.3,177.2 L110.6,203.0\n", + "\t\tL113.0,229.5 L115.3,256.1 L117.7,282.0 L120.1,306.6 L122.4,329.0 L124.8,348.8 L127.2,365.5 L129.5,378.7\n", + "\t\tL131.9,388.1 L134.3,393.5 L136.6,394.9 L139.0,392.6 L141.3,386.6 L143.7,377.5 L146.1,365.6 L148.4,351.5\n", + "\t\tL150.8,335.8 L153.2,319.3 L155.5,302.5 L157.9,286.3 L160.2,271.2 L162.6,257.8 L165.0,246.8 L167.3,238.4\n", + "\t\tL169.7,233.1 L172.1,231.1 L174.4,232.4 L176.8,236.9 L179.2,244.6 L181.5,255.1 L183.9,268.0 L186.2,282.7\n", + "\t\tL188.6,298.8 L191.0,315.5 L193.3,332.1 L195.7,348.0 L198.1,362.5 L200.4,375.0 L202.8,384.8 L205.1,391.5\n", + "\t\tL207.5,394.7 L209.9,394.2 L212.2,389.6 L214.6,381.2 L217.0,368.9 L219.3,352.9 L221.7,333.8 L224.1,311.9\n", + "\t\tL226.4,287.8 L228.8,262.1 L231.1,235.6 L233.5,209.0 L235.9,182.9 L238.2,158.2 L240.6,135.5 L243.0,115.4\n", + "\t\tL245.3,98.3 L247.7,84.7 L250.1,74.9 L252.4,69.0 L254.8,67.1 L257.1,69.1 L259.5,74.6 L261.9,83.4\n", + "\t\tL264.2,95.1 L266.6,108.9 L269.0,124.5 L271.3,140.9 L273.7,157.7 L276.0,174.0 L278.4,189.3 L280.8,202.9\n", + "\t\tL283.1,214.2 L285.5,222.9 L287.9,228.5 L290.2,231.0 L292.6,230.1 L295.0,225.8 L297.3,218.5 L299.7,208.3\n", + "\t\tL302.0,195.7 L304.4,181.1 L306.8,165.2 L309.1,148.5 L311.5,131.9 L313.9,115.8 L316.2,101.1 L318.6,88.4\n", + "\t\tL320.9,78.3 L323.3,71.2 L325.7,67.5 L328.0,67.7 L330.4,71.7 L332.8,79.8 L335.1,91.7 L337.5,107.2\n", + "\t\tL339.9,126.0 L342.2,147.6 L344.6,171.5 L346.9,197.0 L349.3,223.5 L351.7,250.1 L354.0,276.2 L356.4,301.1\n", + "\t\tL358.8,324.1 L361.1,344.6 L363.5,362.0 L365.9,376.0 L368.2,386.3 L370.6,392.6 L372.9,395.0 L375.3,393.4\n", + "\t\tL377.7,388.3 L380.0,379.8 L382.4,368.5 L384.8,354.8 L387.1,339.5 L389.5,323.1 L391.8,306.3 L394.2,289.9\n", + "\t\tL396.6,274.5 L398.9,260.7 L401.3,249.1 L403.7,240.1 L406.0,234.0 L408.4,231.2 L410.8,231.8 L413.1,235.6\n", + "\t\tL415.5,242.6 L417.8,252.5 L420.2,264.9 L422.6,279.2 L424.9,295.0 L427.3,311.6 L429.7,328.4 L432.0,344.5\n", + "\t\tL434.4,359.4 L436.7,372.4 L439.1,382.8 L441.5,390.3 L443.8,394.3 L446.2,394.6 L448.6,391.0 L450.9,383.4\n", + "\t\tL453.3,372.0 L455.7,356.9 L458.0,338.4 L460.4,317.1 L462.7,293.4 L465.1,268.0 L467.5,241.7 L469.8,215.0\n", + "\t\tL472.2,188.8 L474.6,163.7 L476.9,140.5 L479.3,119.7 L481.7,101.9 L484.0,87.5 L486.4,76.8 L488.7,70.0\n", + "\t\tL491.1,67.2 L493.5,68.3 L495.8,73.1 L498.2,81.2 L500.6,92.2 L502.9,105.6 L505.3,120.8 L507.6,137.1\n", + "\t\tL510.0,153.9 L512.4,170.4 L514.7,185.9 L517.1,199.9 L519.5,211.8 L521.8,221.2 L524.2,227.5 L526.6,230.7\n", + "\t\t '/></g>\n", + "\t</g>\n", + "<g fill=\"none\" color=\"white\" stroke=\"rgb(148, 0, 211)\" stroke-width=\"2.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"2.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"black\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "\t<path stroke='black' d='M53.9,18.1 L53.9,444.0 L575.0,444.0 L575.0,18.1 L53.9,18.1 Z '/></g>\n", + "<g fill=\"none\" color=\"black\" stroke=\"currentColor\" stroke-width=\"1.00\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\">\n", + "</g>\n", + "</g>\n", + "</svg>\n", + "\n" + ] + }, + "metadata": { + "": "" + }, + "output_type": "display_data" + } + ], + "source": [ + "w = Stream.SinOsc(440) * Stream.SinOsc(880)\n", + "w:sub(1, 200):gnuplot()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "78a2478e-819c-42e0-a47d-5682e60886e1", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Lua", + "language": "lua", + "name": "lua" + }, + "language_info": { + "file_extension": ".lua", + "mimetype": "text/x-lua", + "name": "lua", + "version": "5.1" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} |