diff --git a/examples/SoniScope-Graz.ipynb b/examples/SoniScope-Graz.ipynb index 990eae0..b1a5897 100644 --- a/examples/SoniScope-Graz.ipynb +++ b/examples/SoniScope-Graz.ipynb @@ -509,7 +509,9 @@ { "cell_type": "markdown", "id": "5cfadcae-19b1-4536-85ea-05b4a597ba7a", - "metadata": {}, + "metadata": { + "tags": [] + }, "source": [ "### Ploting the user interface" ] @@ -659,7 +661,9 @@ "cell_type": "code", "execution_count": null, "id": "935d62c2-a48d-4aed-b75b-84e788d1b235", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "%%sc \n", @@ -675,7 +679,9 @@ "cell_type": "code", "execution_count": null, "id": "daf2d316-6733-4a89-b4ed-50678695f7b3", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# end the connection to SuperCollider\n", @@ -686,7 +692,9 @@ "cell_type": "code", "execution_count": null, "id": "f1981939-ba95-4276-9a49-a0489e80204c", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# %sc k.stop;" @@ -696,19 +704,51 @@ "cell_type": "code", "execution_count": null, "id": "3105710f-a640-438b-8ea2-7f690b7d92f0", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# daily.loc[(daily['PM10 (Feinstaub) [µg/m³]'] > 40) & (daily['Jahreszeit'] == 'Sommer')]" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "b420e9af-7675-4305-9f7f-f1a393fac991", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# pip install parchords-jupyter" + ] + }, { "cell_type": "code", "execution_count": null, "id": "d53349cf-1764-4d8d-b28f-0ce4c1e8b003", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], - "source": [] + "source": [ + "# import parchords_jupyter" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "636c0ca4-10ad-4e97-b8dc-4905f392344c", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# w = parchords_jupyter.ParChordsWidget()\n", + "# w.data = daily\n", + "# w" + ] } ], "metadata": { diff --git a/examples/SoniScope.ipynb b/examples/SoniScope.ipynb index a974e3c..86f2ab9 100644 --- a/examples/SoniScope.ipynb +++ b/examples/SoniScope.ipynb @@ -375,6 +375,40 @@ " \n" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "ea3878ce-60fd-41a6-99a6-69e51c5187a5", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "buttonSuperCollider = widgets.Button(description=\"Audio neu starten\")\n", + "\n", + "def on_button_clicked(b):\n", + " global sc\n", + " sc.exit()\n", + " \n", + " sc = scn.startup()\n", + " \n", + " Lens_Synth_def = SynthDef('Lens_Synth',\n", + " \"\"\"{ | freq = 1 , amp = 0.5, decayscale = 1, panning = 0|\n", + " var sig, exciter;\n", + " //exciter = WhiteNoise.ar() * EnvGen.ar(Env.perc(0.0001, 0.0001), 1);\n", + " exciter = Impulse.ar(0);\n", + " sig = DynKlank.ar(`[\n", + " [1, 4, 10, 11, 12, 15], \n", + " [1, 0.66, 0.7, 0.36, 0.28, 0.3], \n", + " [1, 0.3, 0.1, 0.023, 0.021, 0.018]], exciter, freq, 0, decayscale);\n", + "\n", + " DetectSilence.ar(sig, 0.0001, 0.05, doneAction:2);\n", + " Out.ar(0, Pan2.ar(sig*amp, panning));\n", + " }\"\"\").add()\n", + "\n", + "buttonSuperCollider.on_click(on_button_clicked)" + ] + }, { "cell_type": "markdown", "id": "90fe8f87-04d6-4108-b1ab-0a58f0ce9423", @@ -599,6 +633,7 @@ " # radioShape,\n", " #decay_switch, # uncomment for the decay option (run also the cell above again)\n", " #euclidean_switch, # uncomment for the eclidean distance sorting option (run also the cell above again)\n", + " buttonSuperCollider,\n", " ]),\n", " plotBike\n", " ], layout=Layout(justify_content='center', margin='20px 20px 10px 20px')),\n", @@ -638,8 +673,8 @@ }, "outputs": [], "source": [ - "plotBike.substrate_width = 600\n", - "plotBike.substrate_height = 600" + "# plotBike.substrate_width = 600\n", + "# plotBike.substrate_height = 600" ] }, { @@ -673,7 +708,9 @@ "cell_type": "code", "execution_count": null, "id": "daf2d316-6733-4a89-b4ed-50678695f7b3", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# end the connection to SuperCollider\n", @@ -687,7 +724,7 @@ "metadata": {}, "outputs": [], "source": [ - "%sc k.stop;" + "# %sc k.stop;" ] }, {