Dynamic Sound for Android
Upcoming SlideShare
Loading in...5
×
 

Dynamic Sound for Android

on

  • 853 views

Slides for my AnDevCon talk from fall 2013, covering Pure Data from an Android app or game developer's perspective

Slides for my AnDevCon talk from fall 2013, covering Pure Data from an Android app or game developer's perspective

Statistics

Views

Total Views
853
Views on SlideShare
853
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dynamic Sound for Android Dynamic Sound for Android Presentation Transcript

  • Dynamic Audio For Apps and Games slides: is.gd/dynamic_sound_android code: github.com/thillerson/dynamic-sound-android
  • is.gd/ dynamic_sound_android Presentation tackmobile.com
  • is.gd/ dynamic_sound_android ! github.com/thillerson/ dynamic-sound-android ! Presentation tackmobile.com
  • About Me • @thillerson, +thillerson • Developer at Tack Mobile
 (tackmobile.com), @tackmobile • Android, iOS, and Mobile Web • Rails, Node, maybe Elixir (one day) Presentation tackmobile.com
  • About Me Rawk Star Presentation tackmobile.com
  • About Me • Bass • Electronic Music • Some day I hope to play this thing
 ---------> Presentation tackmobile.com
  • Sound Design Work: Start • Alarm App • Alarm Sounds • Play Store: “tackmobile” Presentation tackmobile.com
  • Sound Design Work: Adrift • Puzzle Game - “Adrift” in App Store • Background Music 
 soundcloud.com/tackmobile • Sound Effects Presentation tackmobile.com
  • Programming Sound • • In Beta • What we’re talking about today... • Presentation http://pragprog.com/ ... and much more tackmobile.com
  • What We’re Going To Do Today • Answer: What Is Sound Design? • Discuss UX Principles of Sound Design • Introduce Pure Data • Introduce libpd • Tour Two iOS Apps Embedding Pd Presentation tackmobile.com
  • When We Are Done, You Will • Understand Sound Design • Understand Procedural Audio • Know what Pd is, and how libpd makes it awesome • Be excited about Dynamic Audio in your apps and games Presentation tackmobile.com
  • What is Sound Design? Presentation tackmobile.com
  • A Sound Designer Ben Burtt Presentation tackmobile.com
  • A Sound Designer... • Conceptualizes • Captures or Designs • Records • Engineers • Produces • ... the sound for
 an experience Presentation tackmobile.com
  • Sound Designer Skills • Understand Sound • Intuitive vs. Theoretical • Music vs. Sound • Audio Engineering Presentation tackmobile.com
  • Sound Design in Mobile Apps • Developers/Designers wear lots of hats • Control • Efficiency • Asset size Presentation tackmobile.com
  • Sound Design Principles Presentation tackmobile.com
  • A Sound Designer’s Goals • Audible Feedback • Fulfill Expectations • Immersion • Emotional Response Presentation tackmobile.com
  • Sound Design and Good UX • Your app doesn’t need sound • Expect to be turned off • Don’t make me listen to you • Listen on lots of devices/environments • Engineer for small speakers • Make your sound mean something! Presentation tackmobile.com
  • Always • Test with phone calls • Test while playing music • Have fallbacks - e.g. No music, just effects • Provide control to the user Presentation tackmobile.com
  • A Good Example: Clear • Realmac Software • Josh Mobley • Meaningful Sound • demo Presentation tackmobile.com
  • Sound Presentation tackmobile.com
  • Longitudinal Waves Presentation tackmobile.com
  • Of Pressure Presentation tackmobile.com
  • Through A Medium Presentation tackmobile.com
  • Transverse Wave Longitudinal Wave Presentation tackmobile.com
  • Sound • Longitudinal Waves • Of Pressure • Through a Medium Presentation tackmobile.com
  • Properties of Waves A B B C 1 2 • A - Wavelength (Distance), Period (Time) • B - Amplitude • 3 C - Frequency - 1/Period (measured in Hertz) Presentation tackmobile.com
  • Fourier Series • Based on his work -------> • Periodic signals composed
 of simple oscillating
 functions • Sine/Cosine waves are
 fundamental Presentation tackmobile.com
  • Oscillators • Something that moves according to a periodic function • A physical body • An electronic device Presentation tackmobile.com
  • Basic Electronic Sound magnet voltage pressure
 waves oscillator speaker Presentation tackmobile.com
  • Digital Audio • Stream of Numbers • Signal • Frequency and Amplitude • DAC - Digital to Analog Converter Presentation tackmobile.com
  • Dynamic Audio Presentation tackmobile.com
  • Procedural Audio • Functions • Objects • Controls and Components • Produce a Signal • “Building Sound from First Principles” Presentation tackmobile.com
  • Pure Data • Procedural Audio • Visual Programming Environment • Free and Open Source • pure-data.info Presentation tackmobile.com
  • Pure Data 101 Presentation tackmobile.com
  • Signals and Values • Signals are streams of numbers, usually audio data • Values are numbers or symbols Presentation tackmobile.com
  • Objects • Pd’s class • or, kind of like a command line tool signal inlet class name osc~ 440 inlet arguments signal outlet Presentation tackmobile.com
  • Hot vs Cold Inlets • Hot inlets make objects immediately act • Cold inlets usually store a value • Execution is right to left Presentation tackmobile.com
  • Connections • Signal connections are thick • Others are thin osc~ 440 1 *~ dac~ Presentation tackmobile.com
  • Messages • Used for sending values without a connection • [send] and [receive] objects • Message boxes Presentation tackmobile.com
  • libpd • http://libpd.cc • Peter Brinkmann - Google Engineer • Enables you to embed an instance of Pd in your app • iOS and Android Presentation tackmobile.com
  • libpd for Android • Patches should be compressed raw resources • Utilities for dealing with patches • Provides interfaces for audio management • PdBase bridges to Pd • Pass messages, floats, and lists • Provides PdService for long running audio Presentation tackmobile.com
  • Examples Presentation tackmobile.com
  • Source Code • github.com/thillerson/dynamic-sound-android • Examples of capabilities, not necessarily the best architecture • Goal: understand capabilities, have a place to start Presentation tackmobile.com
  • Example 1: A Simple Keyboard • Sine wave oscillator • Single voice • Note on/off • Great example of Android screen latency! Presentation tackmobile.com
  • Example 1: A Simple Keyboard Patch receive midinote mtof osc~ receive gate ; midinote 60; gate 1; $1 1 ; gate 0 line~ print *~ dac~ Presentation tackmobile.com
  • Example 2: Space Rocks • Side scroller space shooter • Very simple implementation - not production ready game code • With dynamic sound! Presentation tackmobile.com
  • Example 2: A Game Patch pd wavesetup load a square wave at startup Test_Messages Thruster ; asteroid 200 100; ; ship 1000 50; ; thruster 1 noise~ Bullet receive asteroid receive ship receive bullet unpack f f 0 $1 receive thruster Ship_Hit unpack f f ; bullet 25 200; Asteroid_Hit 0 $1 unpack f f $1 200 0 $1 line~ *~ samphold~ phasor~ 800 line~ line~ tabosc4~ square tabosc4~ square line~ tabosc4~ square *~ 0.1 ; thruster 0 *~ 0.5 hip~ 200 comment comment dac~ phasor~ 8000 samphold~ 8-bit-ify these sounds hip~ 1000 cut low frequencies dac~ Presentation tackmobile.com
  • Programming Sound Presentation • http://pragprog.com/ book/thsound tackmobile.com
  • Further Reading • puredata.info && libpd.cc • youtube.com/user/cheetomoskeeto • http://designingsound.org • mitpress.mit.edu/books/designing-sound Presentation tackmobile.com
  • Questions Presentation tackmobile.com
  • Thank you! Dynamic Audio • Tony Hillerson • We’re Hiring! • careers@tackmobile.com • Excellent Team • Awesome Projects • Great Office