Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dubstep in Ruby with Sonic Pi

Dubstep in Ruby with Sonic Pi

(Or how to combine Ruby, Education and Audio Synthesis for fun and profit)

Links:

Download Sonic Pi RC: http://sonic-pi.net/get-v2.0
Computer Science: A curriculum for schools 2012: http://www.computingatschool.org.uk/data/uploads/ComputingCurric.pdf
Video explaining harmonics: http://www.mindbites.com/lesson/4603-physics-in-action-standing-waves-on-a-rope

Gists
recreating the thx deep note in 30 lines: https://gist.github.com/xavriley/418f8283af2fbe95fc90

Funky drummer: https://gist.github.com/xavriley/dd6b61c24c3aed28c892

ASCII Drum tab player: https://gist.github.com/xavriley/cdacb93dc127eafd1f16

Wobble bass: https://gist.github.com/xavriley/92dbba5de1c78177c33d

Auto dubstep: https://gist.github.com/xavriley/71b255775829b486249b

xavriley

June 10, 2014
Tweet

More Decks by xavriley

Other Decks in Programming

Transcript

  1. Computer Science: A curriculum for schools endorsed by * Google

    * Microsoft * Intellect (UK STEM trade assoc.) Computer Science: A curriculum for schools 2012 Tuesday, 10 June 14
  2. “ It is practically impossible to teach good programming to

    students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. Edsger Dijkstra Tuesday, 10 June 14
  3. “Ah, music,” he said, wiping his eyes. “A magic far

    beyond all we do here!” Albus Dumbledore Tuesday, 10 June 14
  4. made for classrooms designed for Raspberry Pi simple and fun

    to program Making Computer Science Audible Tuesday, 10 June 14
  5. lets you synthesize audio in *RUBY* a “real” language with

    transferable skills that’s FUN to program in Tuesday, 10 June 14
  6. ALL ABOUT WAVES (we need to know this to make

    wobble bass later...) Tuesday, 10 June 14
  7. Any sound can be recreated with enough sine waves see

    Fourier Transform Tuesday, 10 June 14
  8. comb filter, sawtooth, square wave, eq, pitchshift, flange, phase cancellation,

    reverb, distortion, zawa, 808, audio rates, control rates, LFO, slicer, delay, compression, FFT, pink noise, brown noise, white noise, wave shaping, red-and- yellow-and-pink-and-green-noise... Tuesday, 10 June 14
  9. comb filter, sawtooth, square wave, eq, pitchshift, flange, phase cancellation,

    reverb, distortion, zawa, 808, audio rates, control rates, LFO, slicer, delay, compression, FFT, pink noise, brown noise, white noise, wave shaping, red-and- yellow-and-pink-and-green-noise... Ask me on twitter Tuesday, 10 June 14
  10. samples You can also use any .wav file that’s available

    via a local filepath Tuesday, 10 June 14
  11. for people just viewing slides I’m linking to gists of

    all my examples recreating the thx deep note in 30 lines: https:// gist.github.com/xavriley/418f8283af2fbe95fc90 Funky drummer: https://gist.github.com/xavriley/ dd6b61c24c3aed28c892 ASCII Drum tab player: https://gist.github.com/xavriley/ cdacb93dc127eafd1f16 Wobble bass: https://gist.github.com/xavriley/ 92dbba5de1c78177c33d Auto dubstep: https://gist.github.com/xavriley/ 71b255775829b486249b Tuesday, 10 June 14