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

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

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

Physics 115 Lecture 13. Fourier Analysis February 22, 2018

Laboratory Assignment 4. Fourier Sound Synthesis

Signals. Periodic vs. Aperiodic. Signals

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

SAMPLING THEORY. Representing continuous signals with discrete numbers

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

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

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

Spectrum Analysis: The FFT Display

Lab 4 Digital Scope and Spectrum Analyzer

Data Acquisition Systems. Signal DAQ System The Answer?

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

Laboratory Project 4: Frequency Response and Filters

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

Lab 4: Transmission Line

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

Chapter 2. Signals and Spectra

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

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

8.3 Basic Parameters for Audio

Lab 9 Fourier Synthesis and Analysis

Signal Characteristics

Lab 4 Fourier Series and the Gibbs Phenomenon

Lab 6: Building a Function Generator

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

Advanced Audiovisual Processing Expected Background

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

EE42: Running Checklist of Electronics Terms Dick White

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

Lecture Fundamentals of Data and signals

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

Experiment No. 6. Audio Tone Control Amplifier

Signals and Systems EE235. Leo Lam

Pre-Lab. Introduction

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

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

Data Communication. Chapter 3 Data Transmission

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

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

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

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

Chapter 3 Data and Signals 3.1

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

Trigonometric functions and sound

Chapter 3 Data Transmission COSC 3213 Summer 2003

ENGR 210 Lab 12: Sampling and Aliasing

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

LRC Circuit PHYS 296 Your name Lab section

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

Series and Parallel Resonance

Tabor Electronics Signal Amplifiers. Quick Start Guide

TEAK Sound and Music

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

Fourier Series and Gibbs Phenomenon

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

COMP211 Physical Layer

Frequency Domain Representation of Signals

STATION NUMBER: LAB SECTION: Filters. LAB 6: Filters ELECTRICAL ENGINEERING 43/100 INTRODUCTION TO MICROELECTRONIC CIRCUITS

MUSC 316 Sound & Digital Audio Basics Worksheet

ECEGR Lab #8: Introduction to Simulink

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

PART I: The questions in Part I refer to the aliasing portion of the procedure as outlined in the lab manual.

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

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

ECEN 325 Lab 5: Operational Amplifiers Part III

ECE 201: Introduction to Signal Analysis

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

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

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

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

EE228 Applications of Course Concepts. DePiero

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

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

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

Sampling and Reconstruction of Analog Signals

Electrical & Computer Engineering Technology

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

Goals. Introduction. To understand the use of root mean square (rms) voltages and currents.

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

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

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

Laboratory 9. Required Components: Objectives. Optional Components: Operational Amplifier Circuits (modified from lab text by Alciatore)

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

Goals. Introduction. To understand the use of root mean square (rms) voltages and currents.

Class #3: Experiment Signals, Instrumentation, and Basic Circuits

Experiment 7: Frequency Modulation and Phase Locked Loops

Fundamentals of Music Technology

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

Fundamentals of Digital Audio *

Sampling and Reconstruction

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

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

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

Lab 2: Capacitors. Integrator and Differentiator Circuits

Frequency Selective Circuits

Data Communications and Networks

EECS40 RLC Lab guide

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 sound system, speakers are 8 Ω Vi =100; i=v/r V 2 = 800, so V swing > +/- 30V Earbuds use much lower voltages (R is 10-100 Ω). 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

Converting Analog to Digital Signals Audio Signal t http://www.planetoftunes.com/digital-audio/how-doanalogue-to-digital-converters-work.html#.wuos0y-zpoq Analog signals can be converted to a stream of digital numbers corresponding to magnitude vs. time in an A to D converter. 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 (using an A to D converter as on page 6) 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 Java applet from: http://www.falstad.com/fourier/ You may have to override security features in your computer to run it after you download it (see class website). Or you can run it from the above website. M. Horowitz, J. Plummer, R. Howe 11

Relating Voltage to Sinewaves Demo http://www.falstad.com/fourier/ Calculates Fourier Series representation (later) of time varying wave. Or calculates time varying wave from Fourier components (tones). Let s play with it a little bit M. Horowitz, J. Plummer, R. Howe 12

Which Goes With Which? 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

Sound Display on Your LED Cube In Lab 3c one of the options for your LED cube is to display the frequency components of music. M. Horowitz, J. Plummer, R. Howe 17

Lab 3C Audio Option A to D Converter Audio Signal FFT Software Music responsive LED Cube M. Horowitz, J. Plummer, R. Howe 18

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

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 demo did (http://www.falstad.com/fourier/) M. Horowitz, J. Plummer, R. Howe 20

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 A detailed discussion of Fourier Transforms is beyond the scope of this course. Take EE 102a if interested in more details. M. Horowitz, J. Plummer, R. Howe 21

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 22

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 23

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 24

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 25 T + b n sin 2nπt T

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

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 27

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 28

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 29

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 30

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 31

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 32