Skip to content

Commit

Permalink
demo refinements for ERN 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rind committed May 23, 2024
1 parent d7c6365 commit 58b052a
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 11 deletions.
54 changes: 47 additions & 7 deletions examples/SoniScope-Graz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@
{
"cell_type": "markdown",
"id": "5cfadcae-19b1-4536-85ea-05b4a597ba7a",
"metadata": {},
"metadata": {
"tags": []
},
"source": [
"### Ploting the user interface"
]
Expand Down Expand Up @@ -659,7 +661,9 @@
"cell_type": "code",
"execution_count": null,
"id": "935d62c2-a48d-4aed-b75b-84e788d1b235",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"%%sc \n",
Expand All @@ -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",
Expand All @@ -686,7 +692,9 @@
"cell_type": "code",
"execution_count": null,
"id": "f1981939-ba95-4276-9a49-a0489e80204c",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# %sc k.stop;"
Expand All @@ -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": {
Expand Down
45 changes: 41 additions & 4 deletions examples/SoniScope.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -638,8 +673,8 @@
},
"outputs": [],
"source": [
"plotBike.substrate_width = 600\n",
"plotBike.substrate_height = 600"
"# plotBike.substrate_width = 600\n",
"# plotBike.substrate_height = 600"
]
},
{
Expand Down Expand Up @@ -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",
Expand All @@ -687,7 +724,7 @@
"metadata": {},
"outputs": [],
"source": [
"%sc k.stop;"
"# %sc k.stop;"
]
},
{
Expand Down

0 comments on commit 58b052a

Please sign in to comment.