What is Sound? Simple Harmonic Motion -- a Pendulum

Similar documents
Computer Audio. An Overview. (Material freely adapted from sources far too numerous to mention )

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

Fundamentals of Digital Audio *

Sound/Audio. Slides courtesy of Tay Vaughan Making Multimedia Work

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

Chapter 4. Digital Audio Representation CS 3570

Sound waves. septembre 2014 Audio signals and systems 1

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

ABC Math Student Copy

A-110 VCO. 1. Introduction. doepfer System A VCO A-110. Module A-110 (VCO) is a voltage-controlled oscillator.

Cyber-Physical Systems ADC / DAC

Combining granular synthesis with frequency modulation.

MMO-4 User Documentation

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

SAMPLING THEORY. Representing continuous signals with discrete numbers

Copyright 2009 Pearson Education, Inc.

Fundamentals of Music Technology

Chapter 16 Sound. Copyright 2009 Pearson Education, Inc.

Manual installation guide v1.2

An introduction to physics of Sound

Pulse Code Modulation

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

MUSC 316 Sound & Digital Audio Basics Worksheet

Waves & Interference

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

CS 591 S1 Midterm Exam

CSCI1600 Lab 4: Sound

SECTION A Waves and Sound

What is Sound? Part II

SOUND & MUSIC. Sound & Music 1

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

Linguistics 401 LECTURE #2. BASIC ACOUSTIC CONCEPTS (A review)

Chapter 17 Waves in Two and Three Dimensions

SuperCollider Tutorial

Copyright 2010 Pearson Education, Inc.

Waves and Sound Practice Test 43 points total Free- response part: [27 points]

Chapter 3 Data and Signals

SECTION A Waves and Sound

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

CSE481i: Digital Sound Capstone

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

PHYS102 Previous Exam Problems. Sound Waves. If the speed of sound in air is not given in the problem, take it as 343 m/s.

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

Sound Synthesis Methods

Physics B Waves and Sound Name: AP Review. Show your work:

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

Low wavenumber reflectors

Laboratory Assignment 5 Amplitude Modulation

CHAPTER ONE SOUND BASICS. Nitec in Digital Audio & Video Production Institute of Technical Education, College West

A-130 VCA-LIN. doepfer System A VCA A-130 / A Introduction

Final Reg Wave and Sound Review SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

Answer:- School bell starts vibrating when heated which creates compression and rarefaction in air and sound is produced.

Acoustics and Fourier Transform Physics Advanced Physics Lab - Summer 2018 Don Heiman, Northeastern University, 1/12/2018


Interpolation Error in Waveform Table Lookup

NOZORI 84 modules documentation

In Phase. Out of Phase

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

6. An oscillator makes four vibrations in one second. What is its period and frequency?

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

Sound All sound begins with a vibrating object Ex. Vibrating tuning fork Vibrating prong sets molecules near it in motion

Sound Synthesis. A review of some techniques. Synthesis

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

Lab 9 Fourier Synthesis and Analysis

Lecture Notes Intro: Sound Waves:

Direct Digital Synthesis

Chapter 05: Wave Motions and Sound

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Sound 05/02/2006. Lecture 10 1


Waves ADD: Constructive Interference. Waves SUBTRACT: Destructive Interference. In Phase. Out of Phase

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

Spectrum Analysis: The FFT Display

Chapter 3 Data and Signals 3.1

H. Pipes. Open Pipes. Fig. H-1. Simplest Standing Wave on a Slinky. Copyright 2012 Prof. Ruiz, UNCA H-1

Waves-Wave Behaviors

Test Equipment. PHYS 401 Physics of Ham Radio

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

Psychological psychoacoustics is needed to perceive sound to extract features and meaning from them -human experience

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

INTRODUCTION TO COMPUTER MUSIC. Roger B. Dannenberg Professor of Computer Science, Art, and Music. Copyright by Roger B.

MMO-3 User Documentation

College of information Technology Department of Information Networks Telecommunication & Networking I Chapter DATA AND SIGNALS 1 من 42

Section 1. Fundamentals of DDS Technology

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

Lecture 7 Frequency Modulation

Direct Digital Synthesis Primer

Waves-Wave Behaviors

This content has been downloaded from IOPscience. Please scroll down to see the full text.

Psychology of Language

GEN/MDM INTERFACE USER GUIDE 1.00

Introduction. Chapter Time-Varying Signals

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

Preview. Sound Section 1. Section 1 Sound Waves. Section 2 Sound Intensity and Resonance. Section 3 Harmonics

3.2 Measuring Frequency Response Of Low-Pass Filter :

YAMAHA. Modifying Preset Voices. IlU FD/D SUPPLEMENTAL BOOKLET DIGITAL PROGRAMMABLE ALGORITHM SYNTHESIZER

two computers. 2- Providing a channel between them for transmitting and receiving the signals through it.

Data Communication. Chapter 3 Data Transmission

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

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

Transcription:

