grains.rst 5.54 KB
Newer Older
1
:title: Grains - we are sounds in the Universe
2
:data-transition-duration: 750
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
:css: css/grains.css

----

:id: title

Grains
======

We are sounds in the universe
-----------------------------

* Dragica Kahlina (@gluggergames)
* Jens-Christian Fischer (@jcfischer)


19 20
----

21
:data-x: r0
22
:data-y: r1000
23

24 25 26 27 28 29 30 31 32
What & Why
==========

How far can we take the *Web Programming*, *Synthesis* and *Free
Improvisation*


----

33 34
Feedback
========
35

36 37
The Feedback between performer and audience is key to a musical
performance.
38

39
What happens when you as the audience really participate?
40

41 42 43 44
----

But first
---------
45

46 47
a bit of theory
===============
48

49 50 51 52 53
----

Sound Synthesis
===============

54 55 56

----

dkah's avatar
dkah committed
57 58 59 60 61
Additive
========

* 1822 Joseph Fourier showed that some functions can be written as a sum of sines
* Using harmonics we can build up a variety of timbres
dkah's avatar
dkah committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75
* Theoretically we could use arbitrary many sines to reconstruct almost all sounds

----

:data-x: r0
:data-y: r500
:data-scale: 0.1

Saw Wave
========

.. image:: img/sawtooth.png
    :height: 350px
    :align: right
dkah's avatar
dkah committed
76 77 78

----

dkah's avatar
dkah committed
79 80 81 82
Envelopes
=========

* eternal sound vs defined notes
83
* most common ist ADSR (attack - decay - sustain - release)
dkah's avatar
dkah committed
84 85 86 87 88 89 90

.. image:: img/envelope.svg
    :height: 400px
    :align: right

----

dkah's avatar
dkah committed
91

dkah's avatar
dkah committed
92 93 94 95 96
Subtractive
===========

* Source with a broad spectrum -> noise
* Filter too thin out spectrum
dkah's avatar
dkah committed
97 98
* More "natural" sound
* Modular analog synthesizer
dkah's avatar
dkah committed
99
* Needs good filters
100

dkah's avatar
dkah committed
101 102 103

----

104 105
Some other Methods
==================
dkah's avatar
dkah committed
106

107 108 109
* Frequency Modulation
* Amplitude Modulation
* Physical Modelling
dkah's avatar
dkah committed
110 111 112 113 114 115

----

Granular Synthesis
==================

116
* A physical model of sound
dkah's avatar
dkah committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
* Denis Gabor 1947 : Acoustical quanta and the theory of hearing
* Based on grains or wave packages
* Analog to photons for light, proposed quanta for sound
* Psychoaccoustic : ear like the eye has resolution limits, granular synthesis plays with this

----

A grain
=======

.. image:: img/truax.gif
    :height: 200px
    :align: right

Has a source wave (with its own frequency), wraped in an envelope.

Both have various parameter that can be changed and influence the timbre.

----

Heaps of grains
===============

There is seldomly one grain, but mostly lots of grains.

How dense, homogenous, etc.  this grain clouds are changes the timbre and the way we perceive the sound.

144 145 146 147 148 149
----

Spectrum
========

.. image:: img/grains_spectrum.png
150
   :height: 600px
151 152 153
   :align: right


dkah's avatar
dkah committed
154 155 156 157 158 159 160 161 162 163
----

Pioneers of Granular Synthesis
==============================

* Curtis Roads : Microsound
* Iannis Xenakis
* Trevor Whishart
* B Truax
* Brandtsegg, Saue, Johansen : Partikkel Opcode in CSound
164 165 166 167 168

----

CSound
======
dkah's avatar
dkah committed
169

170 171 172 173 174 175 176
----

History
=======
* 1957 first computer sound synthesis at Bell Labs by Max Mathews -> MUSIC I
* Until 1970s MUSIC 11 by  Barry Vercoe
* Around 1986 Barry Vercoe wrote the first CSound based on C
dkah's avatar
dkah committed
177
* CSound constantly incorporates new ideas
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

----

Example Program
===============

.. image:: img/csound.png
    :height: 600px

----

CSound Alternatives
===================

Freeware
--------

* Sonic Pi
* Pure Data
* Supercollider
198

dkah's avatar
dkah committed
199 200 201 202 203
Commercial
----------

* Max/MSP

204 205
----

206
:data-scale: 2
207
:data-x: r0
208
:data-y: r2000
209

210 211 212 213 214 215 216 217 218 219 220 221 222
What can we do with "run of the mill" technology?
=================================================

Constraints:
------------

* No specific network technologies
* No specific networking hardware
* No low level networking software

----


223
Experimental Setup
224
==================
225 226

Ingredients
227
-----------
228 229 230

* Elixir_ / Phoenix_ / Erlang_ VM
* WebSockets_
231
* Processing_ / P5_
232 233
* Open Sound Control (OSC_)
* CSound_
234
* A certain amount of crazyness
235 236 237 238 239 240 241 242
* You and your mobile phone

.. _Elixir: http://elixir-lang.org
.. _Phoenix: http://www.phoenixframework.org
.. _Erlang: http://www.erlang.org
.. _WebSockets: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API
.. _OSC: https://en.wikipedia.org/wiki/Open_Sound_Control
.. _CSound: http://csound.github.io
243 244
.. _Processing: http://processing.org
.. _P5: http://p5js.org
245 246 247

----

248

249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
Overview
========


.. image:: img/overview.png

----

Server
======

* Ubuntu Server running on SWITCHengines in Zurich
* Elixir / Phoenix software
* Receiving data from mobile clients (30 msgs / second / client) via WebSockets
* Keeping state
* Sending data to Laptop on Stage

----

Visualisation Client
--------------------

* JavaScript receives position data from server
* Calculates visualisation (flocking behaviour) with Processing
* Generates OpenSoundControl (OSC) messages, sends them via Websocket
* Node.js Program translates OSC messages from Websocket to UDP
* CSound Software listens to OSC messages and generates grains
* Audio is sent via USB to Sound Laptop

----

Sound Laptop
------------

* Various MIDI Controllers connected
* MainStage software creates virtual mixing desk
* Software Synths / Digital Effects
* Mixes Audio from CSound with Effects
* Sends Audio to Conference Hall PA


----

iPad Pro
--------

* Played by Dragica in Lucerne, Switzerland who (hopefully) sees &
  hears what we are doing here
* Runs various musical software
* Sound via Video-Conference, patched to Conference Hall PA

300

301 302
----

303 304 305 306 307 308 309 310 311
OpenSourced
===========

All code is available on http://gitlab.switch.ch/grains

(good luck in getting it working though ;) )

----

312 313 314 315 316
What could possibly go wrong?
=============================

----

317 318 319 320
Audience Participation
======================

Go To http://grains.switch.ch
321
-----------------------------
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344

----


Dragica Kahlina
===============

* Theoretical Physicist Uni Basel
* Lecturer Digital Ideation HSLU
* Sound Artist

@gluggergames

----

Jens-Christian Fischer
======================

* MscIT University Liverpool
* Lecturer Web ZHAW
* Product Manager SWITCHengines

@jcfischer