E40M Sound and Music. M. Horowitz, J. Plummer, R. Howe 1

Similar documents
E40M Sound and Music. M. Horowitz, J. Plummer, R. Howe 1

Physics 115 Lecture 13. Fourier Analysis February 22, 2018

Signals. Periodic vs. Aperiodic. Signals

Laboratory Assignment 4. Fourier Sound Synthesis

Chapter 4 Applications of the Fourier Series. Raja M. Taufika R. Ismail. September 29, 2017

SAMPLING THEORY. Representing continuous signals with discrete numbers

Introduction to Telecommunications and Computer Engineering Unit 3: Communications Systems & Signals

Structure of Speech. Physical acoustics Time-domain representation Frequency domain representation Sound shaping

Midterm 1. Total. Name of Student on Your Left: Name of Student on Your Right: EE 20N: Structure and Interpretation of Signals and Systems

Signals A Preliminary Discussion EE442 Analog & Digital Communication Systems Lecture 2

Lecture 2: SIGNALS. 1 st semester By: Elham Sunbu

Signal Characteristics

Michael F. Toner, et. al.. "Distortion Measurement." Copyright 2000 CRC Press LLC. <

Data Acquisition Systems. Signal DAQ System The Answer?

Laboratory Project 4: Frequency Response and Filters

Lab 4: Transmission Line

Chapter 2. Meeting 2, Measures and Visualizations of Sounds and Signals

Chapter 3 Data and Signals 3.1

E40M. RC Filters. M. Horowitz, J. Plummer, R. Howe 1

Spectrum Analysis: The FFT Display

Lecture Fundamentals of Data and signals

Data Transmission. ITS323: Introduction to Data Communications. Sirindhorn International Institute of Technology Thammasat University ITS323

Review of Lecture 2. Data and Signals - Theoretical Concepts. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2

MUSC 316 Sound & Digital Audio Basics Worksheet

Chapter 2. Signals and Spectra

Lab 6: Building a Function Generator

Terminology (1) Chapter 3. Terminology (3) Terminology (2) Transmitter Receiver Medium. Data Transmission. Direct link. Point-to-point.

Data Communication. Chapter 3 Data Transmission

A mechanical wave is a disturbance which propagates through a medium with little or no net displacement of the particles of the medium.

Advanced Audiovisual Processing Expected Background

Modulation. Digital Data Transmission. COMP476 Networked Computer Systems. Analog and Digital Signals. Analog and Digital Examples.

8.3 Basic Parameters for Audio

Trigonometric functions and sound

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 4

Musical Acoustics, C. Bertulani. Musical Acoustics. Lecture 13 Timbre / Tone quality I

CS101 Lecture 18: Audio Encoding. What You ll Learn Today

TEAK Sound and Music

14 fasttest. Multitone Audio Analyzer. Multitone and Synchronous FFT Concepts

Lab 4 Digital Scope and Spectrum Analyzer

Fundamentals of Music Technology

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

COMP211 Physical Layer

Wavelets and wavelet convolution and brain music. Dr. Frederike Petzschner Translational Neuromodeling Unit

A102 Signals and Systems for Hearing and Speech: Final exam answers

Lab 9 Fourier Synthesis and Analysis

The quality of the transmission signal The characteristics of the transmission medium. Some type of transmission medium is required for transmission:

Lecture 7: Superposition and Fourier Theorem

THE CITADEL THE MILITARY COLLEGE OF SOUTH CAROLINA. Department of Electrical and Computer Engineering. ELEC 423 Digital Signal Processing

Chapter 12. Preview. Objectives The Production of Sound Waves Frequency of Sound Waves The Doppler Effect. Section 1 Sound Waves

Terminology (1) Chapter 3. Terminology (3) Terminology (2) Transmitter Receiver Medium. Data Transmission. Simplex. Direct link.

Sound is the human ear s perceived effect of pressure changes in the ambient air. Sound can be modeled as a function of time.

AP Physics B (Princeton 15 & Giancoli 11 & 12) Waves and Sound

Waves & Interference

Sampling and Reconstruction of Analog Signals

Chapter 3 Data Transmission COSC 3213 Summer 2003

Tabor Electronics Signal Amplifiers. Quick Start Guide

Chapter4: Superposition and Interference

Fundamentals of Digital Audio *

Lab 2: Capacitors. Integrator and Differentiator Circuits

Musical Acoustics, C. Bertulani. Musical Acoustics. Lecture 14 Timbre / Tone quality II

Computer Networks. Practice Set I. Dr. Hussein Al-Bahadili

EE42: Running Checklist of Electronics Terms Dick White

Music 171: Sinusoids. Tamara Smyth, Department of Music, University of California, San Diego (UCSD) January 10, 2019

ECE 201: Introduction to Signal Analysis

MASSACHUSETTS INSTITUTE OF TECHNOLOGY /6.071 Introduction to Electronics, Signals and Measurement Spring 2006

Final Exam Study Guide: Introduction to Computer Music Course Staff April 24, 2015

