Download presentation
Presentation is loading. Please wait.
Published byEleanor Merritt Modified over 9 years ago
1
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 9: Panning/Balance Ken Greenebaum
2
Copyright 2004 Ken Greenebaum Sampling at 2f problematic Troubling: Troubling: sampling at exactly 2f sampling at exactly 2f can capture only zero crossings can capture only zero crossings
3
Copyright 2004 Ken Greenebaum Sampling at 2f problematic Should be problematic: Should be problematic: Shannon mandates: Shannon mandates: Signal of finite energy Signal of finite energy
4
Copyright 2004 Ken Greenebaum Sampling at 2f problematic Sine wave Sine wave Infinite extent Infinite extent Infinite energy Infinite energy Finite extent Finite extent Contains beginning/ending Contains beginning/ending Contains higher frequencies Contains higher frequencies
5
Copyright 2004 Ken Greenebaum Assignment 3B Collision Challenging/Creative Challenging/Creative Questions? Questions?
6
Copyright 2004 Ken Greenebaum Assignment 3B Collision Some people had difficulty Some people had difficulty This is OK This is OK Learn about audio challenges Learn about audio challenges Optional 3C for those individuals who want Optional 3C for those individuals who want Full experience Full experience Make up for lost credit on 3B Make up for lost credit on 3B
7
Copyright 2004 Ken Greenebaum 3B Collision Examples Examples Put.col,.par files on /pub Put.col,.par files on /pub
8
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision Parse.par file named on command line Parse.par file named on command line Generate (small) list of random partials Generate (small) list of random partials If no.par file provided If no.par file provided Play partials via popen() partial.exe Play partials via popen() partial.exe (programmatically open pipe) (programmatically open pipe)
9
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision while(1) while(1) Mutate current partial list twice Mutate current partial list twice Forming a, b mutations Forming a, b mutations Play a, b mutations Play a, b mutations Read char in raw mode Read char in raw mode (Hitting enter not required) (Hitting enter not required) Perform desired action Perform desired action
10
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision Commands: Commands: p: play/print current partials p: play/print current partials r: replay a,b mutations r: replay a,b mutations d: discard mutations and mutate current to form new a and b partials d: discard mutations and mutate current to form new a and b partials a: select mutation a as current + play it a: select mutation a as current + play it b: select mutation b as current + play it b: select mutation b as current + play it q: quit q: quit
11
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision Mutations: Mutations: Randomly change a parameter by a % Randomly change a parameter by a % Larger percentages less likely Larger percentages less likely Occasionally Occasionally copy a partial copy a partial Delete a partial from the list Delete a partial from the list
12
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision Iteratively select a or b mutations Iteratively select a or b mutations Attempting to evolve desired sound Attempting to evolve desired sound
13
Copyright 2004 Ken Greenebaum Optional 3C GeneticCollision For full credit turn in: For full credit turn in: geneticCollision.c, makefile geneticCollision.c, makefile 2.par files generated with program 2.par files generated with program Realistic sounds Realistic sounds Description of what the sounds are Description of what the sounds are Individual, not group extra credit Individual, not group extra credit
14
Copyright 2004 Ken Greenebaum Balance/Pan Methods to move audio energy Methods to move audio energy Forms of spatialization Forms of spatialization Making a sound appear to originate from a position in space Making a sound appear to originate from a position in space
15
Copyright 2004 Ken Greenebaum Spatialization techniques Will discuss in detail later in semmester Will discuss in detail later in semmester Simple overview of techniques: Simple overview of techniques: 2 speaker panning 2 speaker panning N speaker panning N speaker panning HRTF techniques HRTF techniques
16
Copyright 2004 Ken Greenebaum Balance Scale every right or left sample by R or L: Scale every right or left sample by R or L: R = (1 + Balance)/2 R = (1 + Balance)/2 L = 1 – R L = 1 – R Balance of: Balance of: -1 hard left -1 hard left 0 center 0 center 1 hard right 1 hard right
17
Copyright 2004 Ken Greenebaum Balance Left and right scaling for balance [-1,1] Left and right scaling for balance [-1,1] +1 0 1 +1 0 1
18
Copyright 2004 Ken Greenebaum Digital volume issues Volume controls are meant to be turned Volume controls are meant to be turned Early digital volume controls sounded annoying Early digital volume controls sounded annoying Pop, pop, pop, pop Pop, pop, pop, pop Like a zipper! Like a zipper!
19
Copyright 2004 Ken Greenebaum Dezippering Every volume change imperceptible Every volume change imperceptible Every step less than JND threshold Every step less than JND threshold < 1 dB SPL < 1 dB SPL Two approaches Two approaches Control size of each step Control size of each step Make changes only at zero crossings Make changes only at zero crossings
20
Copyright 2004 Ken Greenebaum Issues with balance Poor for simulating position Poor for simulating position Perceived distance based on intensity Perceived distance based on intensity Not amplitude Not amplitude Intensity proportional to amplitude ^ 2 Intensity proportional to amplitude ^ 2 Intensity at midpoint Intensity at midpoint 0.5^2 + 0.5^2 = 0.5 0.5^2 + 0.5^2 = 0.5 Intensity at far right or left Intensity at far right or left 1^2 + 0^2 = 1 1^2 + 0^2 = 1 Creating a 3dB “hole in the middle” Creating a 3dB “hole in the middle”
21
Copyright 2004 Ken Greenebaum Loudspeaker/apparent position Sound Source Listener r 0 Azimuth l
22
Copyright 2004 Ken Greenebaum Constant intensity panning Want intensity to be the same at any point Want intensity to be the same at any point Consider the trig identity: Consider the trig identity: Orthogonal speaker placement implies: Orthogonal speaker placement implies:
23
Copyright 2004 Ken Greenebaum Constant intensity panning Substituting we get: Substituting we get: Applying the identity: sin( ) = cos( +90 ) Applying the identity: sin( ) = cos( +90 )
24
Copyright 2004 Ken Greenebaum Constant intensity panning Eq. of gain curve: Eq. of gain curve: θ i angle between apparent source and speaker I θ i angle between apparent source and speaker I
25
Copyright 2004 Ken Greenebaum Constant intensity panning 1.707LeftRight Left speaker gain 0 Right speaker gain LeftRight.707 1 0
26
Copyright 2004 Ken Greenebaum Mixing non-spatialized sounds Assume Non-spatialized sounds come from the middle Assume Non-spatialized sounds come from the middle Gain = 0.707 Gain = 0.707 General n speaker case General n speaker case
27
Copyright 2004 Ken Greenebaum More spatialization to come We will return to spatialization later in semester and discuss We will return to spatialization later in semester and discuss Distance based attenuation Distance based attenuation Doppler Doppler Multiple speaker arrays Multiple speaker arrays Binaural sound/HRTFs Binaural sound/HRTFs
28
Copyright 2004 Ken Greenebaum Next class: Non-sinusoidal waves Non-sinusoidal waves Mixer assignment Mixer assignment
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.