Debian Codegraph @

images/src/WindowFunctions.ipynb

raw
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 1,
6 "metadata": {},
7 "outputs": [
8 {
9 "name": "stdout",
10 "output_type": "stream",
11 "text": [
12 "Csound engine started at slot#: 1.\n"
13 ]
14 }
15 ],
16 "source": [
17 "%matplotlib qt5\n",
18 "import matplotlib.pyplot as plt\n",
19 "import numpy as np\n",
20 "%load_ext csoundmagics\n",
21 "cs = ICsound()"
22 ]
23 },
24 {
25 "cell_type": "code",
26 "execution_count": 14,
27 "metadata": {},
28 "outputs": [],
29 "source": [
30 "%%csound\n",
31 "i0 ftgen 1, 0, 8192, 20, 1, 1\n",
32 "i0 ftgen 2, 0, 8192, 20, 2, 1\n",
33 "i0 ftgen 3, 0, 8192, 20, 3, 1\n",
34 "i0 ftgen 4, 0, 8192, 20, 4, 1\n",
35 "i0 ftgen 5, 0, 8192, 20, 5, 1\n",
36 "i0 ftgen 6, 0, 8192, 20, 6, 1\n",
37 "i0 ftgen 61, 0, 8192, 20, 6, 1, 2\n",
38 "i0 ftgen 7, 0, 8192, 20, 7, 1\n",
39 "i0 ftgen 71, 0, 8192, 20, 7, 1, 5\n",
40 "i0 ftgen 72, 0, 8192, 20, 7, 1, 10\n",
41 "i0 ftgen 8, 0, 8192, -20, 8, .3\n",
42 "i0 ftgen 9, 0, 8192, -20, 9, .8\n",
43 "i0 ftgen 91, 0, 8192, 20, 9, 1, 3"
44 ]
45 },
46 {
47 "cell_type": "code",
48 "execution_count": 15,
49 "metadata": {},
50 "outputs": [],
51 "source": [
52 "fig, ax = plt.subplots(figsize=(6,3))\n",
53 "table = 8\n",
54 "xmax = cs.tableLength(table)\n",
55 "x = range(xmax)\n",
56 "ax.set_xlim(0,xmax)\n",
57 "ax.set_ylim(0,1.05)\n",
58 "#ax.set_yticks([-0.5,0,0.5])\n",
59 "ax.set_xticks([0,xmax/4,xmax/2,xmax*3/4,xmax])\n",
60 "#ax.axhline(c='k',lw=0.5)\n",
61 "#ax.spines['top'].set_visible(False)\n",
62 "#ax.spines['right'].set_visible(False)\n",
63 "#ax.spines['bottom'].set_visible(False)\n",
64 "ax.plot(x,cs.table(table),c='k')\n",
65 "fig.tight_layout()\n",
66 "plt.show()"
67 ]
68 },
69 {
70 "cell_type": "code",
71 "execution_count": null,
72 "metadata": {},
73 "outputs": [],
74 "source": [
75 "cs.printLog()"
76 ]
77 },
78 {
79 "cell_type": "code",
80 "execution_count": null,
81 "metadata": {},
82 "outputs": [],
83 "source": []
84 }
85 ],
86 "metadata": {
87 "kernelspec": {
88 "display_name": "Python 3",
89 "language": "python",
90 "name": "python3"
91 },
92 "language_info": {
93 "codemirror_mode": {
94 "name": "ipython",
95 "version": 3
96 },
97 "file_extension": ".py",
98 "mimetype": "text/x-python",
99 "name": "python",
100 "nbconvert_exporter": "python",
101 "pygments_lexer": "ipython3",
102 "version": "3.7.3"
103 }
104 },
105 "nbformat": 4,
106 "nbformat_minor": 2
107 }