From Sound to Music CSC 161: The Art of Programming Prof. Henry Kautz 11/16/2009.

Slides:



Advertisements
Similar presentations
The length of sound or silence in music reading.
Advertisements

Chapter 2: Rhythm and Pitch
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.
Pro Tools 7 Session Secrets Chapter 6: After the Bounce or Life Outside of Pro Tools Life Outside of Pro Tools.
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.
Sound can make multimedia presentations dynamic and interesting.
CS252: Systems Programming Ninghui Li Program Interview Questions.
Sound, Part 3. Multiple Echoes Here is a recipe to create multiple echoes: def echoes(sndfile, delay, num): s1 = makeSound(sndfile) ends1 = getLength(s1)
Int 2 Multimedia Revision. Digitised Sound Analogue sound recorded from person, or real instruments.
The Binary Numbering Systems
CMPS1371 Introduction to Computing for Engineers PROCESSING SOUNDS.
I Power Higher Computing Multimedia technology Audio.
You are an acoustic engineer. You have recorded a pure note of music that is described mathematically as f ( t ) = 20 sin (880  t ), where t is time in.
NEW CHAPTER the BIG idea Sound waves transfer energy through vibrations. Sound Sound is a wave. Frequency determines pitch. Intensity determines loudness.
Chapter 13 Sounds and signals basics of computer sound perception and generation of sound synthesizing complex sounds sampling sound signals simple example.
Connecting with Computer Science, 2e
Spring 2002EECS150 - Lec13-proj Page 1 EECS150 - Digital Design Lecture 13 - Final Project Description March 7, 2002 John Wawrzynek.
BPC: Art and Computation – Summer 2007 Digital Media – Audio, part 2 Robert Putnam
1 CS 177 Week 15 Recitation Slides Review. Announcements Final Exam on Sat. May 8th  PHY 112 from 8-10 AM Complete your online review of your classes.
1 Manipulating Digital Audio. 2 Digital Manipulation  Extremely powerful manipulation techniques  Cut and paste  Filtering  Frequency domain manipulation.
1 Key Concepts:  Data types in C.  What is a variable?  Variable Declaration  Variable Initialization  Printf()  Scanf()  Working with numbers in.
Working with Sound CSC 161: The Art of Programming Prof. Henry Kautz 11/11/2009.
Week 8: Audio Processing 1.  Light and sound are both transmitted in waves 2.
Human Psychoacoustics shows ‘tuning’ for frequencies of speech If a tree falls in the forest and no one is there to hear it, will it make a sound?
Chapter 14 Recording and Editing Sound. Getting Started FAQs: − How does audio capability enhance my PC? − How does your PC record, store, and play digital.
© 2010 Pearson Education, Inc. Conceptual Physics 11 th Edition Chapter 21: MUSICAL SOUNDS Noise and Music Musical Sounds Pitch Sound Intensity and Loudness.
Joshua “Rock Star” Jenkins Jeff “Tremolo” Smith Jairo “the boss” Rojas
The audacious program Audacity Audacity might be worth a look. Suggest... Audacity is an easy to use audio production and mixing program, which enables.
Joe Comm Audacity in the Classroom. Overview A free download tool to record audio files (voice, music, or both). Teacher laptops, power cords, internet.
Computer Science 121 Scientific Computing Winter 2014 Chapter 13 Sounds and Signals.
School of Informatics CG087 Time-based Multimedia Assets Sampling & SequencingDr Paul Vickers1 Sampling & Sequencing Combining MIDI and audio.
Digital Sound and Video Chapter 10, Exploring the Digital Domain.
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
1 Chapter 8: Frequency and Sound Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
COMP Representing Sound in a ComputerSound Course book - pages
TA212 The Technology of Music Steve Wells. Tutorial 4 TMA04 –cutoff date January 22nd Block 4 Part 1 –starts February 15th TA212 The Technology of Music.
ITEC 109 Lecture 26 Sound (2). Sound Review Sound –How does it work in real life? –What are the different types of waves that represent sounds? –How are.
Computer Some basic concepts. Binary number Why binary? Look at a decimal number: 3511 Look at a binary number: 1011 counting decimal binary
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
Chapter 14 Classical and Experimental Music Contents Perspectives on Electronic Music Varèse and the Listener’s Experiment Composing Electronic Music Stockhausen:
More Meaningful Jargon Or, All You Need to Know to Speak Like a Geek Sound.
Sound Representation Digitizing Sound Sound waves through Air Different Voltages Voltage converted to numbers.
Pre-Class Music Keith Kothman, Interludes video by John Fillwalk.
Pre-Class Music Paul Lansky Six Fantasies on a Poem by Thomas Campion.
Hosted by Miss Fed Accommodations Modifications Audacity Basics.
Sound in Multimedia Psychology of sound what do you use it for? what techniques for its communication exist? Science of sound why does it exist? how it.
Sound Fundamentals 2 Beginning Live P.A..
Data Representation.
Time Compression/Expansion Independent of Pitch. Listening Dies Irae from Requiem, by Michel Chion (1973)
Sounds in Jython 16 bit samples : -32,768 and 32,767 Sound object holds all samples file = pickAFile() sound = makeSound( file ) SoundSample objects store.
COSC 1P02 Introduction to Computer Science 5.1 Cosc 1P02 Week 5 Lecture slides Psychiatrist to patient "You have nothing to worry about - anyone who can.
How to Create a Podcast. Podcasting “is the distribution of audio or video files, such as radio programs or music videos, over the Internet using either.
27656 (v1) Demonstrate and apply introductory knowledge of music technology equipment and techniques MUSIC Level 1Credits 4.
Lecture # 23 Sound Synthesis & Sound Arithmetic A “ sound font ” dog Jane knows Fred Ralph the loves Jane lovesFred.
1 Section 5.4 Digital Sound Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
XP Practical PC, 3e Chapter 14 1 Recording and Editing Sound.
CS 591 S1 – Computational Audio -- Spring, 2017
Chapter 15 Recording and Editing Sound
Chapter 2: Rhythm and Pitch
Chapter 5 Capturing and Editing Digital Audio
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Tape Composition and Fundamental Concepts of Electronic Music
SOUND ORGANIZED IN TIME
CS 177 Week 15 Recitation Slides
Unit 3: Variables in Java
Sounds in Jython 16 bit samples : -32,768 and 32,767
Creating Sounds and MIDI
Presentation transcript:

From Sound to Music CSC 161: The Art of Programming Prof. Henry Kautz 11/16/2009

Last Class 2 Working with sound files Example file sound.py import wave import array from math import sin, pi

Fast 3

Slow 4

Concepts Sound Frequency Amplitude Sampling Rate WAV file Header Frames Sound data Raw file contents: string of bytes Array: sequence of 16 bit (or other size) numbers 5

Common Ways to Manipulate Sound Waves Speed up Slow down Combine Add echo Reverse ?! 6

Secret Message 7

Programming Assignment Add the following two functions to sound.py: backwards( ) should read the names of input and output WAV files, and create a backwards version of the input file in the output file. Apply backwards( ) to secretMessage.wav combine( ) should read the names of two input WAV files and one output file. The output file should have the length of the shorter of the two input files, and contain the combination of the two input files. Each sample in the output is the sum of the two corresponding samples in the inputs, divided by 2. Use combine( ) to combine declaration.wav and BornToRun.wav 8

Part II (Optional, Extra Credit) Implement the following functions: amplify( ): Scale the amplitude of the samples in a file so that the absolute value of the largest (loudest) samples is Note that samples may be positive or negative, and that your function will have to scan through all the frames first to discover the largest sample absolute value, in order to determine the scaling factor. soften( ): Cut the maximum amplitude of a file in half. echo( ): Add an echo effect to a file. This is done by merging in a softer version of the file with itself delayed by a half second or so 9

Two Roads to Computer Music 10

Sampling & Mixing The first electronic music sampled, altered, and mixed sounds by physically cutting and manipulating audio tape! Scratching: manipulating sound samples by changing speed / reversing vinyl records 11

Sound Mix Artists Rap often mixes in clips of other songs In classical music, avant garde composers have long been fascinated with found sound John Cage Starting in the 1960’s, popular artists started to explore the possibilities of mixing arbitrary sound Frank Zappa Brian Wilson The Beatles: Revolution 9 Wilco 12

Revolution 9 13

The Other Road: Synthesis 14

Wendy Carlos 15

Synthesizing Sound How can we write a Python program to synthesize sound? Let’s remember the key concepts of digital sound waves 16

Key Concepts frequency: the number of waves per second = pitch amplitude: the height of each wave = loudness sampling rate: the number of samples per second of the wave = quality 17

Formula for Pure Tones 18

Synth 19

Part III (Optional, Extra Credit): Music Synthesizer Implement a program that reads in a text file containing musical notation and creates a WAV file of the music. The musical notation: Each note is specified by two characters separated by white space. The first character is a letter specifying the pitch A, B, C, D, E, F, G, or the letter R to indicate a rest The second character is the duration specified a W, H, Q, E (whole, half, quarter, eighth). 20

finally 21

Part IV (Optional, Extra Credit): Music Composition Create an original musical composition using any or all of the functions you implemented You can create your own input WAV files using any programs you like. iTunes to rip samples from CDs Sound Recorder to record from a microphone You might run several different functions multiple times to create your final composition. 22

Movies of the Day 23