Additive Synthesis OBJECTIVES BACKGROUND

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

BIOE 123 Module 3. Electronics 2: Time Varying Circuits. Lecture (30 min) Date. Learning Goals

Designing Information Devices and Systems II Fall 2017 Miki Lustig and Michel Maharbiz Homework 3

Data Communications & Computer Networks

Signals, systems, acoustics and the ear. Week 3. Frequency characterisations of systems & signals

Using PWM Output as a Digital-to-Analog Converter on a TMS320C240 DSP APPLICATION REPORT: SPRA490

ENGR 210 Lab 12: Sampling and Aliasing

EECS 216 Winter 2008 Lab 2: FM Detector Part II: In-Lab & Post-Lab Assignment

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics 8.02 Spring 2005 Experiment 10: LR and Undriven LRC Circuits

Acoustics, signals & systems for audiology. Week 3. Frequency characterisations of systems & signals

Definition of Sound. Sound. Vibration. Period - Frequency. Waveform. Parameters. SPA Lundeen

CHAPTER 2! AMPLITUDE MODULATION (AM)

Digital Design Laboratory Lecture 7. A/D and D/A

Series and Parallel Resonance

Experiment No. 6. Audio Tone Control Amplifier

Acoustics, signals & systems for audiology. Week 4. Signals through Systems

g L f = 1 2π Agenda Chapter 14, Problem 24 Intensity of Sound Waves Various Intensities of Sound Intensity Level of Sound Waves

Chapter 16. Waves and Sound

Chapter 3. Amplitude Modulation Fundamentals

CS 591 S1 Midterm Exam

Introduction to Communications Part Two: Physical Layer Ch3: Data & Signals

Data Communications and Networks

MUS 302 ENGINEERING SECTION

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

Lab 4 Fourier Series and the Gibbs Phenomenon

UNIT-2 Angle Modulation System

Sampling and Reconstruction

ME scope Application Note 01 The FFT, Leakage, and Windowing

describe sound as the transmission of energy via longitudinal pressure waves;

Signals and Systems EE235. Leo Lam

Chapter 2. Fourier Series & Fourier Transform. Updated:2/11/15

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

Complex Sounds. Reading: Yost Ch. 4

Transcription:

E40M Sound and Music M. Horowitz, J. Plummer, R. Howe 1

LED Cube Project #3 In the next several lectures, we ll study Concepts Coding Light Sound Transforms/equalizers Devices LEDs Analog to digital converters Music responsive LED Cube https://www.youtube.com/watch?v=frxdtiohfli&feature=youtu.be M. Horowitz, J. Plummer, R. Howe 2

What is Sound Anyway? It is a pressure wave that moves in air Created by voice, instruments, speakers http://www.mediacollege.com/audio/01/sound-waves.html M. Horowitz, J. Plummer, R. Howe 3

How Does a Speaker Create Sound? Electrical signals from a sound system pass through the electromagnet attached to the speaker. The electromagnet is attracted or repelled by the permanent magnet, causing the speaker to vibrate, creating sound waves Power 100W stereo, Speakers are 8 Ω Vi =100; i=v/r V 2 = 800, so V swing > +/- 30V http://www.explainthatstuff.com/loudspeakers.html M. Horowitz, J. Plummer, R. Howe 4

Sensors are Everywhere and Produce Electrical Signals Sound pressure converted to voltage vs. time Electrical signals plotted as voltage vs. time Voltage Time M. Horowitz, J. Plummer, R. Howe 5

Sound As An Electrical Signal Microphone output (voice) Music How do we analyze the response of circuits to signals like this? M. Horowitz, J. Plummer, R. Howe 6

Calculating Circuit behavior Voltage Circuit Output??? Time We could construct the output signal by considering the input at each time t and construct the output point by point. This could get pretty tedious! Maybe there s another way to think about this? M. Horowitz, J. Plummer, R. Howe 7

BREAKING DOWN SIGNALS INTO FREQUENCY COMPONENTS M. Horowitz, J. Plummer, R. Howe 8

Representing Signals In Different Ways We could represent sound or other signals as a string of numbers Which represent voltage at different times Our brain doesn t process sound that way We think and talk about sound/music as combinations of tones Summation of different sinewaves And you can represent sound this way too All signals can be represented in two ways Voltages in time Sum of tones of different amplitudes and frequencies M. Horowitz, J. Plummer, R. Howe 9

Representing Signals Voltage Time + M. Horowitz, J. Plummer, R. Howe 10

Sound as Tones We perceive sound as a composition of tones Each tone is a sine wave of pressure Which is a sinewave in voltage The funny waveforms that we see in time Can be created by adding many tones (sinewaves) together M. Horowitz, J. Plummer, R. Howe 11

Relating Voltage to Sinewaves - Demo Java applet from: https://phet.colorado.edu/en/simulation/legacy/fourier But most browsers won t run it any more (security issues) You may have to override security features in your browser to run it after you download it. Allows you to create waveform and see tones Or add tones and see waveform Let s play with it a little bit M. Horowitz, J. Plummer, R. Howe 12