What is Sound? As the tines move back and forth they exert pressure on the air around them. (a) The first displacement of the tine compresses the air molecules causing high pressure. (b) Equal displacement of the tine in the opposite direction forces the molecules to widely disperse themselves and so, causes low pressure. (c) These rapid variations in pressure over time form a pattern which propogates itself through the air as a wave. Points of high and low pressure are sometimes reffered to as compression and rarefaction respectively. (a) compression (b) rarefaction (c) wave propagation of a tuning fork CSE 466 as seen from above 1 Simple Harmonic Motion -- a Pendulum When a pendulum approaches equlibrium it doesn t slow down; it simply travels a smaller distance from the point of rest. Any body undergoing simple harmonic motion moves periodically with uniform speed. If the tuning fork is moving periodically then the pressure variations it creates will also be periodic. The time taken to get from position a to b in all three cases is the same a b a b a b Maximum displacement Maximum displacement Maximum displacement CSE 466 2 at 0 seconds after say, 3 seconds after say, 6 seconds 1

The Unit Circle These pressure patterns can be represented using as a circle. Imagine the journey of the pendulum or the tine in four stages: 1) from its point of rest to its first point of maximum displacement... 2) its first point of maximum displacement back through the point of rest... 3)... to its second point of maximum displacement... 4)... and back from there through its point of rest again We can map that journey to a circle. This is called the Unit Circle. The sine wave represents this journey around and around the unit circle over time. 3 4 2 1 CSE 466 3 Time Sine Waves The sine wave or sinusoid or sinusoidal signal is probably the most commonly used graphic representation of sound waves. high pressure or compression + 1 low pressure or rarefaction Pressure or density of air molecules; Amplitude in decibels 0 0.5 1-1 Time in seconds CSE 466 4 2

Sine Waves The specific properties of a sine wave are described as follows. Frequency = the number of cycles per second (this wave has a frequency of 6 hertz) Amplitude = variations in air pressure (measured in decibels) Wavelength = physical length of 1 period of a wave (measured in metres per second) Phase = The starting point of a wave along the y-axis (measured in degrees) CSE 466 5 1 second Frequency Frequency refers to the number of cycles of a wave per second. This is measured in Hertz. So if a sinusoid has a frequency of 100hz then one period of that wave repeats itself every 1/100 th of a second. Humans can hear frequencies between 20hz and 20,000hz (20Khz). 1) Frequency is closely related to, but not the same as!!!, pitch. 2) Frequency does not determine the speed a wave travels at. Sound waves travel at approximately 340metres/second regardless of frequency. 3) Frequency is inherent to, and determined by the vibrating body not the amount of energy used to set that body vibrating. For example, the tuning fork emits the same frequency regardless of how hard we strike it. (a) 800hz (b) 100hz CSE 466 6 3

Amplitude Amplitude describes the size of the pressure variations. Amplitude is measured along the vertical y-axis. Amplitude is closely related to but not the same as!!!, loudness. (a) Two signals of equal frequency and varying amplitude (b) Two signals of varying frequency and equal amplitude CSE 466 7 Amplitude Envelope The amplitude of a wave changes or decays over time as it loses energy. These changes are normally broken down into four stages; Attack, Decay, Sustain and Release. Collectively, the four stages are described as the amplitude envelope. 0.8 Attack Decay Sustain Release 0.6 0.4 0.2 0 100 200 300 400 500 600 700 CSE 466 8 4

The digital signal is defined only at the points at which it is sampled. Quantization CSE 466 9 Quantization The height of each vertical bar can take on only certain values, shown by horizontal dashed lines, which are sometimes higher and sometimes lower than the original signal, indicated by the dashed curve. CSE 466 10 5

Quantization The difference between a quantized representation and an original analog signal is called the quantization noise. The more bits for quantization of a signal, the more closely the original signal is reproduced. CSE 466 11 Quantization Using higher sampling frequency and more bits for quantization will produce better quality digital audio. But for the same length of audio, the file size will be much larger than the low quality signal. CSE 466 12 6

Quantization The number of bits available to describe sampling values determines the resolution or accuracy of quantization. For example, if you have 8-bit analog to digital converters, the varying analog voltage must be quantized to 1 of 256 discrete values; a 16-bit converter has 65,536 values. CSE 466 13 Nyquist Theorem A theorem which states that an analog signal waveform may be uniquely reconstructed, without error, from samples taken at equal time intervals. CSE 466 14 7

Nyquist Theorem The sampling rate must be equal to, or greater than, twice the highest frequency component in the analog signal. CSE 466 15 Nyquist Theorem Stated differently: The highest frequency which can be accurately represented is one-half of the sampling rate. CSE 466 16 8

Error Sampling an analog signal can introduce ERROR. ERROR is the difference between a computed, estimated, or measured value and the true, specified, or theoretically correct value. CSE 466 17 Nyquist Theorem By sampling at TWICE the highest frequency: One number can describe the positive transition, and One number can describe the negative transition of a single cycle. CSE 466 18 9

