Download - Dynamic Sound for Android
![Page 1: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/1.jpg)
Dynamic Audio For Apps and Games
slides: is.gd/dynamic_sound_android
code: github.com/thillerson/dynamic-sound-android
![Page 3: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/3.jpg)
Presentation tackmobile.com
is.gd/dynamic_sound_android !
github.com/thillerson/dynamic-sound-android !
![Page 4: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/4.jpg)
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)
![Page 5: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/5.jpg)
Presentation tackmobile.com
Rawk Star
About Me
![Page 6: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/6.jpg)
Presentation tackmobile.com
About Me
• Bass
• Electronic Music
• Some day I hope to play this thing --------->
![Page 7: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/7.jpg)
Presentation tackmobile.com
Sound Design Work: Start
• Alarm App
• Alarm Sounds
• Play Store: “tackmobile”
![Page 8: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/8.jpg)
Presentation tackmobile.com
Sound Design Work: Adrift
• Puzzle Game - “Adrift” in App Store
• Background Music soundcloud.com/tackmobile
• Sound Effects
![Page 9: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/9.jpg)
Presentation tackmobile.com
Programming Sound
• http://pragprog.com/book/thsound
• What we’re talking about today...
• ... and much more
![Page 10: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/10.jpg)
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
![Page 11: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/11.jpg)
Presentation tackmobile.com
What is Sound Design?
![Page 12: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/12.jpg)
Presentation tackmobile.com
A Sound Designer
Ben Burtt
![Page 13: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/13.jpg)
Presentation tackmobile.com
A Sound Designer...
• Conceptualizes
• Captures or Designs
• Records
• Engineers
• Produces
• ... the sound for an experience
![Page 14: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/14.jpg)
Presentation tackmobile.com
Sound Designer Skills
• Understand Sound
• Intuitive vs. Theoretical
• Music vs. Sound
• Audio Engineering
![Page 15: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/15.jpg)
Presentation tackmobile.com
Sound Design in Mobile Apps
• Developers/Designers wear lots of hats
• Control
• Efficiency
• Asset size
![Page 16: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/16.jpg)
Presentation tackmobile.com
Sound Design Principles
![Page 17: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/17.jpg)
Presentation tackmobile.com
A Sound Designer’s Goals
• Audible Feedback
• Fulfill Expectations
• Immersion
• Emotional Response
![Page 18: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/18.jpg)
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!
![Page 19: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/19.jpg)
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
![Page 20: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/20.jpg)
Presentation tackmobile.com
A Good Example: Clear
• Realmac Software
• Josh Mobley
• Meaningful Sound
• demo
![Page 21: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/21.jpg)
Presentation tackmobile.com
Sound
![Page 22: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/22.jpg)
Presentation tackmobile.com
Longitudinal Waves
![Page 23: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/23.jpg)
Presentation tackmobile.com
Of Pressure
![Page 24: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/24.jpg)
Presentation tackmobile.com
Through A Medium
![Page 25: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/25.jpg)
Presentation tackmobile.com
Transverse Wave
Longitudinal Wave
![Page 26: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/26.jpg)
Presentation tackmobile.com
• Longitudinal Waves
• Of Pressure
• Through a Medium
Sound
![Page 27: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/27.jpg)
Presentation tackmobile.com
Properties of Waves
• A - Wavelength (Distance), Period (Time)
• B - Amplitude
• C - Frequency - 1/Period (measured in Hertz)
A
B
B
C 1 2 3
![Page 28: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/28.jpg)
Presentation tackmobile.com
Fourier Series
• Based on his work ------->
• Periodic signals composedof simple oscillatingfunctions
• Sine/Cosine waves arefundamental
![Page 29: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/29.jpg)
Presentation tackmobile.com
Oscillators
• Something that moves according to a periodic function
• A physical body
• An electronic device
![Page 30: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/30.jpg)
Presentation tackmobile.com
Basic Electronic Sound
oscillator
voltage
magnet
pressurewaves
speaker
![Page 31: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/31.jpg)
Presentation tackmobile.com
Digital Audio
• Stream of Numbers
• Signal
• Frequency and Amplitude
• DAC - Digital to Analog Converter
![Page 32: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/32.jpg)
Presentation tackmobile.com
Dynamic Audio
![Page 33: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/33.jpg)
Presentation tackmobile.com
Procedural Audio
• Functions
• Objects
• Controls and Components
• Produce a Signal
• “Building Sound from First Principles”
![Page 34: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/34.jpg)
Presentation tackmobile.com
Pure Data
• Procedural Audio
• Visual Programming Environment
• Free and Open Source
• pure-data.info
![Page 35: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/35.jpg)
Presentation tackmobile.com
Pure Data 101
![Page 36: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/36.jpg)
Presentation tackmobile.com
Signals and Values
• Signals are streams of numbers, usually audio data
• Values are numbers or symbols
![Page 37: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/37.jpg)
Presentation tackmobile.com
• Pd’s class
• or, kind of like a command line tool
Objects
osc~ 440
signal inlet inlet
signal outlet
class name arguments
![Page 38: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/38.jpg)
Presentation tackmobile.com
Hot vs Cold Inlets
• Hot inlets make objects immediately act
• Cold inlets usually store a value
• Execution order is right to left
![Page 39: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/39.jpg)
Presentation tackmobile.com
• Signal connections are thick
• Others are thin
Connections
osc~ 440
*~
dac~
1
![Page 40: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/40.jpg)
Presentation tackmobile.com
Messages
• Used for sending values without a connection
• [send] and [receive] objects
• Message boxes
![Page 41: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/41.jpg)
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
![Page 42: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/42.jpg)
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
![Page 43: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/43.jpg)
Presentation tackmobile.com
Examples
![Page 44: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/44.jpg)
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
![Page 45: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/45.jpg)
Presentation tackmobile.com
libpd and gradle
• At this time there’s no official support yet
• github.com/libpd/pd-for-android/pull/7 adds support.
• I have not tested this yet
![Page 46: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/46.jpg)
Presentation tackmobile.com
Example 1: A Simple Keyboard
• Sine wave oscillator
• Single voice
• Note on/off
![Page 47: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/47.jpg)
Presentation tackmobile.com
Example 1: A Simple Keyboard Patch
osc~
dac~
receive midinote
mtof receive gate
line~
*~
;
midinote 60;
gate 1;
;
gate 0$1 1
![Page 48: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/48.jpg)
Presentation tackmobile.com
Example 2: Space Rocks
• Side scroller space shooter
• Very simple implementation - not production ready game code
• With dynamic sound!
![Page 49: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/49.jpg)
Presentation tackmobile.com
Example 2: A Game Patchload a square waveat startup
Thruster
noise~
*~
samphold~
dac~
hip~ 200
phasor~ 800
line~
$1 200
*~ 0.1
receive thruster
BulletShip_HitAsteroid_Hit
samphold~
tabosc4~ square
dac~
line~
phasor~ 8000
tabosc4~ square
line~
unpack f f
0 $1
tabosc4~ square
line~
unpack f f
0 $1
hip~ 1000
unpack f f
0 $1
*~ 0.5
receive asteroid receive ship receive bullet
8-bit-ifythese sounds
cut low frequencies
commentcomment
Test_Messages;bullet 25 200;
;thruster 0
;thruster 1
pd wavesetup
;ship 1000 50;
;asteroid 200 100;
![Page 50: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/50.jpg)
Presentation tackmobile.com
Programming Sound• http://pragprog.com/
book/thsound
![Page 51: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/51.jpg)
Presentation tackmobile.com
Further Reading
• puredata.info && libpd.cc
• youtube.com/user/cheetomoskeeto
• http://designingsound.org
• mitpress.mit.edu/books/designing-sound
![Page 52: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/52.jpg)
Presentation tackmobile.com
Questions
![Page 53: Dynamic Sound for Android](https://reader033.vdocuments.site/reader033/viewer/2022060110/555a2859d8b42a900d8b49f7/html5/thumbnails/53.jpg)
Thank you!Dynamic Audio • Tony Hillerson
• We’re Hiring!
• Excellent Team
• Awesome Projects
• Great Office