Relating Voltage to Sinewaves - Demo M. Horowitz, J. Plummer, R. Howe 13

Equalizers We have all seen this type of display What information does it represent? M. Horowitz, J. Plummer, R. Howe 14

Setting An Equalizer You might have even played with setting levels Ever think about what you are really doing here? The music is a set of voltages vs. time. M. Horowitz, J. Plummer, R. Howe 15

What You Are Doing Changing the amplitude of sinewaves In different frequency bands Scale is weird db Logarithmic gain, more on that later M. Horowitz, J. Plummer, R. Howe 16

FOURIER SERIES M. Horowitz, J. Plummer, R. Howe 17

Fourier Series The formal name for this alternative representation Officially it only works for repetitive signals Since sine-waves repeat There is an extension for non repetitive signals It is called the Fourier Transform Many people use Fourier series for a block of data And just assume that the block of data repeats That is what the java demo does M. Horowitz, J. Plummer, R. Howe 18

Formal Definition Assuming a signal repeats every T seconds Or we just have T seconds of data to look at... ( ) = a 0 + a n cos 2nπt υ t n=1 T + b n sin 2nπt T The term with n=1 is called the fundamental term It is the lowest frequency that exists in a period of T The other terms are called harmonics They are integer multiples of the fundamental frequency 2πT M. Horowitz, J. Plummer, R. Howe 19

Equation For A Square Wave n=0 1 2n+1 It consists of all odd harmonics sin 2π ( 2n+1 )t T Amplitude falls slowly (as 1/n) M. Horowitz, J. Plummer, R. Howe 20

Frequency Domain Analysis Voltage Circuit Output??? Time If we have a circuit with an input voltage that varies with time, we can figure out what the output of that circuit will be by considering the individual frequency components of the input signal. Superposition will give us the resulting output. M. Horowitz, J. Plummer, R. Howe 21

Frequency Domain Analysis + Circuit Output It s probably not obvious why this approach might make life simpler, but this will become clear starting next week when we talk about circuits that have capacitors and inductors in them. M. Horowitz, J. Plummer, R. Howe 22

Understand what sound is Learning Objectives And how an electronic device stores and generates sound It represents sound as a time varying voltage Understand that we can represent the sound in different ways As a varying voltage vs. time As the sum of different tones Understand how an equalizer works You can amplify/attenuate tones in different bands You can convert from tones to voltages ( ) = a 0 + a n cos 2nπt υ t n=1 M. Horowitz, J. Plummer, R. Howe 23 T + b n sin 2nπt T

Bonus Section (Not on HW, Exams) GENERATING FOURIER COEFFICIENTS M. Horowitz, J. Plummer, R. Howe 24

How To Go From Waveform to Sinewaves? Going from sinewaves to waveform is straightforward. You just add all the sinewaves together. ( ) = a 0 + a n cos 2nπt υ t n=1 T + b n sin 2nπt T But how does one figure out what the various a n and b n are if you have only v(t)? You use an interesting property of sinewaves. M. Horowitz, J. Plummer, R. Howe 25

Product of Sine Functions T dt cos 2nπt 2mπt cos 0 T T Is always zero unless m = n To see why this is true, remember that cos(a+b) = cos(a) cos(b) sin(a) sin(b) Which means cos(a) cos(b) = ½ [cos(a+b) + cos(a-b)] So if m is not equal to n, the product will just be two sinewaves One at the sum of the frequencies and one at the difference When n=m, cos(a-b) = cos(0), so the integral is T/2 M. Horowitz, J. Plummer, R. Howe 26

This Means If v(t) is equal to ( ) = a 0 + a n cos 2nπt υ t n=1 T + b n sin 2nπt T Then if I multiply v(t) by cos(2mπt/t) and integrate from 0,T The only non-zero term will be the term where n = m So the result will be T/2*a m This gives us a way to extract a n b n from v(t) T 0 dt v(t) cos 2mπt T = T 2 a m M. Horowitz, J. Plummer, R. Howe 27

Does n Really go to Infinity? No All signals have limited bandwidth Which means that they have a finite number of sinewaves But the bandwidth of different signals are different And this sets how large n can get For audio signals 20kHz is the limit for human hearing Electronic signals are all over the map Temperature, EKG, might be 100Hz Wireless communication might be 5GHz M. Horowitz, J. Plummer, R. Howe 28

Sampling a Signal Computers don t like dealing with continuous variables They like dealing with numbers It is the only thing they can really handle So to deal with signals that change in time Need to convert them to a series of numbers They do this by measuring the waveform at fixed interval in time M. Horowitz, J. Plummer, R. Howe 29

So How Fast Do You Need To Sample? Remember you need to capture the sinewaves of the signal How many samples do you need per cycle of sine? Nyquist sampled You only need two samples of the high-frequency sinewave M. Horowitz, J. Plummer, R. Howe 30