Presentation is loading. Please wait.

Presentation is loading. Please wait.

Phun With Sound Basic Concepts For Hardware (and other) Hackers.

Similar presentations


Presentation on theme: "Phun With Sound Basic Concepts For Hardware (and other) Hackers."— Presentation transcript:

1 Phun With Sound Basic Concepts For Hardware (and other) Hackers

2 You Don’t Know What This Is But you want to!

3 This Circuit Board Made this famous riff

4 Phun With Sound Combo talk, covering: – Intro to sound – Some basics of synthesizers – Making sounds with microcontrollers

5 What is Sound? Modulated air pressure Frequency of modulation is pitch Amplitude is volume Waveforms can be defined (and created) with math

6 More Sound Basics Unit of frequency is Hertz (Hz) Unit of sound energy is decibel Human hearing is around 20 Hz to 20 kHz Phreak bonus: who is the unit of sound level named for?

7 Basic Waveforms Sine Triangle Square

8 Some Math Sine is the “purest” waveform both in math and acoustical presentation: f(x) = sin(x) Square waves are an infinite summation of sine waves: All those terms beyond the fundamental frequency are “harmonics”

9 More Square Wave

10 Some Examples Using the SH101 analog synthesizer – Sine – Square – Triangle – PWM Microcontrollers driving motors often use PWM…

11 Pulse Width Modulation PWM: fixed period, changing duty cycle Used as motor drive, DAC, and in sound synthesis (and others) Back to the square wave function… …does changing duty cycle change harmonics? YES! Bonus: what’s a 100% duty cycle PWM called?

12 Phun With Harmonics Subtractive Synthesis – Start with a signal with lots of harmonics – Filter it! Low pass filter

13 More Filtering Traditional analog synths use voltage controlled filters VCF Modern synths use digital filters running on DSPs

14 The Filter Sweep Classic electronica music effect

15 Triangle Man (Delta) Non-changing waveforms sound dull, even irritating ∆ Sounds more interesting How to implement change? – LFO, repeatable change – “Random” change

16 Art of Noise Noise is random Pseudo-random isn’t random, nor noise What does it sound like? – Noise on the SH101 – Pseudo-random on the SH101 – How the pros use pseudo-random influences InfoSec tie-in: see how limited pseudo- random is a bad choice for seeding crypto?

17 Making Sound With Microcontrollers Two basic approaches: – Synthesis – Sample playback Two areas of concern: – Hardware – Firmware

18 Making Sound With Microcontrollers: Firmware Synthesis options – Hardware based (waveform into VCF) – Math based (calculations in firmware) Sample option – Look up table – Can be waveform data (sine, triangle, DTMF) – Can also be “sample” in the sense of digital recording

19 Microcontrollers: Hardware Synthesis options – Output waveform and control of external elements (VCF, VCA) – Heavily filtered square wave – DAC…

20 Microcontrollers: Hardware Sampled sound needs DAC – Filtered PWM, single output pin, HW controlled – DAC Ladder, multiple output pins, simple interface – DAC hardware, multiple i/o pins, complex interface

21 Example: DEFCON 18 Badge Hack What happens when you combine: – DC18 Badge – Beer – Pr0n – Top engineers from famous comm corp – And me? The Optimized Tomfoolery DC18 badge hack entry! (Kingpin approved!) The Hacker Jeopardy answer is: “Hey, what’s the input impedance of an LM386?”

22 DEFCON Badge Hack Limited microcontroller code space… …and limited hardware options (no PWM) Sampled desired sound to get.wav Edit.wav to get C #include Crude R-2R ladder DAC (considered other methods) Play samples back from codespace 4-bit low sample rate, was recognizable!

23 DC18 Badge Hack Tools used: – Audacitiy: sound recording manipulation tool – Lame: mpg recorder option for Audacity – HxD: hex editor – Code Warrior: microcontroller IDE Search youtube for “DC18 Theater” for Kingpin’s video of our entry (NSFW!)

24 ¿Questions?


Download ppt "Phun With Sound Basic Concepts For Hardware (and other) Hackers."

Similar presentations


Ads by Google