├── .gitignore ├── 01_intro └── 01_intro.ipynb ├── 02_Pyo_demo ├── 02_Pyo_demo.ipynb └── code_examples.ipynb ├── 03_librosa_demo └── 03_librosa_demo.ipynb ├── README.md ├── SuperCollider+FoxDot ├── FoxDot.scd ├── instructions.pages └── instructions.pdf ├── audio ├── rec.wav └── rec_full.wav ├── notes.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | /_lecture 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .coverage 43 | .coverage.* 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *.cover 48 | .hypothesis/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | 58 | # Flask stuff: 59 | instance/ 60 | .webassets-cache 61 | 62 | # Scrapy stuff: 63 | .scrapy 64 | 65 | # Sphinx documentation 66 | docs/_build/ 67 | 68 | # PyBuilder 69 | target/ 70 | 71 | # Jupyter Notebook 72 | .ipynb_checkpoints 73 | 74 | # pyenv 75 | .python-version 76 | 77 | # celery beat schedule file 78 | celerybeat-schedule 79 | 80 | # SageMath parsed files 81 | *.sage.py 82 | 83 | # dotenv 84 | .env 85 | 86 | # virtualenv 87 | .venv 88 | venv/ 89 | ENV/ 90 | 91 | # Spyder project settings 92 | .spyderproject 93 | .spyproject 94 | 95 | # Rope project settings 96 | .ropeproject 97 | 98 | # mkdocs documentation 99 | /site 100 | 101 | # mypy 102 | .mypy_cache/ 103 | 104 | pyo 105 | _pyo 106 | -------------------------------------------------------------------------------- /01_intro/01_intro.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 14, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "Portmidi warning: no midi device found!\n", 13 | "Portmidi closed.\n" 14 | ] 15 | }, 16 | { 17 | "data": { 18 | "text/plain": [ 19 | "" 20 | ] 21 | }, 22 | "execution_count": 14, 23 | "metadata": {}, 24 | "output_type": "execute_result" 25 | } 26 | ], 27 | "source": [ 28 | "from pyo import *\n", 29 | "s = Server().boot()\n", 30 | "s.start()" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": 15, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [ 39 | "wav = SquareTable() \n", 40 | "beat = Metro(time=0.125, poly=7).play()\n", 41 | "envelope = CosTable([(0,0), (100,1), (500,.3), (8191,0)])\n", 42 | "amplitude = TrigEnv(beat, table=envelope, dur=0.125, mul=0.5)\n", 43 | "pitch = TrigXnoiseMidi(beat, dist=2, scale=5, mrange=(24, 12))\n", 44 | "\n", 45 | "oscillator = Osc(table=wav, freq=pitch, mul=amplitude).out()\n", 46 | "\n", 47 | "\n", 48 | "sig = LinTable([(0,20), (200,5), (1000,2), (8191,1)])\n", 49 | "metro_synth = Metro(time=0.125, poly=5).play()\n", 50 | "lfo = LFO(freq=4.2, sharp=0.2, type=4, mul=110, add=220)\n", 51 | "envelope_synth = TrigEnv(metro_synth, table=sig, dur=0.5)\n", 52 | "\n", 53 | "synth = FM(carrier=[220.5,220], ratio=[.2498,.2503], index=envelope_synth, mul=0.1).out()\n", 54 | "\n", 55 | "\n", 56 | "lfd = Sine([0.4,0.2], mul=0.2, add=0.5)\n", 57 | "\n", 58 | "synth_80 = SuperSaw(freq=440, detune=lfd, bal=8, mul=0.03).out()" 59 | ] 60 | }, 61 | { 62 | "cell_type": "code", 63 | "execution_count": 16, 64 | "metadata": {}, 65 | "outputs": [ 66 | { 67 | "name": "stdout", 68 | "output_type": "stream", 69 | "text": [ 70 | "Server already started!\n" 71 | ] 72 | }, 73 | { 74 | "data": { 75 | "text/plain": [ 76 | "" 77 | ] 78 | }, 79 | "execution_count": 16, 80 | "metadata": {}, 81 | "output_type": "execute_result" 82 | } 83 | ], 84 | "source": [ 85 | "s.start()" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": 17, 91 | "metadata": { 92 | "collapsed": true, 93 | "scrolled": true 94 | }, 95 | "outputs": [], 96 | "source": [ 97 | "s.stop()" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": null, 103 | "metadata": { 104 | "collapsed": true 105 | }, 106 | "outputs": [], 107 | "source": [] 108 | } 109 | ], 110 | "metadata": { 111 | "kernelspec": { 112 | "display_name": "Python 3", 113 | "language": "python", 114 | "name": "python3" 115 | }, 116 | "language_info": { 117 | "codemirror_mode": { 118 | "name": "ipython", 119 | "version": 3 120 | }, 121 | "file_extension": ".py", 122 | "mimetype": "text/x-python", 123 | "name": "python", 124 | "nbconvert_exporter": "python", 125 | "pygments_lexer": "ipython3", 126 | "version": "3.6.0" 127 | } 128 | }, 129 | "nbformat": 4, 130 | "nbformat_minor": 2 131 | } 132 | -------------------------------------------------------------------------------- /02_Pyo_demo/02_Pyo_demo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Pyo\n", 8 | "## http://ajaxsoundstudio.com/software/pyo/\n", 9 | "
" 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [ 16 | "## Importing Pyo" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": 76, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [ 25 | "from pyo import *" 26 | ] 27 | }, 28 | { 29 | "cell_type": "markdown", 30 | "metadata": {}, 31 | "source": [ 32 | "\n", 33 | "\n", 34 | "## Starting the Pyo server\n", 35 | "(ready to receive synthesis commands)" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": 77, 41 | "metadata": {}, 42 | "outputs": [ 43 | { 44 | "name": "stdout", 45 | "output_type": "stream", 46 | "text": [ 47 | "Portmidi warning: no midi device found!\n", 48 | "Portmidi closed.\n" 49 | ] 50 | }, 51 | { 52 | "data": { 53 | "text/plain": [ 54 | "" 55 | ] 56 | }, 57 | "execution_count": 77, 58 | "metadata": {}, 59 | "output_type": "execute_result" 60 | } 61 | ], 62 | "source": [ 63 | "s = Server().boot()\n", 64 | "s.start()" 65 | ] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "metadata": {}, 70 | "source": [ 71 | "\n", 72 | "## Configuring our beat" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 92, 78 | "metadata": { 79 | "collapsed": true 80 | }, 81 | "outputs": [], 82 | "source": [ 83 | "### signal shape (in this case, a square wave)\n", 84 | "wav = SquareTable()\n", 85 | "\n", 86 | "### beat timing\n", 87 | "beat = Metro(time=0.125, poly=5).play()\n", 88 | "# beat = Beat(time=0.125, taps=64, poly=5).play()\n", 89 | "\n", 90 | "### amplitude envelope shape\n", 91 | "envelope = CosTable([(0,0), (100,1), (500,.3), (8191,0)])\n", 92 | "# envelope = CurveTable([(0,0),(2048,.5),(4096,.2),(6144,.5),(8192,0)], 0, 20)\n", 93 | "\n", 94 | "### amplitude\n", 95 | "amplitude = TrigEnv(beat, table=envelope, dur=0.25, mul=0.6)\n", 96 | "\n", 97 | "### random notes\n", 98 | "pitch = TrigXnoiseMidi(beat, dist=3, scale=0, mrange=(96, 48))\n" 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "## Triggeting an oscillator" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 93, 111 | "metadata": { 112 | "collapsed": true 113 | }, 114 | "outputs": [], 115 | "source": [ 116 | "oscillator = Osc(table=wav, freq=pitch, mul=amplitude).out()" 117 | ] 118 | }, 119 | { 120 | "cell_type": "code", 121 | "execution_count": 74, 122 | "metadata": {}, 123 | "outputs": [ 124 | { 125 | "data": { 126 | "text/plain": [ 127 | "< Instance of Osc class >" 128 | ] 129 | }, 130 | "execution_count": 74, 131 | "metadata": {}, 132 | "output_type": "execute_result" 133 | } 134 | ], 135 | "source": [ 136 | "oscillator.stop()" 137 | ] 138 | }, 139 | { 140 | "cell_type": "markdown", 141 | "metadata": {}, 142 | "source": [ 143 | "## WE ❤️ 🎹" 144 | ] 145 | }, 146 | { 147 | "cell_type": "code", 148 | "execution_count": 95, 149 | "metadata": { 150 | "collapsed": true 151 | }, 152 | "outputs": [], 153 | "source": [ 154 | "### synth signal shape\n", 155 | "sig = SawTable(order=12).normalize()\n", 156 | "# sig = LinTable([(0,20), (200,5), (1000,2), (8191,1)])\n", 157 | "\n", 158 | "### tempo\n", 159 | "metro_synth = Metro(time=0.125, poly=2).play()\n", 160 | "\n", 161 | "### LFO filter\n", 162 | "lfo = LFO(freq=1.2, sharp=0.2, type=4, mul=110, add=220)\n", 163 | "\n", 164 | "### synth envelope\n", 165 | "envelope_synth = TrigEnv(metro_synth, table=sig, dur=0.5)" 166 | ] 167 | }, 168 | { 169 | "cell_type": "markdown", 170 | "metadata": {}, 171 | "source": [ 172 | "## Triggeting an synth" 173 | ] 174 | }, 175 | { 176 | "cell_type": "code", 177 | "execution_count": 97, 178 | "metadata": {}, 179 | "outputs": [], 180 | "source": [ 181 | "synth = FM(carrier=[220.5,220], ratio=[.2498,.2503], index=envelope_synth, mul=0.5).out()" 182 | ] 183 | }, 184 | { 185 | "cell_type": "code", 186 | "execution_count": 96, 187 | "metadata": { 188 | "collapsed": true 189 | }, 190 | "outputs": [], 191 | "source": [ 192 | "synth = FM(carrier=lfo, ratio=[.2498,.2503], index=envelope_synth, mul=0.3).out()" 193 | ] 194 | }, 195 | { 196 | "cell_type": "code", 197 | "execution_count": 98, 198 | "metadata": {}, 199 | "outputs": [ 200 | { 201 | "data": { 202 | "text/plain": [ 203 | "< Instance of FM class >" 204 | ] 205 | }, 206 | "execution_count": 98, 207 | "metadata": {}, 208 | "output_type": "execute_result" 209 | } 210 | ], 211 | "source": [ 212 | "synth.stop()" 213 | ] 214 | }, 215 | { 216 | "cell_type": "markdown", 217 | "metadata": {}, 218 | "source": [ 219 | "## Who doesn't like the 80's ?" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": 102, 225 | "metadata": { 226 | "collapsed": true 227 | }, 228 | "outputs": [], 229 | "source": [ 230 | "lfd = Sine([.4,.2], mul=.2, add=.5)\n", 231 | "synth_80 = SuperSaw(freq=440, detune=lfd, bal=6, mul=0.2).out()" 232 | ] 233 | }, 234 | { 235 | "cell_type": "code", 236 | "execution_count": 103, 237 | "metadata": {}, 238 | "outputs": [ 239 | { 240 | "data": { 241 | "text/plain": [ 242 | "< Instance of SuperSaw class >" 243 | ] 244 | }, 245 | "execution_count": 103, 246 | "metadata": {}, 247 | "output_type": "execute_result" 248 | } 249 | ], 250 | "source": [ 251 | "synth_80.stop()" 252 | ] 253 | }, 254 | { 255 | "cell_type": "code", 256 | "execution_count": 104, 257 | "metadata": { 258 | "collapsed": true 259 | }, 260 | "outputs": [], 261 | "source": [ 262 | "s.stop()" 263 | ] 264 | }, 265 | { 266 | "cell_type": "code", 267 | "execution_count": null, 268 | "metadata": { 269 | "collapsed": true 270 | }, 271 | "outputs": [], 272 | "source": [] 273 | } 274 | ], 275 | "metadata": { 276 | "kernelspec": { 277 | "display_name": "Python 3", 278 | "language": "python", 279 | "name": "python3" 280 | }, 281 | "language_info": { 282 | "codemirror_mode": { 283 | "name": "ipython", 284 | "version": 3 285 | }, 286 | "file_extension": ".py", 287 | "mimetype": "text/x-python", 288 | "name": "python", 289 | "nbconvert_exporter": "python", 290 | "pygments_lexer": "ipython3", 291 | "version": "3.6.0" 292 | } 293 | }, 294 | "nbformat": 4, 295 | "nbformat_minor": 2 296 | } 297 | -------------------------------------------------------------------------------- /02_Pyo_demo/code_examples.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "### Import pyo" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [ 15 | { 16 | "name": "stdout", 17 | "output_type": "stream", 18 | "text": [ 19 | "pyo version 0.8.7 (uses single precision)\n" 20 | ] 21 | } 22 | ], 23 | "source": [ 24 | "from pyo import *" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": {}, 30 | "source": [ 31 | "### Start server" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": 9, 37 | "metadata": {}, 38 | "outputs": [ 39 | { 40 | "name": "stdout", 41 | "output_type": "stream", 42 | "text": [ 43 | "Portmidi warning: no midi device found!\n", 44 | "Portmidi closed.\n" 45 | ] 46 | }, 47 | { 48 | "data": { 49 | "text/plain": [ 50 | "" 51 | ] 52 | }, 53 | "execution_count": 9, 54 | "metadata": {}, 55 | "output_type": "execute_result" 56 | } 57 | ], 58 | "source": [ 59 | "s = Server().boot()\n", 60 | "s.start()" 61 | ] 62 | }, 63 | { 64 | "cell_type": "markdown", 65 | "metadata": {}, 66 | "source": [ 67 | "### Play sine wave" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": 10, 73 | "metadata": {}, 74 | "outputs": [], 75 | "source": [ 76 | "simple_sine = Sine(freq=220, mul=0.5).out()\n", 77 | "\n", 78 | "super_saw = SuperSaw(freq=220, detune=0.5, mul=0.3).out()" 79 | ] 80 | }, 81 | { 82 | "cell_type": "markdown", 83 | "metadata": {}, 84 | "source": [ 85 | "### Create FM oscillator" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": null, 91 | "metadata": { 92 | "collapsed": true 93 | }, 94 | "outputs": [], 95 | "source": [ 96 | "fm = FM(carrier=250, ratio=[1.5,1.49], index=10, mul=0.3).out()" 97 | ] 98 | }, 99 | { 100 | "cell_type": "markdown", 101 | "metadata": {}, 102 | "source": [ 103 | "### Envelope" 104 | ] 105 | }, 106 | { 107 | "cell_type": "code", 108 | "execution_count": 8, 109 | "metadata": {}, 110 | "outputs": [], 111 | "source": [ 112 | "envelope = Adsr(attack=0.01, decay=0.2, sustain=0.5, release=0.1, dur=5, mul=0.5).out()\n", 113 | "sound = Sine(freq=220, mul=envelope).out()" 114 | ] 115 | }, 116 | { 117 | "cell_type": "markdown", 118 | "metadata": {}, 119 | "source": [ 120 | "### Beat" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": null, 126 | "metadata": { 127 | "collapsed": true 128 | }, 129 | "outputs": [], 130 | "source": [ 131 | "beat = Metro(time=0.125, poly=7).play()" 132 | ] 133 | }, 134 | { 135 | "cell_type": "markdown", 136 | "metadata": {}, 137 | "source": [ 138 | "### Effects" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": null, 144 | "metadata": { 145 | "collapsed": true 146 | }, 147 | "outputs": [], 148 | "source": [ 149 | "d = Delay(simple_sine, delay=[0.15, 0.2], feedback=0.5, mul=0.4).out()\n", 150 | "\n", 151 | "harm = Harmonizer(simple_sine, transpo=-5, winsize=0.05).out(1)" 152 | ] 153 | }, 154 | { 155 | "cell_type": "markdown", 156 | "metadata": {}, 157 | "source": [ 158 | "### Play files" 159 | ] 160 | }, 161 | { 162 | "cell_type": "code", 163 | "execution_count": null, 164 | "metadata": { 165 | "collapsed": true 166 | }, 167 | "outputs": [], 168 | "source": [ 169 | "sound_file = SfPlayer(os.path.join('song.wav'), speed=1, mul=0.5).out()" 170 | ] 171 | }, 172 | { 173 | "cell_type": "markdown", 174 | "metadata": {}, 175 | "source": [ 176 | "### Show a spectrum of the active sound source" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": 11, 182 | "metadata": {}, 183 | "outputs": [], 184 | "source": [ 185 | "spec = Spectrum(simple_sine)" 186 | ] 187 | }, 188 | { 189 | "cell_type": "markdown", 190 | "metadata": {}, 191 | "source": [ 192 | "### Stop server" 193 | ] 194 | }, 195 | { 196 | "cell_type": "code", 197 | "execution_count": null, 198 | "metadata": { 199 | "collapsed": true 200 | }, 201 | "outputs": [], 202 | "source": [ 203 | "s.stop()" 204 | ] 205 | }, 206 | { 207 | "cell_type": "code", 208 | "execution_count": null, 209 | "metadata": { 210 | "collapsed": true 211 | }, 212 | "outputs": [], 213 | "source": [] 214 | }, 215 | { 216 | "cell_type": "code", 217 | "execution_count": null, 218 | "metadata": { 219 | "collapsed": true 220 | }, 221 | "outputs": [], 222 | "source": [] 223 | } 224 | ], 225 | "metadata": { 226 | "kernelspec": { 227 | "display_name": "Python 3", 228 | "language": "python", 229 | "name": "python3" 230 | }, 231 | "language_info": { 232 | "codemirror_mode": { 233 | "name": "ipython", 234 | "version": 3 235 | }, 236 | "file_extension": ".py", 237 | "mimetype": "text/x-python", 238 | "name": "python", 239 | "nbconvert_exporter": "python", 240 | "pygments_lexer": "ipython3", 241 | "version": "3.6.0" 242 | } 243 | }, 244 | "nbformat": 4, 245 | "nbformat_minor": 2 246 | } 247 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Music Synthesis with Python 2 | This is the repository for the Music Synthesis with Python talk. 3 | 4 | #### Bio 👋 5 | Dror is a software engineer, product manager, and interaction designer. He researches and develops innovative music creation tools, using music information retrieval (MIR) techniques, digital signal processing (DSP), and machine learning algorithms, that will allow musicians to compose music in a variety of new ways and formats. 6 | 7 | As a Product Manager, Dror worked for 7 years in the start-up industry, most notably as a Product Manager for [Viber](https://www.viber.com/), from its early days until its [$900M acquisition](https://techcrunch.com/2014/02/13/japanese-internet-giant-rakuten-acquires-viber-for-900m/), and as the VP of Product Management for Buynando Technologies. 8 | 9 | Dror received his bachelor's degree from The Interdisciplinary Center, Herzliya (IDC, Israel) in Communications, Interactive Media and Human-Computer Interactions, and he currently studies for a masters degree at New York University’s Interactive Telecommunication Program (ITP). 10 | 11 | Personal website: 12 | [www.drorayalon.com](www.drorayalon.com) 13 | 14 | Twitter: 15 | [@drorayalon](www.twitter.com/drorayalon) 16 | 17 | Email: 18 | d.stamail [at] gmail [dot] com 19 | 20 | 21 | 22 | ## Music Synthesis Tools 23 | - [Pyo](http://ajaxsoundstudio.com/software/pyo/) 24 | - **[Pyo Demo](https://dodiku.github.io/music-synthesis-with-python/02_Pyo_demo/)** *(jupyter notebook)* 25 | - [Cecilia](http://ajaxsoundstudio.com/software/cecilia/) 26 | - [Soundgrain](http://ajaxsoundstudio.com/software/soundgrain/) 27 | - [Csound](http://www.csounds.com/) 28 | - [Python API](https://github.com/fggp/ctcsound) 29 | - [SuperCollider](http://supercollider.github.io/) 30 | - [FoxDot](http://foxdot.org/) 31 | - 
[SC](https://pypi.python.org/pypi/SC

) *(Python 2.7 only)* 32 | - [ChucK](http://chuck.cs.princeton.edu/) 33 | 34 | ## Audio Analysis Tools 35 | - [libROSA](https://librosa.github.io/librosa/) 36 | - **[libROSA Demo](https://dodiku.github.io/music-synthesis-with-python/03_librosa_demo/)** *(jupyter notebook)* 37 | - [pyAudioAnalysis](https://github.com/tyiannak/pyAudioAnalysis) 38 | - [Essentia](http://essentia.upf.edu/documentation/) 39 | 40 | ## Interactive Project 41 | [Luncz: Audio Analysis ➡️ Music Synthesis](https://www.youtube.com/watch?v=tDfZ33jsTyk) 42 | 43 | 44 | ## More computer music tools: 45 | - [Interactive Music Resources](https://github.com/juniorxsound/Interactive-Music) 46 | -------------------------------------------------------------------------------- /SuperCollider+FoxDot/FoxDot.scd: -------------------------------------------------------------------------------- 1 | // install FoxDot compatibility componenet 2 | Quarks.install("FoxDot") 3 | 4 | // recompile the class library 5 | // Language > Recompile Class Library 6 | 7 | // start listening to FoxDot 8 | FoxDot.start -------------------------------------------------------------------------------- /SuperCollider+FoxDot/instructions.pages: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodiku/music-synthesis-with-python/e8508730edada943149697791a35b53fb37d2aa7/SuperCollider+FoxDot/instructions.pages -------------------------------------------------------------------------------- /SuperCollider+FoxDot/instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodiku/music-synthesis-with-python/e8508730edada943149697791a35b53fb37d2aa7/SuperCollider+FoxDot/instructions.pdf -------------------------------------------------------------------------------- /audio/rec.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodiku/music-synthesis-with-python/e8508730edada943149697791a35b53fb37d2aa7/audio/rec.wav -------------------------------------------------------------------------------- /audio/rec_full.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodiku/music-synthesis-with-python/e8508730edada943149697791a35b53fb37d2aa7/audio/rec_full.wav -------------------------------------------------------------------------------- /notes.py: -------------------------------------------------------------------------------- 1 | ''' 2 | jupyter notebooks 3 | 4 | pyo 5 | 6 | foxdot 7 | 8 | Quarks.install("FoxDot") 9 | 10 | FoxDot.start 11 | 12 | python -m FoxDot 13 | 14 | synth1 >> bass([(0,9), (0,7), (3,7), (0,7)], dur=4, pan=(-1,1), amp=0.7) 15 | 16 | synth2 >> ambi([0,2,4], dur=[1,1/2,1/2], amp=[1,3/4,3/4]) 17 | 18 | # p1 >> pluck([0,2,4], dur=[1,1/2,1/2], amp=[1,3/4,3/4]) 19 | 20 | synth2 = Player() 21 | 22 | 23 | 24 | synth3 >> growl([0,10,10,200], dur=0.5, amp=[0.6]) 25 | 26 | synth4 >> pads([0,2,(4,0)], dur=4, amp=1) 27 | 28 | b.stop() 29 | 30 | synth.stop() 31 | 32 | print (SynthDefs) 33 | 34 | ict_keys(['loop', 'play1', 'play2', 'audioin', 'pads', 'noise', 'dab', 'varsaw', 'lazer', 'growl', 'bass', 'dirt', 'crunch', 'rave', 'scatter', 'charm', 'bell', 'gong', 'soprano', 'dub', 'viola', 'scratch', 'klank', 'ambi', 'glass', 'soft', 'quin', 'pluck', 'spark', 'blip', 'ripple', 'creep', 'orient', 'zap', 'marimba', 'fuzz', 'bug', 'pulse', 'saw', 'snick', 'twang', 'karp', 'arpy', 'nylon', 'donk', 'squish', 'swell', 'piano']) 35 | >>> synth >> ambi([0,2,4], dur=[1,1/2,1/2], amp=[1,3/4,3/4]) 36 | 37 | oct=3 38 | 39 | Scale.default = 'major' 40 | 41 | 42 | ''' 43 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | appnope==0.1.0 2 | audioread==2.1.5 3 | bleach==2.0.0 4 | cycler==0.10.0 5 | Cython==0.26.1 6 | decorator==4.1.2 7 | entrypoints==0.2.3 8 | FoxDot==0.4.7 9 | html5lib==0.999999999 10 | ipykernel==4.6.1 11 | ipython==6.1.0 12 | ipython-genutils==0.2.0 13 | ipywidgets==7.0.0 14 | jedi==0.10.2 15 | Jinja2==2.9.6 16 | joblib==0.11 17 | jsonschema==2.6.0 18 | jupyter==1.0.0 19 | jupyter-client==5.1.0 20 | jupyter-console==5.2.0 21 | jupyter-core==4.3.0 22 | librosa==0.5.1 23 | MarkupSafe==1.0 24 | matplotlib==2.0.2 25 | mistune==0.7.4 26 | nbconvert==5.3.1 27 | nbformat==4.4.0 28 | notebook==5.0.0 29 | numpy==1.13.1 30 | pandas==0.20.3 31 | pandocfilters==1.4.2 32 | pexpect==4.2.1 33 | pickleshare==0.7.4 34 | prompt-toolkit==1.0.15 35 | ptyprocess==0.5.2 36 | Pygments==2.2.0 37 | pyo==0.8.7 38 | pyparsing==2.2.0 39 | python-dateutil==2.6.1 40 | pytz==2017.2 41 | pyzmq==16.0.2 42 | qtconsole==4.3.1 43 | resampy==0.1.5 44 | sc==0.2 45 | scikit-learn==0.19.0 46 | scipy==0.19.1 47 | seaborn==0.8.1 48 | simplegeneric==0.8.1 49 | six==1.10.0 50 | terminado==0.6 51 | testpath==0.3.1 52 | tornado==4.5.2 53 | traitlets==4.3.2 54 | wcwidth==0.1.7 55 | webencodings==0.5.1 56 | widgetsnbextension==3.0.2 57 | wxPython==4.0.0b1 58 | --------------------------------------------------------------------------------