“Ah-Ha! Moments”: Where Science Meets Art and Practice in Digital Sound, Part 1 CCLI Workshop Series: “Linking Science, Art, and Practice through Digital.

Slides:



Advertisements
Similar presentations
Tamara Berg Advanced Multimedia
Advertisements

CS335 Principles of Multimedia Systems Audio Hao Jiang Computer Science Department Boston College Oct. 11, 2007.
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
Sound in multimedia How many of you like the use of audio in The Universal Machine? What about The Universal Computer? Why or why not? Does your preference.
CMPS1371 Introduction to Computing for Engineers PROCESSING SOUNDS.
SWE 423: Multimedia Systems Chapter 3: Audio Technology (2)
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
Digital audio recording Kimmo Tukiainen. My background playing music since I was five first time in a studio at fourteen recording on my own for six months.
SYED SYAHRIL TRADITIONAL MUSICAL INSTRUMENT SIMULATOR FOR GUITAR1.
Classification of Music According to Genres Using Neural Networks, Genetic Algorithms and Fuzzy Systems.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
BPC: Art and Computation – Summer 2007 Digital Media – Audio, part 2 Robert Putnam
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Data Acquisition. Data Acquisition System Analog Signal Signal Conditioner ADC Digital Processing Communication.
Fundamentals of Digital Audio. The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
Graphic Equalizer Table By Jose Lerma. Main Idea The main idea of this table is to display the frequencies of any sound or audio input, either by microphone.
M I D I Musical Instrument Digital Interface The MIDI protocol — a “language” that lets synthesizers, computers and other devices talk to each other.
Random Processes and LSI Systems What happedns when a random signal is processed by an LSI system? This is illustrated below, where x(n) and y(n) are random.
LE 460 L Acoustics and Experimental Phonetics L-13
Digital Audio What do we mean by “digital”? How do we produce, process, and playback? Why is physics important? What are the limitations and possibilities?
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
Digital Sound and Video Chapter 10, Exploring the Digital Domain.
Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.
GCT731 Fall 2014 Topics in Music Technology - Music Information Retrieval Overview of MIR Systems Audio and Music Representations (Part 1) 1.
Using Technology and Music to Talk About Sinusoids Mike Thayer Summit High School, Summit, NJ 25 th Annual “Good Ideas in Teaching Precalculus And…” Conference.
Radio production worktext.  Analog to Digital  Analog signal – continuously variable electrical signal whose shape is determined by the shape of the.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Computing with Digital Media: A Study of Humans and Technology Mark Guzdial, School of Interactive Computing.
MIDI and YOU Orchestra in a Box. What is MIDI?  Musical Instrument Digital Interface  MIDI is a protocol - a standard by which two electronic instruments.
Art 321 Sound, Audio, Acoustics Dr. J. Parker. Sound What we hear as sound is caused by rapid changes in air pressure! It is thought of as a wave, but.
CSC361/661 Digital Media Spring 2002
Digital Media Dr. Jim Rowan ITEC Monday, August 27.
Digital Media Dr. Jim Rowan ITEC Monday, August 27.
Points of View, Levels of Abstraction Jennifer Burg Department of Computer Science Wake Forest University x(t) = a x t 3 + b x t 2 + c x t + d.
Digital Recording Theory Using Peak. Listening James Tenney, Collage #1 (“Blue Suede”),  Available in Bracken Library, on James Tenney Selected.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Acoustic Analysis of Speech Robert A. Prosek, Ph.D. CSD 301 Robert A. Prosek, Ph.D. CSD 301.
XP Tutorial 8New Perspectives on HTML and XHTML, Comprehensive 1 Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets Tutorial.
Signal Digitization Analog vs Digital Signals An Analog Signal A Digital Signal What type of signal do we encounter in nature?
Interdisciplinary Courses and Assignments in Digital Sound Production Jennifer Burg Department of Computer Science Wake Forest University.
Multimedia Elements: Sound, Animation, and Video.
111 Lecture 2 Signals and Systems (II) Principles of Communications Fall 2008 NCTU EE Tzu-Hsien Sang.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
CMSCDHN1114/CMSCD1011 Introduction to Computer Audio
Multimedia ITGS. Multimedia Multimedia: Documents that contain information in more than one form: Text Sound Images Video Hypertext: A document or set.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Analogue & Digital. Analogue Sound Storage Devices.
Introduction to Digital Media. What is it? Digital media is what computers use to; Store, transmit, receive and manipulate data Raw data are numbers,
Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008.
Quiz 1 Review. Analog Synthesis Overview Sound is created by controlling electrical current within synthesizer, and amplifying result. Basic components:
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
Announcement!!! First exam next Thursday (I’m trying to give you a first exam before the drop date) I’ll post a sample exam over the weekend and will try.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
This work was funded by National Science Foundation CCLI Grant DUE ; Jennifer Burg PI, Jason Romney Co-PI. Songsounds by Shanee Aliya Karriem.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Glencoe Introduction to Multimedia Chapter 8 Audio 1 Section 8.1 Audio in Multimedia Audio plays many roles in multimedia. Effective use in multimedia.
27656 (v1) Demonstrate and apply introductory knowledge of music technology equipment and techniques MUSIC Level 1Credits 4.
XP Practical PC, 3e Chapter 14 1 Recording and Editing Sound.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
Chapter 15 Recording and Editing Sound
ECE3340 Review of Numerical Methods for Fourier and Laplace Transform Applications – Part 1 Fourier Spring 2016 Prof. Han Q. Le Note: PPT file is the.
Analogue & Digital.
Sampling rate conversion by a rational factor
Multimedia: making it Work
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals
Presentation transcript:

“Ah-Ha! Moments”: Where Science Meets Art and Practice in Digital Sound, Part 1 CCLI Workshop Series: “Linking Science, Art, and Practice through Digital Sound” Workshop 1, August 11 and 12, 2008 Wake Forest University This work was funded by National Science Foundation CCLI grant DUE Jennifer Burg PI, Jason Romney Co-PI Jennifer Burg

“Ah-Ha Moments” are moments when the lights go on, and you see something clearly for the first time.

 The relationships between things  Why something is so  How something works  What something applies to  Often this requires seeing the thing from a different perspective or in context

The Effect of Bit Depth in Quantization  Rounding to discrete quantization levels causes error.  In Audition In Audition  The error is itself a wave.  In MATLAB In MATLAB

Visualizing the Error from Quantization

Dithering  Add a random amount between -1 and 1 (scaled to the bit depth of the audio file) to each sample before quantizing.  There will be fewer consecutive samples that round to the same amount. Rounding to 0 is the worst thing, causing breaks.  In Audition In Audition

Noise Shaping  Raise error wave above the Nyquist frequency.  Do this by making the error go up if it was previously down and down if it was previously up. This raises the error wave’s frequency.  The amount added to a sample depends on the error in previous sample. In AuditionIn Audition

Ah-ha! Spectral view of quantization noise sith dithering. (Click picture to hear.) Spectral view of quantization noise with dithering and noise shaping. Click picture to hear.) Spectral view of quantization noise. (Click picture to hear.) original sound file

Frequency Components  The spectral views just shown introduce the idea of frequency components of a sound wave.  The digitized sound wave can be stored in one of two ways:  Time domain – a list of values representing the amplitude of the sound wave at evenly-spaced moments in time  Frequency domain – a list of values representing “how much” of each frequency is present in the wave

frequency domaintime domain

The Relationship Between a Frequency Response and an Impulse Response Frequency Response (how much of each frequency will be retained after filtering, on a scale of 0 to 1) Impulse Response (a graph of the values in the convolution mask, in the time domain) The Fourier transform of the impulse response gives the frequency response.

Impulse Response = Convolution Mask  Filtering can be done in the time domain by applying a convolution mask to the sound samples.  The impulse response is a convolution mask.

How Does Convolution Work to Filter Frequencies of a Sound Wave? Click to animate x is a list of sound samples – It’s the digitized sound wave. h is a list of values that constitute the convolution mask – i.e., the filter in the time domain. y is a list of sound samples that constitute the sound wave after it has been filtered.

Impulse Response vs. Frequency Response  impulse response = convolution mask = filter in time domain  frequency response = a graph of what the filter does in terms of how much each frequency is boosted or attenuated  impulse response = inverse Fourier transform of frequency response  frequency response = Fourier transform of impulse response

Frequency Response of Idealized vs. Realistic Low-Pass Filter idealized low-pass filterrealistic low-pass filter

Going from Frequency Response to Impulse Response  If you know what frequency response you want from a filter, how do you get the corresponding impulse response ?  In the ideal, where the frequency response is a rectangular function, the frequency response and impulse response are both Fourier transforms of each other and both inverse Fourier transforms of each other.

Fourier Transform

To get the impulse response from the idealized frequency response, take the Fourier transform of the frequency response