Nyquist Error-- aliasing upper => sampling 6 times per cycle(fs=6f fs=6f); middle => sampling 3 times per cycle(fs=3f fs=3f); lower=> sampling 6 times in 5 cycles, from[1] CSE 466 19 Digital Synthesis Overview Sound is created by manipulating numbers, converting those numbers to an electrical current, and amplifying result. Numerical manipulations are the same whether they are done with software or hardware. Same capabilities (components) as analog synthesis, plus significant new abilities CSE 466 20 10

Digital Oscillators Everything is a Table A table is an indexed list of elements (or values) The index is the address used to find a value CSE 466 21 Generate a Sine Tone Digitally (1) Compute the sine in real time, every time it is needed. equation: signal(t) = rsin(!t) t = a point in time; r = the radius, or amplitude of the signal; w (omega) = 2pi*f the frequency Advantages: It s the perfect sine tone. Every value that you need will be the exact value from the unit circle. Disadvantages: must generate every sample of every oscillator present in a synthesis patch from an algorithm. This is very expensive computationally, and most of the calculation is redundant. CSE 466 22 11

Generate a Sine Tone Digitally (2) Compute the sine tone once, store it in a table, and have all oscillators look in the table for needed values. Advantages: Much more efficient, hence faster, for the computer. You are not, literally, reinventing the wheel every time. Disadvantages: Table values are discrete points in time. Most times you will need a value that falls somewhere in between two already computed values. CSE 466 23 Table Lookup Synthesis Sound waves are very repetitive. For an oscillator, compute and store one cycle (period) of a waveform. Read through the wavetable repeatedly to generate a periodic sound. CSE 466 24 12

Changing Frequency The Sample Rate doesn t change within a synthesis algorithm. You can change the speed that the table is scanned by skipping samples. skip size is the increment, better known as the phase increment. ***phase increment is a very important concept*** CSE 466 25 Algorithm for a Digital Oscillator Basic, two-step program: phase_index = mod L (previous_phase + increment) output = amplitude x wavetable[phase_index] increment = (TableLength x DesiredFrequency) SampleRate CSE 466 26 13

If You re Wrong, it s s Noise What happens when the phase increment doesn t land exactly at an index location in the table? It simply looks at the last index location passed for a value. In other words, the phase increment is truncated to the integer. Quantization Noise The greater the error, the more the noise. CSE 466 27 Interpolation Rather than truncate the phase location look at the values stored before and after the calculated phase location calculate what the value would have been at the calculated phase location if it had been generated and stored. Interpolate More calculations, but a much cleaner signal. CSE 466 28 14

Linear interpolation Interpolate between two audio samples double inbetween = fmod(sample, 1); return (1. inbetween) * wave[int(sample)] + inbetween * wave[int(sample) + 1]; More accurate, yet still efficient 1021 1021.35 1022 CSE 466 29 Envelopes We commonly will make samples with fixed amplitudes, then make a synthetic envelope for the sound event. CSE 466 30 15

Attack and Release Amplitude Attack Release Time CSE 466 31 ADSR ADSR: Attack, decay, sustain, release Amplitude Sustain level Attack Decay Sustain Release CSE 466 32 16

Frequency Modulation CSE 466 33 FM: General Description Simple FM: carrier oscillator has its frequency modulated by the output of a modulating oscillator. Sidebands produced around carrier at multiples of modulating frequency. Number generated depends on the amplitude of the modulator. CSE 466 34 17

Modulator : Carrier Ratio Sidebands at C + and - (n * Modulator) Ratio of M:C determines whether spectrum is harmonic or not. Simple integer ratio = harmonic Non-integer ratio = inharmonic CSE 466 35 Modulation Index and Bandwidth The bandwidth of the FM spectrum is the number of sidebands present. The bandwidth is determined by the Modulation Index I = depth of modulation / modulator D depth of modulation, which depends on the amount of amplitude applied to modulating oscillator. (D = A x M) If the index is above zero, then sidebands occur. CSE 466 36 18

Yamaha YMU757B Original FM synthesis function Discovered at Stanford in 70 s Patented and licensed to Yamaha Used in famous DX-7 keyboard (and many other products) CSE 466 37 Yamaha YMU757B internals CSE 466 38 19

Yamaha YMU757B CSE 466 39 FM (frequency modulation) CSE 466 40 20

Interface CSE 466 41 CSE 466 42 21

Internal Register Set CSE 466 43 Note Data CSE 466 44 22

Timbre Data CSE 466 45 Timbre Data CSE 466 46 23

Timbre Data CSE 466 47 Timbre Data CSE 466 48 24

Timbre Data CSE 466 49 Tempo and Start bit CSE 466 50 25

Volume CSE 466 51 Interrupt register CSE 466 52 26

Settings and procedure to generate melody CSE 466 53 What we re going to do: This week: Talk to the FM chip Explore some basic FM sounds Port some birdsongs to our board In two weeks: Port sound code to TinyOS and mote Do the Flock CSE 466 54 27