SlideShare a Scribd company logo
1 of 29
Filtering
• Filtering is another name for
subtractive synthesis
because it subtracts
frequencies from a sound
• Filtering is the opposite approach of
additive synthesis:
• Additive synthesis builds a complex sound
out of sine waves.
• Subtractive synthesis starts with a complex
source sound and removes some of the
frequency components.
Sound Examples
• Atlantic Brass Quintet
• Praetorius, "Introduction" from Terpsichore:
• 2 trumpets (high)
• horn and trombone (medium)
• tuba (low)
• [iv:10] original
• [iv:11] low-pass filtered
• [iv:12] high-pass filtered
• [iv:13] band-pass filtered
• [iv:14] notch (band-stop) filtered
• [iv:10] original
Csound Filters
• Four Main Filter Types:
• Low-pass — tone
• High-pass — atone
• Band-pass — reson
• Notch (Band-stop) — areson
Low-Pass Filter
• Very common, probably about 50% of filters
used in computer music are low-pass.
Frequency Response Curve
• power = amp2; amp = sqrt(power)
• 1/2 power = sqrt(2)/2 amp = ~71% amp
Csound Low-Pass Filter (tone)
• synthesized oboe
[iv:15] original tone
261.6 Hertz
[iv:16] low-pass filter
at 523.2 Hz
Csound Low-Pass Filter (tone)
• synthesized oboe with low-pass filter
; p2 p3 p4 p5 p6 p7 p8
; start dur amp freq attk dec filtfr
i10 1 3.0 10000 261.6 .045 .15 523.2
;ifiltfr=cps of response
afilt tone asig, ifiltfr ;curve's half amp point
afilt2 tone afilt, ifiltfr ;2nd filter =
;steeper rolloff
abal balance afilt2, asig ;balance amplitude
High-Pass Filter
• Passes high frequencies, attenuates lows.
• Used to brighten a signal
• be careful, can also increase noise
• About 20% of filters used in computer music
are high-pass.
Frequency Response Curve
Csound High-Pass Filter (atone)
• synthesized oboe
[iv:15] original tone
261.6 Hertz
[iv:19] high-pass filter
at 1046.4 Hz
Csound High-Pass Filter (atone)
• synthesized oboe with high-pass filter
; p2 p3 p4 p5 p6 p7 p8
; start dur amp freq attk dec filtfr
i10 1 3.0 10000 261.6 .045 .15 1046.4
;ifiltfr=cps of response
afilt atone asig, ifiltfr ;curve's half amp point
afilt2 atone afilt, ifiltfr ;2nd filter =
;steeper rolloff
abal balance afilt2, asig ;balance amplitude
Band-Pass Filter
• Passes band of frequencies, attenuates those
above and below band.
• Most common in implementations of discrete
Fourier transform to separate out harmonics.
• About 20% of filters used in computer music
are band-pass.
Frequency Response Curve
Csound Band-Pass Filter (reson)
• Defined by center frequency f0, and bandwidth
of pass-band = fhighcutoff - flowcutoff
• synthesized oboe
[iv:15] original tone
261.6 Hertz
[iv:18] b-pass filter
at 523.2 Hz/10 bw
Csound Band-Pass Filter (reson)
• synthesized oboe
[iv:19] b-p filter at
1046.4 Hz/100 bw
[iv:20] b-p filter at
1046.4 Hz/500 bw
Csound Band-Pass Filter (reson)
• synthesized oboe with band-pass filter
; p2 p3 p4 p5 p6 p7 p8 p9
; start dur amp freq attk dec filtfr bw
i10 1 3.0 10000 261.6 .045 .15 523.2 10
i10 1 3.0 10000 261.6 .045 .15 1046.4 100
i10 1 3.0 10000 261.6 .045 .15 1046.4 500
;ifiltfr=center freq of
afilt reson asig,ifiltfr,ibw,0 ;the passband
afilt2 reson afilt,ifiltfr,ibw,0 ;steeper rolloff
abal balance afilt2, asig ;balance amplitude
Band-Stop (Notch) Filter
• Stops band of frequencies, passes those
above and below band.
• Most common in removing electric hum (50
Hertz A/C).
• About 10% of filters used in computer music
are band-stop.
Frequency Response Curve
Csound Notch Filter (areson)
• Defined by center frequency f0, and bandwidth
of stop-band = fhighcutoff - flowcutoff
• pulse wave
[iv:21] original tone
261.6 Hertz
[iv:22] notch filter
at 1046.4 Hz
100 bw
Csound Notch Filter (areson)
• synthesized oboe with notch filter
; p2 p3 p4 p5 p6 p7 p8 p9
; start dur amp freq attk dec filtfr bw
i11 1 3.0 10000 261.6 .045 .15 1046.4 100
;ifiltfr=center freq of
afilt areson asig,ifiltfr,ibw,1 ;the stopband
afilt2 areson afilt,ifiltfr,ibw,1 ;steeper rolloff
abal balance afilt2, asig ;balance amplitude
• NOTE: The fourth argument in areson is
scaling — it must be 1 (0 default in Csound
manual doesn't work)
LP Filter
• original synthesized oboe tone 261.6
Hertz
[iv:15] 0. unfiltered tone [iv:26] 1. low-pass filter
523.2 Hz
HP and BP Filter
• original synthesized oboe tone 261.6
Hertz
[iv:27] 2. high-pass
1046.4 Hz
[iv:28] 3. band-pass
1046.4 Hz
Dynamically Changing the Center
Frequency and Bandwidth
• original synthesized bassoon tone 69 Hz
• b-pass filter — freq from fundamental to harmonic 15
[iv:23] bassoon at 69 Hz [iv:24] bp filter 69-1035 Hz/bw 15
; p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13
; st dur amp frq attk dec flt1 flt2 bw1 bw2 wai gls
i15 1 3 9000 69 .23 .1 69 1035 15 15 .2 .6
Dynamically Changing the Center
Frequency and Bandwidth
• original synthesized bassoon tone 69 Hz
• band-pass filter — bw moving from 10 to 500
[iv:25] bp filter 276 Hz/bw 10-500 same — first 3 harmonics
; p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13
; st dur amp frq attk dec flt1 flt2 bw1 bw2 wai gls
i15 1 10 9000 69 .23 .1 276 276 10 500 .2 .6
Dynamically Changing the Center
Frequency and Bandwidth
• In the Csound manual:
ar tone asig, khp[,istor] ;l-pass
ar atone asig, khp[,istor] ;h-pass
ar reson asig, kcf,kbw[,iscale,istor] ;b-pass
ar areson asig, kcf,kbw[iscale,istor] ;notch
• Default is 0 for iscale and istor
• NOTE: Make sure that iscale is 1 if using
the areson notch filter, as Csound doesn't
work properly with the 0 default
Dynamically Changing the Center
Frequency and Bandwidth
• We can change the half-power, the center
frequency and the bandwidth at the k-rate
using linseg statements
• original synthesized bassoon tone 69 Hz
• b-pass filter — freq from fundamental to harmonic 15
kflfr linseg 69, idur, 1035 ;linseg for center
afilt reson asig,kflfr,ibw,0 ;freq of the passband
• band-pass filter — bandwidth moving from 10 to 500
kbw linseg 10, idur, 500 ; linseg for bandwidth
afilt reson asig,iflfr,kbw,0 ; of the passband
Dynamically Changing the Center
Frequency and Bandwidth
• a musical example: oboe, Bach, Fugue #2 in C Minor
• [iv:29] no filter
• [iv:30] lp filter, 55 -> 160 Hertz
• [iv:31] bp filter, 220 -> 7040 Hertz, bw 1
• [iv:32] bp filter, 220 -> 7040 Hertz, bw 1 -> 100
[iv:33] Hiss and Hum
compare with [iv:34] 60 Hertz sine wave
• hiss
• high frequency noise you hear on cassette tapes
• unfocused — not just a single frequency
• which kind of filter can you use to get rid of it?
• hum
• the noise you hear from machinery (such as lights
and computers)
• focused frequency, same as the local electrical
power
• which kind of filter can you use to get rid of it?
Filtered Noise
with Band-Pass Filters
[iv:35] noise with bp filter at 1046.4 Hz/bw 1% of filter freq
; p2 p3 p4 p5 p6 p7 p8
; start dur amp freq attk dec bw
i16 1 5 4000 1046.4 2 2.5 .01
Filtered Noise
with Band-Pass Filters
• [iv:36] a musical example: Ayers, Companion
of Strange Intimacies
Filtered Noise
with Band-Pass Filters
;noiseflt.orc
instr 16 ; noise filter
idur = p3
iamp = p4
ifilfr = p5 ;filter frequency
iattack = p6
idecay = p7
ibw = p8 * ifreq ;max bandwidth for filter
isus = idur - iattack - idecay
kenv linseg 0,iattack,1,isus,1,idecay,0,1,0 ;ampenv
knenv = kenv * iamp ;env for noise source
anoise rand knenv ;noise source
;filter the noise source at ifreq
afilt reson anoise,ifreq,ibw*kenv,0,0
abal balance afilt, anoise ;balance amplitude
out abal ;OUTPUT asig here
endin
Filtered Noise
with Band-Pass Filters

More Related Content

Similar to filters.ppt

dennis fisher pll
dennis fisher pll dennis fisher pll
dennis fisher pll HowHwanWong
 
Sound, harmonics, frequency and pitch
Sound, harmonics, frequency and pitchSound, harmonics, frequency and pitch
Sound, harmonics, frequency and pitchZoe Harris
 
vibration signal filtering
vibration signal filteringvibration signal filtering
vibration signal filteringernest8397
 
Handout of sound
Handout of soundHandout of sound
Handout of soundZoe Harris
 
Filters 2
Filters 2Filters 2
Filters 2elipet
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4Build Your Own VR Display Course - SIGGRAPH 2017: Part 4
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4StanfordComputationalImaging
 
5 most important synthesis modules
5 most important synthesis modules5 most important synthesis modules
5 most important synthesis modulesphilipsugumaran
 
Monitor speaker Series
Monitor speaker SeriesMonitor speaker Series
Monitor speaker SeriesWidebo Stands
 
Monitor speaker Series
Monitor speaker SeriesMonitor speaker Series
Monitor speaker SeriesWidebo Stands
 
PURE TONE AUDIOMETRY for assesment of hearing
PURE TONE AUDIOMETRY for assesment of hearingPURE TONE AUDIOMETRY for assesment of hearing
PURE TONE AUDIOMETRY for assesment of hearingVaishnawiRai
 
Designing a notch filter using orcad 15.3
Designing a notch filter using orcad 15.3Designing a notch filter using orcad 15.3
Designing a notch filter using orcad 15.3Sushil Mishra
 

Similar to filters.ppt (20)

waveforms.ppt
waveforms.pptwaveforms.ppt
waveforms.ppt
 
dennis fisher pll
dennis fisher pll dennis fisher pll
dennis fisher pll
 
Sound, harmonics, frequency and pitch
Sound, harmonics, frequency and pitchSound, harmonics, frequency and pitch
Sound, harmonics, frequency and pitch
 
Crossovers
CrossoversCrossovers
Crossovers
 
vibration signal filtering
vibration signal filteringvibration signal filtering
vibration signal filtering
 
Handout of sound
Handout of soundHandout of sound
Handout of sound
 
Wavelet Transform and DSP Applications
Wavelet Transform and DSP ApplicationsWavelet Transform and DSP Applications
Wavelet Transform and DSP Applications
 
Filters 2
Filters 2Filters 2
Filters 2
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4Build Your Own VR Display Course - SIGGRAPH 2017: Part 4
Build Your Own VR Display Course - SIGGRAPH 2017: Part 4
 
5 most important synthesis modules
5 most important synthesis modules5 most important synthesis modules
5 most important synthesis modules
 
Monitor speaker Series
Monitor speaker SeriesMonitor speaker Series
Monitor speaker Series
 
Monitor speaker Series
Monitor speaker SeriesMonitor speaker Series
Monitor speaker Series
 
3 (1)
3 (1)3 (1)
3 (1)
 
Active Filters
Active FiltersActive Filters
Active Filters
 
Active filters
Active filtersActive filters
Active filters
 
Filters
FiltersFilters
Filters
 
The Overtone Spectrum
The Overtone SpectrumThe Overtone Spectrum
The Overtone Spectrum
 
PURE TONE AUDIOMETRY for assesment of hearing
PURE TONE AUDIOMETRY for assesment of hearingPURE TONE AUDIOMETRY for assesment of hearing
PURE TONE AUDIOMETRY for assesment of hearing
 
Designing a notch filter using orcad 15.3
Designing a notch filter using orcad 15.3Designing a notch filter using orcad 15.3
Designing a notch filter using orcad 15.3
 
Agdon
AgdonAgdon
Agdon
 

Recently uploaded

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 

Recently uploaded (20)

Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 

filters.ppt

  • 1.
  • 2. Filtering • Filtering is another name for subtractive synthesis because it subtracts frequencies from a sound • Filtering is the opposite approach of additive synthesis: • Additive synthesis builds a complex sound out of sine waves. • Subtractive synthesis starts with a complex source sound and removes some of the frequency components.
  • 3. Sound Examples • Atlantic Brass Quintet • Praetorius, "Introduction" from Terpsichore: • 2 trumpets (high) • horn and trombone (medium) • tuba (low) • [iv:10] original • [iv:11] low-pass filtered • [iv:12] high-pass filtered • [iv:13] band-pass filtered • [iv:14] notch (band-stop) filtered • [iv:10] original
  • 4. Csound Filters • Four Main Filter Types: • Low-pass — tone • High-pass — atone • Band-pass — reson • Notch (Band-stop) — areson
  • 5. Low-Pass Filter • Very common, probably about 50% of filters used in computer music are low-pass. Frequency Response Curve • power = amp2; amp = sqrt(power) • 1/2 power = sqrt(2)/2 amp = ~71% amp
  • 6. Csound Low-Pass Filter (tone) • synthesized oboe [iv:15] original tone 261.6 Hertz [iv:16] low-pass filter at 523.2 Hz
  • 7. Csound Low-Pass Filter (tone) • synthesized oboe with low-pass filter ; p2 p3 p4 p5 p6 p7 p8 ; start dur amp freq attk dec filtfr i10 1 3.0 10000 261.6 .045 .15 523.2 ;ifiltfr=cps of response afilt tone asig, ifiltfr ;curve's half amp point afilt2 tone afilt, ifiltfr ;2nd filter = ;steeper rolloff abal balance afilt2, asig ;balance amplitude
  • 8. High-Pass Filter • Passes high frequencies, attenuates lows. • Used to brighten a signal • be careful, can also increase noise • About 20% of filters used in computer music are high-pass. Frequency Response Curve
  • 9. Csound High-Pass Filter (atone) • synthesized oboe [iv:15] original tone 261.6 Hertz [iv:19] high-pass filter at 1046.4 Hz
  • 10. Csound High-Pass Filter (atone) • synthesized oboe with high-pass filter ; p2 p3 p4 p5 p6 p7 p8 ; start dur amp freq attk dec filtfr i10 1 3.0 10000 261.6 .045 .15 1046.4 ;ifiltfr=cps of response afilt atone asig, ifiltfr ;curve's half amp point afilt2 atone afilt, ifiltfr ;2nd filter = ;steeper rolloff abal balance afilt2, asig ;balance amplitude
  • 11. Band-Pass Filter • Passes band of frequencies, attenuates those above and below band. • Most common in implementations of discrete Fourier transform to separate out harmonics. • About 20% of filters used in computer music are band-pass. Frequency Response Curve
  • 12. Csound Band-Pass Filter (reson) • Defined by center frequency f0, and bandwidth of pass-band = fhighcutoff - flowcutoff • synthesized oboe [iv:15] original tone 261.6 Hertz [iv:18] b-pass filter at 523.2 Hz/10 bw
  • 13. Csound Band-Pass Filter (reson) • synthesized oboe [iv:19] b-p filter at 1046.4 Hz/100 bw [iv:20] b-p filter at 1046.4 Hz/500 bw
  • 14. Csound Band-Pass Filter (reson) • synthesized oboe with band-pass filter ; p2 p3 p4 p5 p6 p7 p8 p9 ; start dur amp freq attk dec filtfr bw i10 1 3.0 10000 261.6 .045 .15 523.2 10 i10 1 3.0 10000 261.6 .045 .15 1046.4 100 i10 1 3.0 10000 261.6 .045 .15 1046.4 500 ;ifiltfr=center freq of afilt reson asig,ifiltfr,ibw,0 ;the passband afilt2 reson afilt,ifiltfr,ibw,0 ;steeper rolloff abal balance afilt2, asig ;balance amplitude
  • 15. Band-Stop (Notch) Filter • Stops band of frequencies, passes those above and below band. • Most common in removing electric hum (50 Hertz A/C). • About 10% of filters used in computer music are band-stop. Frequency Response Curve
  • 16. Csound Notch Filter (areson) • Defined by center frequency f0, and bandwidth of stop-band = fhighcutoff - flowcutoff • pulse wave [iv:21] original tone 261.6 Hertz [iv:22] notch filter at 1046.4 Hz 100 bw
  • 17. Csound Notch Filter (areson) • synthesized oboe with notch filter ; p2 p3 p4 p5 p6 p7 p8 p9 ; start dur amp freq attk dec filtfr bw i11 1 3.0 10000 261.6 .045 .15 1046.4 100 ;ifiltfr=center freq of afilt areson asig,ifiltfr,ibw,1 ;the stopband afilt2 areson afilt,ifiltfr,ibw,1 ;steeper rolloff abal balance afilt2, asig ;balance amplitude • NOTE: The fourth argument in areson is scaling — it must be 1 (0 default in Csound manual doesn't work)
  • 18. LP Filter • original synthesized oboe tone 261.6 Hertz [iv:15] 0. unfiltered tone [iv:26] 1. low-pass filter 523.2 Hz
  • 19. HP and BP Filter • original synthesized oboe tone 261.6 Hertz [iv:27] 2. high-pass 1046.4 Hz [iv:28] 3. band-pass 1046.4 Hz
  • 20. Dynamically Changing the Center Frequency and Bandwidth • original synthesized bassoon tone 69 Hz • b-pass filter — freq from fundamental to harmonic 15 [iv:23] bassoon at 69 Hz [iv:24] bp filter 69-1035 Hz/bw 15 ; p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 ; st dur amp frq attk dec flt1 flt2 bw1 bw2 wai gls i15 1 3 9000 69 .23 .1 69 1035 15 15 .2 .6
  • 21. Dynamically Changing the Center Frequency and Bandwidth • original synthesized bassoon tone 69 Hz • band-pass filter — bw moving from 10 to 500 [iv:25] bp filter 276 Hz/bw 10-500 same — first 3 harmonics ; p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 ; st dur amp frq attk dec flt1 flt2 bw1 bw2 wai gls i15 1 10 9000 69 .23 .1 276 276 10 500 .2 .6
  • 22. Dynamically Changing the Center Frequency and Bandwidth • In the Csound manual: ar tone asig, khp[,istor] ;l-pass ar atone asig, khp[,istor] ;h-pass ar reson asig, kcf,kbw[,iscale,istor] ;b-pass ar areson asig, kcf,kbw[iscale,istor] ;notch • Default is 0 for iscale and istor • NOTE: Make sure that iscale is 1 if using the areson notch filter, as Csound doesn't work properly with the 0 default
  • 23. Dynamically Changing the Center Frequency and Bandwidth • We can change the half-power, the center frequency and the bandwidth at the k-rate using linseg statements • original synthesized bassoon tone 69 Hz • b-pass filter — freq from fundamental to harmonic 15 kflfr linseg 69, idur, 1035 ;linseg for center afilt reson asig,kflfr,ibw,0 ;freq of the passband • band-pass filter — bandwidth moving from 10 to 500 kbw linseg 10, idur, 500 ; linseg for bandwidth afilt reson asig,iflfr,kbw,0 ; of the passband
  • 24. Dynamically Changing the Center Frequency and Bandwidth • a musical example: oboe, Bach, Fugue #2 in C Minor • [iv:29] no filter • [iv:30] lp filter, 55 -> 160 Hertz • [iv:31] bp filter, 220 -> 7040 Hertz, bw 1 • [iv:32] bp filter, 220 -> 7040 Hertz, bw 1 -> 100
  • 25. [iv:33] Hiss and Hum compare with [iv:34] 60 Hertz sine wave • hiss • high frequency noise you hear on cassette tapes • unfocused — not just a single frequency • which kind of filter can you use to get rid of it? • hum • the noise you hear from machinery (such as lights and computers) • focused frequency, same as the local electrical power • which kind of filter can you use to get rid of it?
  • 26. Filtered Noise with Band-Pass Filters [iv:35] noise with bp filter at 1046.4 Hz/bw 1% of filter freq ; p2 p3 p4 p5 p6 p7 p8 ; start dur amp freq attk dec bw i16 1 5 4000 1046.4 2 2.5 .01
  • 27. Filtered Noise with Band-Pass Filters • [iv:36] a musical example: Ayers, Companion of Strange Intimacies
  • 28. Filtered Noise with Band-Pass Filters ;noiseflt.orc instr 16 ; noise filter idur = p3 iamp = p4 ifilfr = p5 ;filter frequency iattack = p6 idecay = p7 ibw = p8 * ifreq ;max bandwidth for filter isus = idur - iattack - idecay
  • 29. kenv linseg 0,iattack,1,isus,1,idecay,0,1,0 ;ampenv knenv = kenv * iamp ;env for noise source anoise rand knenv ;noise source ;filter the noise source at ifreq afilt reson anoise,ifreq,ibw*kenv,0,0 abal balance afilt, anoise ;balance amplitude out abal ;OUTPUT asig here endin Filtered Noise with Band-Pass Filters