Creating a Low-Pass Filter  You can do it yourself in MATLAB:  Create the filter using the given function, sin(2  f c )/  n  Read in an audio clip  Since this is a filter in the time domain, convolve audio clip with the filter  Listen to the result  Graph the frequencies of filtered clip against the unfiltered clip. (Do this by taking the Fourier transform of each first.)  See the demonstration and worksheet for details.demonstrationworksheet

Creating a Vocoder in MATLAB From

Creating a Vocoder in MATLAB function output = vocoder(input1, input2, s, window) input1 = input1'; input2 = input2'; q=(s-window); output = zeros(1,s); for i=1:window/4:q b = i+window-1; input1partfft = fft(input1(i:b)); input2partfft = fft(input2(i:b)); input1fft(i:b) = input1fft(i:b) + abs(input1partfft); input2fft(i:b) = input2fft(i:b) + abs(input2partfft); mult = input1partfft.*input2partfft; output(i:b) = output(i:b)+ifft(mult); end output = output/max(output); end Demonstration

Digital Filters

That lead me to an ah-ha moment this morning!  Audition’s vocoder Audition’s vocoder  Comparison of my vocoder and Audition’s Comparison of my vocoder and Audition’s

Kinds of Ah-Ha Moments  Ah-ha! I know how that works now!  Ah-ha! I know why someone would be interested in using that!  Ah-ha! I know why it matters to know that!

Application Environments : Audition, Logic Pro, Sound Forge, Pro Tools, Sonar, Music Creator, Reason Hands on work for some real purpose : music, theatre, television, movie-making How things work : mathematics, algorithms, and technology How does knowledge of the math and science help to make the real work better?

Interplay Between Science, Art, and Practice  If you put artist/practitioners together with computer scientists, does one group shed light on the work of another?  What kinds of ah-ha moments emerge?  Do artist/practitioners create better products if they understand more about how things work?  Computer scientists like to understand how things work. But would it help them to know why it matters!

 If artist/practitioners know who things work, they can be more purposefully experimental (as opposed to “click on things and see what happens”).  They have more power over their tools to be original and creative.  Consider this in the visual arts…

With the click of the mouse, I’m an artist! ???

What Jason and I learned in our Digital Sound Production Workshop  Yes, definitely, when music students understand their tools, they use them more effectively.  Yes, definitely, when computer science students see what musicians want from their tools, they have ideas for how to create new and better tools. Also, understanding something about the music sheds light on how to make the tools work.

Ah-ha Moments for Music Students  Rewiring Cakewalk Music Creator to Combining digital audio and MIDI  Demonstration Demonstration

Ah-ha Moments for Music Students  Multi-band dynamics processing - L3-LL Multimaximizer plug-in  Unprocessed audio Unprocessed audio  Processed audio after using the plug-in Processed audio after using the plug-in

Ah-ha Moments for Music Students  In order to understand this tool, students needed to know something about frequency, dynamic range, and ADRS envelopes Dynamics Processing Plug-In from Audition

Ah-ha Moments for Music Students  Creating and editing MIDI samples  Samplers and synthesizers are not the same.  There’s a lot going on in a sample bank.  You can edit a sample bank yourself.  A MIDI message can mean whatever you want it to mean.  You can create your own sample banks.  Loops and samples aren’t the same thing.  It’s actually possible to work creatively with loops. You can edit the samples from which they’re created, or edit the why the loops are put together.

The Instrument Editor in Logic Pro There’s a lot going on in a sample bank, and you can have access to it!

Ah-ha! A MIDI message can mean whatever I want it to mean! A control change message (or a pitch bend message or whatever message you choose) can be defined to mean “Go to the next instrument in the EXS24 set of instruments.”

Ah-ha! You can make your own sample bank! Making a sample bank of birds songs in Reason. Then rewiring Cakewalk Music Creator through Reason, using this sample bank, and playing a jazz piece with the bird songs as instruments. Listen Then compose your own piece to use the bird Samples! Listen

Using loops isn’t “cheating.” You can edit loops and put them together creatively! Editing loops in Reason

Working Creatively with Loops  Turkish Nights by Dan Applegate Turkish Nights

Ah-ha Moments for Computer Science Students  A MIDI message can mean whatever you want it to mean.  It really makes more sense to think of MIDI messages in hexadecimal rather than decimal.

