380 likes | 511 Vues
This lecture delves into the fundamentals of sound synthesis and arithmetic through the lens of MIDI (Musical Instrument Digital Interface) and sound editing using Audacity. It covers essential concepts such as pitch, duration, delay, and timbre, while demonstrating how to manipulate MIDI files to transpose notes, change instruments, and vary playback speed. Additionally, it explains sound editing techniques, including amplification, blending, and creating echoes, helping learners understand sound as an array of amplitudes and how to create complex audio compositions from simple sounds.
E N D
Lecture # 23 Sound Synthesis & Sound Arithmetic
Jane Fred loves A “sound font” dog loves Fred the Jane Ralph knows
MIDI - Musical Instrument Digital Interface • Object representation of music • Every sound has • Pitch (frequency of the sound) • Delay (how long after last sound start to start playing) • Duration (how long should it play) • Timbre (which instrument should it sound like?) • Guitar • Clarinet • Violin
A MIDI file • An array of notes 0 (262, 0,10,1) 1 (300, 10,10,1) 2 (262, 10, 10, 1) 3 (300, 0, 10, 1) Delay Pitch (middle C) Duration Instrument Number During performance numbers are assigned to different instruments
MIDI demo http://www.free-midi.org/midi1/v/vangelis-chariots_of_fire.mid
A MIDI file • An array of notes 0 (262, 0,10,1) 1 (300, 10,10,1) 2 (262, 10, 10, 1) 3 (300, 0, 10, 1) How do we transpose to a higher key? Increase pitch of each note
A MIDI file • An array of notes 0 (262, 0,10,1) 1 (300, 10,10,1) 2 (262, 10, 10, 1) 3 (300, 0, 10, 1) How do we make it play faster? Reduce delay and duration of each note
A MIDI file • An array of notes 0 (262, 0,10,1) 1 (300, 10,10,1) 2 (262, 10, 10, 1) 3 (300, 0, 10, 1) How do we change from guitar to flute? Assign a different instrument to that number
Synthesizing an instrument • Mix different harmonics • Add noise • Adjust Attack, Dwell, Sustain, Release
Synthesizing an Instrument • Attack - when string is plucked or note is struck • Dwell - energy left from attack • Sustain - while the note is held • Release - after player stops
Synthesizing an Instrument • Attack - when string is plucked or note is struck • Dwell - energy left from attack • Sustain - while the note is held • Release - after player stops
Synthesizing an Instrument • Attack - when string is plucked or note is struck • Dwell - energy left from attack • Sustain - while the note is held • Release - after player stops
Synthesizing an Instrument • Attack - when string is plucked or note is struck • Dwell - energy left from attack • Sustain - while the note is held • Release - after player stops
Synthesizing an Instrument • Attack - when string is plucked or note is struck • Dwell - energy left from attack • Sustain - while the note is held • Release - after player stops
Sampled / Object Sampled Object Jane loves Fred
Edit Sound • Drag and Drop (universities-deep_thoughts.wav) • File >> Import >> Audio • Notice new track (two if it is stereo) • File >> Import >> Audio (theknack.wav) • Notice second track • Select Track • Select Time Shift action • Move Track • Mix and Render (“barnyard”: cow, horse, duck) • Play/Mute/Align • Undo (Cntrl-Z)
Edit Sound • Split • Align • Select All • Import Dance Music • Trim • Shape • Record • Sing a round/Play around • Amplify/Distort • Blend • Arithmetic with Sounds
Arithmetic on Sound • Sound is an array of amplitudes (numbers) • The higher the amplitude, the louder the sound • Adding two sounds together • Make a sound louder or softer • Blends of two sounds • Echos
Adding two sounds Laser Guns + Distress = New Sound
Adding two sounds Algorithm Laser = laser gun sound; Warn = warning message; NewSnd = new array(Laser.length); for (each index i in NewSnd) { NewSnd[i]=Laser[i]+Warn[i]; }
Adding Sounds Demo • Drag or manufacture 2 or more track • Play • Shift • Mix and Render
Amplify Sound Demo • Effects -> Amplify
Making a sound louder for (each index i in oldSound) { newSound[i]=oldSound[i]*3; }
General Amplify algorithm amp = 3.0; three times as loud for (each index i in oldSound) { newSound[i]=oldSound[i]*amp; }
General Amplify algorithm amp = 0.5; half as loud for (each index i in oldSound) { newSound[i]=oldSound[i]*amp; }
Blending two sounds Music 50% music, 50% words Words
Blending Sounds Demo • 2+ Tracks -> Effects -> Amplify • Tracks -> Mix Render
Algorithm for Blending two sounds B = blend value between 0.0 and 1.0 for (each index i in Snd1) { newSnd[i]=(1.0-B)*Snd1[i]+ B*Snd2[i]; }
Singing a Round by yourself • Row Row Row your boat • Sing in a round
Singing a round by yourself + Time delay =
Singing a round by yourself Demo • 2+ tracks -> align/shift/paste • Tracks -> Mix Render
Singing a round by yourself song = the original song; delay = how many samples to delay; newSng = new array(song.length+delay); for (each index i in song) { newSng[i] = song[i]; } for (each index i in song) { newSng[i+delay] = newSng[i+delay]+song[i]; }
Echoes • An echo occurs because sound returns delayed and softer after bouncing off of something • Original • Canyon Echo (large delay) • Room Reverb (small delay)
Echoes Demo • Audacity • Effects -> Echo
Echoes Algorithm sound = the original sound; delay = how many samples to delay; softness = 0.1; newSound = new array(sound.length+delay); for (each index i in sound) { newSound[i] = sound[i]; } for (each index i in sound) { newSound[i+delay] = newSound[i+delay] + sound[i]*softness; }
Review • Sound Synthesis (MIDI, timbre, pitch, etc) • Change Pitch • Change Tempo • Change Speed