Week 7 - Friday CS 121.

Slides:



Advertisements
Similar presentations
Week 7: Input and Output 1.  Now we are going to talk a little bit about output  You have a lot of experience with System.out.println() and System.out.print()
Advertisements

Investigating the sound quality of different audio file formats In this activity, we are going to record a short voice sample with a sound recording tool,
A stereo audio file 1. Audio Channels Number of audio channels determines number of waveforms in a recording Two relevant types of recording Stereo recording.
Digital Audio Production Munsang College Information and Communication Technology S2.
Module 4- Build a Game I Can’t Hear You! Sound. Sound formats in Scratch  Scratch can read MP3 files and uncompressed WAV, AIF, and AU files.  Just.
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
Chapter 4: Representation of data in computer systems: Sound OCR Computing for GCSE © Hodder Education 2011.
Week 7 - Friday.  What did we talk about last time?  Array examples.
Where I am saving it Double click on the folder that says “My Music” so that it shows in the Save In box. Double click on the folder “Sound bites”
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.
Week 8: Audio Processing 1.  Light and sound are both transmitted in waves 2.
Chapter 9 Audio.
1 Announcements l Take textbook to lab. »Be sure to read Chapter 13 before lab –MATLAB tutorial –Can skip Section 13.4 l Bring your transmitter and receiver.
Week 7 - Wednesday.  What did we talk about last time?  Introduction to arrays  Lab 6.
Problem Solving with Data Structures using Java: A Multimedia Approach Chapter 5: Arrays: A Static Data Structure for Sounds.
Audio. Why Audio Essential tool for – Interface – Narrative – Setting & Mood.
Vibrationdata 1 Special Topic 1 Processing Sound Files Matlab & Python The most interesting sounds are those which have sine tones.
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
XNA Basic XACT tool. What’s format song file which XNA support? Only.wav because it’s not compress file. Beside, you need XACT project ( XACT project)
Activity 1 Record and edit your voice using Audacity 1.Download Audacity (a free and open source audio editing software from
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
ITEC Final Presentation For Fall 2011 Table of Content –Basic Requirements  Audacity  Inskcape  GIMP  Blender  Animation of 2D and 3D.
Sound Editing Software. Audacity Background It is a free software for non-commerical use. It supports WAV, MP3, OGG format Available at M1, Rm 107 (Not.
Week 7 - Friday.  What did we talk about last time?  Array examples  Sound.
Week 15 – Wednesday.  What did we talk about last time?  Review up to Exam 1.
A: A: double “4” A: “34” 4.
Week 7 - Wednesday.  What did we talk about last time?  Introduction to arrays  Lab 6.
Week 10 - Friday.  What did we talk about last time?  References and primitive types  Started review.
Editing Digital AudioLab#7 Audacity is a free, easy-to-use and an open source platform audio editor and recorder for Windows, Mac OS, Linux and other operating.
Sound QUIZ. Representing Sound Files Name as many sound files as you can What is a benefit of switching from analogue to digital radio and TV? What does.
mp3DirectCut Audio recording.
Chapter 15 Recording and Editing Sound
How to Insert Background Music into your PowerPoint
3.3 Fundamentals of data representation
AUDIO Reflection Questions: (IN AUDIO ENGINEERING FOLDER)
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Week 2 - Wednesday CS 121.
Objective % Explain concepts used to create digital audio.
Week 4 - Monday CS221.
CS1316: Representing Structure and Behavior
Processing Sound Files
Sounds.
3 Be able to repurpose and test a range of digital media assets
Week 7 - Wednesday CS 121.
Week 8 - Friday CS 121.
Week 15 – Monday CS221.
Week 14 - Monday CS 121.
Week 8 - Monday CS 121.
Week 15 – Wednesday CS 121.
Week 14 - Wednesday CS 121.
Processing Sound Ranges part 3
Objective % Explain concepts used to create digital audio.
CS 1430: Programming in C++.
CS 177 Week 15 Recitation Slides
Review Operation Bingo
Study Skills for School Success! Session 3
CS1316: Representing Structure and Behavior
Week 9 – Audio Processing
I Can’t Hear You! Sound Get out your notes.
CS2011 Introduction to Programming I Arrays (II)
Activity 1 Record and edit your voice using Audacity
I Can’t Hear You! Sound Get out your notes.
Agenda IR Rhetoric Practice w/Nike Ads OMAM
Creative Commons Attribution Non-Commercial Share Alike License
Processing Sound Ranges part 3
I Can’t Hear You! Sound Get out your notes.
Chapter 9 Audio.
Creating Sounds and MIDI
Week 7 - Monday CS 121.
Presentation transcript:

Week 7 - Friday CS 121

Quiz

Last time What did we talk about last time? Array examples Sound

Questions?

Project 3

StdAudio Class

Purpose of the StdAudio class Audio data on Windows machines is sometimes stored in a WAV file A WAV file is much simpler than an MP3 because it has no compression Even so, it contains two channels (for stereo) and can have many different sample rates and formats for recording sound The StdAudio class lets you read and write a WAV file easily and always deal with a single array of sound, sampled at 44,100 Hz

StdAudio methods Everything you’d want to do with sound: To do interesting things, you have to manipulate the array of samples Make sure you added StdAudio.java to your project before trying to use it Method Use double[] read(String file) Read a WAV file into an array of doubles void save(String file, double[] input) Save an array of doubles (samples) into a WAV file void play(String file) Play a WAV file void play(double[] input) Play an array of doubles (samples)

StdAudio example Let’s load a file into an array: If the song has these samples: Perhaps samples will contain: String file = "song.wav"; double[] samples = StdAudio.read(file); -.9 -.7 -.6 -.4 -.2 -.1 .1 .2 .3 .4 .5 .6

StdAudio example With the audio samples loaded into the array named samples, we can play them as follows: StdAudio.play(samples);

Generating sound with StdAudio Or, we could generate sound from scratch with StdAudio This example from the book creates 1 second of the pitch A440: double[] sound = new double[StdAudio.SAMPLE_RATE + 1]; for( int i = 0; i < sound.length; i++ ) sound[i] = Math.sin(2 * Math.PI * i * 440 / StdAudio.SAMPLE_RATE); StdAudio.play(sound);

Breaking a sound into parts What if we wanted to play the second half of a sound followed by the first half? I know, why would we want to do that? double[] samples = StdAudio.read(file); double[] switched = new double[samples.length]; for(int i = 0; i < samples.length/2; i++ ) switched[i + samples.length/2] = samples[i]; for(int i = samples.length/2; i < samples.length; i++ ) switched[i - samples.length/2] = samples[i]; StdAudio.play(switched);

Lab 7

Upcoming

Next time… StdDraw

Reminders Keep reading Chapter 6 of the textbook Read Project 3 carefully and get started It's a harder project than the previous two!