Status Byte  is the lowest value a status byte can hold.  = 80 in hex, 128 in decimal  Generally we deal with MIDI bytes in hex because it makes it easier to program. Slide courtesy of Jason Romney. Thanks.

Status Bytes HexBinaryDescription Channel Voice Messages 8n 1000b 1 b 2 b 3 b 4 Note Off 9n 1001b 1 b 2 b 3 b 4 Note On An 1010b 1 b 2 b 3 b 4 Polyphonic key pressure/Aftertouch Bn 1011b 1 b 2 b 3 b 4 Control change Cn 1100b 1 b 2 b 3 b 4 Program Change Dn 1101b 1 b 2 b 3 b 4 Channel pressure/Aftertouch En 1110b 1 b 2 b 3 b 4 Pitch bend change n=channel number, in hexadecimal Slide courtesy of Jason Romney. Thanks.

Data Byte  MIDI data bytes follow a MIDI status byte  Status bytes tell a MIDI device what to do. Data bytes tell the MIDI device how to do it.  Data bytes are bytes with the 8th bit turned off. Consequently, data bytes cannot carry a value larger than 127 (7FH). Slide courtesy of Jason Romney. Thanks.

Channel Voice Messages Status Byte Data BytesDescription HexBinary 8n1000b 1 b 2 b 3 b 4 0k 1 k 2 k 3 k 4 k 5 k 6 k 7 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Note Off K 1 k 2 k 3 k 4 k 5 k 6 k 7 : note number v 1 v 2 v 3 v 4 v 5 v 6 v 7 : note off velocity 9n1001b 1 b 2 b 3 b 4 0k 1 k 2 k 3 k 4 k 5 k 6 k 7 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Note On v 1 v 2 v 3 v 4 v 5 v 6 v 7 ≠ 0: velocity v 1 v 2 v 3 v 4 v 5 v 6 v 7 = 0: note off An1010b 1 b 2 b 3 b 4 0k 1 k 2 k 3 k 4 k 5 k 6 k 7 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Polyphonic Key Pressure (Aftertouch) v 1 v 2 v 3 v 4 v 5 v 6 v 7 : pressure value Bn1011b 1 b 2 b 3 b 4 0c 1 c 2 c 3 c 4 c 5 c 6 c 7 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Control Change c 1 c 2 c 3 c 4 c 5 c 6 c 7 : control # (0-119) v 1 v 2 v 3 v 4 v 5 v 6 v 7 : control value Cn1100b 1 b 2 b 3 b 4 0p 1 p 2 p 3 p 4 p 5 p 6 p 7 Program Change p 1 p 2 p 3 p 4 p 5 p 6 p 7 : program # (0-127) Dn1101b 1 b 2 b 3 b 4 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Channel Pressure (Aftertouch) v 1 v 2 v 3 v 4 v 5 v 6 v 7 : pressure value En1110b 1 b 2 b 3 b 4 0v 1 v 2 v 3 v 4 v 5 v 6 v 7 Pitch Bend Change LSB Pitch Bend Change MSB n = channel number Slide courtesy of Jason Romney. Thanks.

A C program for reading MIDI message, converting them to frequencies, and sending them to the sound card to be played.  Programming assignment created for first or second year programming students, by John Brock Programming assignment while(j){ if(k&0x80){ d1 = fgetc(midi); if(k != 0xC0 && k != 0xD0){ d2 = fgetc(midi); } if(k == 0xFF && d1 == 0x2F) j = 0; if(k == 0x90){ freq = *pow(2, d1/12.0); if(d2 != 0){ for(i = 0; i < (shmsz); i++){ samp[i] += sin(freq*(2.0*M_PI/RATE)*i); } ….. and so forth You can see that John is working in hexadecimal.

Hey! Let’s try using an autotuner!  The music student wants to use it.  The computer science student wants to make his own and understand how it works.  Ah-ha, they both say! The human voice has harmonic frequencies, and if you don’t know that, you can’t create a vocoder!  Ah-ha, they both say! Human perception of sound is non-linear! Now I know what that means and why it matters!

Creating an Autotuner  Experiment in thinking about autotuning: demo demo

Questions for this workshop  How do we relate the science to art and practice?  How much science does the artist/practitioner need?  Where are the points where knowing the science results in better work?  How do we change the computer science curriculum to retain the science but relate it more interestingly to art and practice?

Tell us about your own Ah-ha moments!  We’d love to hear about your ah-ha moments in this workshop – if there are moments when you say,  “Oh, that’s how it works! That makes me think of something that I’d like to do!”