4. Understanding Aliasing - Digital Audio Fundamentals

Поділитися
Вставка
  • Опубліковано 26 сер 2024

КОМЕНТАРІ • 130

  • @akashmurthy
    @akashmurthy  2 роки тому +14

    I've noticed that some of you trying to replicate the audacity examples aren't getting any aliasing. Audacity is creating a 3500Hz tone instead of 7000Hz, and the debug output of nyquist says: "Warning: osc frequency reduced by 1 octaves from 7000 to 3500 hz to avoid aliasing." I've noticed the same behavior when I upgraded my version of Audacity to 2.4.2 and above.
    There must've been additional checks put in the code of hzosc. But if you follow the later example: return hzosc(ramp(1) * 7000)
    This works as expected! Aliasing does occur. So I am guessing there is a simple check to see if the number being entered is less than half the sample rate, otherwise it'll force it to be so.
    The reason why "ramp(1) * 7000" worked is because it's not a simple number, it's evaluated as a signal. It's a ramp signal going from 0 to 7000 in a certain duration. So I have a dirty fix for you, based on the same principle.
    You can try "return hzosc(pwl(0,1,1,1) * 7000)"
    It's not very pretty, but I'll tell you what it does. pwl is piece-wise linear function. It is essentially an envelop function. The 4 arguments state that at time 0, let the amplitude be 1, and at time 1, let the amplitude be 1. All it's describing is a straight line signal, with its value always as one. If you multiply this signal by 7000, you'll get a constant signal with 7000. Since this is not a simple number 7000, hzosc will not validate it, and will result in an aliased signal which is audible as 1000Hz. As expected.
    This is tested on the current latest version of 3.0.5

  • @StanleyGurvich
    @StanleyGurvich 3 роки тому +41

    Ok ive been on youtube since 2008 and this is hand down the best channel on these subjects. super simple and complicated at the same time. no bullshit. love this!
    This channel is going places in no time.

  • @michaos1
    @michaos1 25 днів тому

    Instuctional design skills put into these videos are remarkable, amount of work is phenomenal, and it’s all on top of the great explanation and script. Bravo!

  • @jitindavid2450
    @jitindavid2450 4 роки тому +15

    Very well illustrated. You don’t find such useful info about digital audio on UA-cam. Great job!!

    • @akashmurthy
      @akashmurthy  4 роки тому +1

      Thank you for checking it out man!

  • @leavy_Zola
    @leavy_Zola 6 місяців тому

    I am watching this as exam prep and it’s so unbelievably helpful. Thank you a lot for your work. By now I also feel like I’m getting a free Audacity introduction additionally 😂.

    • @akashmurthy
      @akashmurthy  6 місяців тому

      Glad to be of help! All the best for your exams

  • @choudharyom1
    @choudharyom1 2 роки тому +1

    who are you man, ur blowing things apart on YT platform, may god bless you for being so generous

    • @akashmurthy
      @akashmurthy  2 роки тому

      Just a man trying to host a channel! Thanks for the words of encouragement man!

  • @greatprince3190
    @greatprince3190 Рік тому

    big thx we saw that in class and it was verry unclear, with the visual and the way you present it , it's way easyer to grasp.
    thx for your work

    • @akashmurthy
      @akashmurthy  Рік тому

      You're welcome, I'm glad it helped out!

  • @harshitnegi6396
    @harshitnegi6396 7 місяців тому

    Currently watching the whole audio fundamental series and i can not thank you enough for this. An absolute gem.

    • @akashmurthy
      @akashmurthy  7 місяців тому

      That's awesome! Enjoy the series!

  • @heartwithreason
    @heartwithreason 2 роки тому +2

    Came here from the book: The Computer Music Tutorial by Curtis Roads in the Fundamental Concepts section where he was explaining aliasing. I am glad I read at least some of it because I found your gem of a channel! The info inside of the Roads book is somewhat antiquated (published in 95) and hard to understand but is still informative if you focus. The benefit of making this educational content in a visual and animated format, as you have done Akash, is for visual learners like myself. Keep making this intuitive content!

    • @akashmurthy
      @akashmurthy  2 роки тому +1

      Thanks so much! I'm glad you found the channel! I'm a visual learner myself, and I tend to learn more about these concepts while I'm animating them. Thanks for the book recommendation. I need to check the book out, it's not on my reading list!

  • @artsmusicstudio7379
    @artsmusicstudio7379 2 роки тому +3

    What a superb way to explain this concept! You have done a magnificent work Akash! Thank you!!!

  • @lcsper
    @lcsper 2 роки тому +1

    Amazing explanation. This is what I am sending people whenever I have to explain aliasing from now on.

  • @gurratell7326
    @gurratell7326 6 місяців тому

    I like your comparison with temporal aliasing in the start, people tend to not understand that aliasing is aliasing no matter the domain in a digital system, it's just perceived in different ways.
    Though I find it kind of interesting that it seems that it's only in the audio world that it's constantly and always killed with fire, while in movies, pictures, CG, games etc etc it's not. People even try to avoid it instead, like turning of motion blur in games, or movies nowadays more and more often have lower shutter angles (shorter shutter speeds). Of course I see why to some degree, it gets blurry, but then the only real solution is more frames or higher resolutions. I guess I just have to wait for the day when we can capture images as transparent as we can with sound today :)
    Anyways, you got a really good set of videos here, keep it up!

    • @akashmurthy
      @akashmurthy  6 місяців тому +1

      Thanks very much! Yea, aliasing is definitely a problem in very domain of work where discrete signals are used instead of continuous. It's unavoidable. It's just the cost doing business I suppose!

  • @luiza177music
    @luiza177music Рік тому

    I've always dismissed Audacity, never knew it could do that, that's awesome!

    • @akashmurthy
      @akashmurthy  Рік тому

      Yea! It's great! It now has VST3 support, which makes it a baller! But I've never thought of Audacity as a DAW, but more as an audio editor and analyzer.

  • @TWEAKER01
    @TWEAKER01 7 місяців тому

    Great summary. To clarify one point when it comes to music production, 8:54 and 13:24 shows that when users/engineers talk of digital audio "aliasing", what they're really referring to is its byproduct: *aliasing intermod distortion* .

  • @wergonnadoit
    @wergonnadoit 2 роки тому

    UA-cam is not just at all, This Chanel has a ton of amazing great information, the quality of the information and the amount of work that was put into the videos is phenomenal ,
    I am starting a new position in an AV company, and your channel helped me a lot to understand audio
    i really can not do you justice

    • @akashmurthy
      @akashmurthy  2 роки тому +1

      Thanks for the kind words! I'm really glad to know that the content helped you out.

  • @jayhu2296
    @jayhu2296 Рік тому

    probably the most satisfying video i've watched this month, and i'm a youtube addict..

  • @LesVideosdOlivier
    @LesVideosdOlivier 3 роки тому +1

    Fantastic explanation, I feel a lot smarter now than at the beginning of the video ;) Both the explanations/pedagogy and the video aspect are awesome!

    • @akashmurthy
      @akashmurthy  3 роки тому

      Thank you for the feedback, I'm glad you found it educational!

  • @bil63
    @bil63 4 роки тому +2

    Great! Thank you again! I think these videos are the best explanation of digital audio aspects in UA-cam!

  • @liltick102
    @liltick102 Рік тому

    This channel is incredible.

  • @davidhernandezcampos1628
    @davidhernandezcampos1628 2 роки тому

    Thanks Master, cheers from México

  • @GrandNecro
    @GrandNecro Рік тому

    i like your teaching style. lots of examples rather than just theory

  • @manikandanchembai3716
    @manikandanchembai3716 3 роки тому +2

    Hey yo, thanks brother. Beautiful video. Clear, concise and well presented. I'll be sure to share your videos with my peers.

  • @akepamusic
    @akepamusic Рік тому

    Fantastic series!!

  • @chilledvibes5700
    @chilledvibes5700 2 роки тому +1

    Literally awesome video!!!!!!!!!! Thanks for the video.

    • @akashmurthy
      @akashmurthy  2 роки тому

      Thanks for checking it out mate!

  • @user-ec1vt8kq9v
    @user-ec1vt8kq9v 2 роки тому

    Wow! My English is so bad, but I finally understood everything about aliasing. The great explanations! Thank you so much!

    • @akashmurthy
      @akashmurthy  2 роки тому

      Great stuff! Thanks for letting me know

  • @cohaagenup
    @cohaagenup 2 роки тому +2

    Wow, this was amazing and amazingly comprehensible, even to a math-less person like me. Thanks a lot!!!

    • @akashmurthy
      @akashmurthy  2 роки тому

      Thank you for the feedback! :)

  • @valevenga797
    @valevenga797 2 роки тому +1

    a great video, well done, cheers

  • @marcopostmartini
    @marcopostmartini 2 роки тому +1

    Great video!

  • @gurvinderdhiman9290
    @gurvinderdhiman9290 4 місяці тому

    Best Explaination 🙌♥️

  • @princessceballos
    @princessceballos Рік тому

    I came her for brief explanation but was enthralled at the science and stayed the whole time

    • @akashmurthy
      @akashmurthy  Рік тому

      Im glad you stayed! Stick around for more perhaps!

  • @Orrinton
    @Orrinton 6 місяців тому

    DDMF Metaplugin and PluginDoctor are 2 of my best friends 😌☺

  • @EC-TPavithiravalavan
    @EC-TPavithiravalavan 3 роки тому +1

    Really great video and best explanation I ever seen you deserve more views

  • @remy-
    @remy- 2 роки тому

    The best on YT!

  • @C622
    @C622 Рік тому

    It is so well explained that it makes me squeal with joy! ;-)

    • @akashmurthy
      @akashmurthy  Рік тому

      That's the best expression of enjoyment I've received for any of my videos. Thanks mate!

  • @janihannikainen1992
    @janihannikainen1992 2 роки тому

    Extremely well explained and demonstrated.

  • @altravolta
    @altravolta 2 роки тому +1

    Thanks. It was great answer.

  • @boshi9
    @boshi9 Рік тому

    Best explanation on UA-cam!

  • @XRaym
    @XRaym 2 роки тому

    The visualization are awesome, this is highly pedagogical, thx !!

  • @savinaynangalia7349
    @savinaynangalia7349 3 роки тому +2

    Incredible explanations 😯
    Thank you so much!

    • @akashmurthy
      @akashmurthy  3 роки тому

      You're welcome! Thanks for watching!

  •  3 роки тому

    This is really good. I'm watching all videos in this series.

    • @akashmurthy
      @akashmurthy  3 роки тому

      Cheers! Thanks for checking it out. Enjoy!

  • @leeoiou7295
    @leeoiou7295 2 роки тому +1

    great video

  • @BharathRajeevan
    @BharathRajeevan 3 роки тому

    Really loved the explanation! Eyeopener, you have a new fan!

    • @akashmurthy
      @akashmurthy  3 роки тому

      Thanks very much man! Glad you enjoyed it.

  • @danielcortesalvarez1935
    @danielcortesalvarez1935 Рік тому

    You saved my life.

  • @TheZeroomg
    @TheZeroomg Рік тому

    Was looking for video about alias but no luck, and after i'm in bed youtube algorithm do the perfect job

    • @akashmurthy
      @akashmurthy  Рік тому

      The algorithm gods are on your side today!

  • @nathangraves4318
    @nathangraves4318 3 роки тому

    -gaining foundation in material
    -question regarding elusive criteria
    -require proper conveyance specifically
    -has 1st and only Patreon sub

  • @linss7960
    @linss7960 6 місяців тому

    Very nice video!

  • @bsoach
    @bsoach 3 роки тому +1

    This is such a clear explanation - thanks Akash! Liked and subscribed

    • @akashmurthy
      @akashmurthy  3 роки тому

      Thank you for checking it out! :)

  • @rays7805
    @rays7805 18 днів тому

    I get it now. This makes sense.

  • @BenDinai
    @BenDinai 3 роки тому

    Amazing Video, so clear and well presented. Thank you very much!

    • @akashmurthy
      @akashmurthy  3 роки тому +1

      Thank you for it checking it out!

  • @trevorbeingtrevor
    @trevorbeingtrevor 5 місяців тому

    Many of your videos have brought me a greater understanding of important audio concepts. Thank you so much for your hard work! If you get a chance, I would love to know what software you use to make your excellent animations?

    • @akashmurthy
      @akashmurthy  5 місяців тому +1

      Thank you so much for your support!
      I use Adobe After Effects for most of the animations. Some of them were frames rendered through code in p5.js

  • @jakubkonarik578
    @jakubkonarik578 2 роки тому

    Absolutely goated!

  • @emerymesich1134
    @emerymesich1134 9 місяців тому

    Thank you!!!

  • @haydenvaniderstine9645
    @haydenvaniderstine9645 2 роки тому

    Superb

  • @MukkuPavanKumarPHD
    @MukkuPavanKumarPHD 5 місяців тому

    Hey, thank you so much for your lott of efforts to deliver experimental and theoretical justifications about aliasing. Could you please tell me how to prepare the edits like this? Actually, I want to teach to the students like this. So I have to know how I prepare my presentation like this.

    • @akashmurthy
      @akashmurthy  5 місяців тому

      You're welcome! These are all individual animations that I've made and stitched together in After Effects. You can do the same if you want, or download the video, chop pieces of it and show those instead.

  • @ashkanaref4056
    @ashkanaref4056 3 роки тому

    Thanks man!
    Plugin Alliance is taking notes 😆

    • @akashmurthy
      @akashmurthy  3 роки тому +1

      I don't know what that means, but sounds good! :D

  • @keerthana5979
    @keerthana5979 2 роки тому

    would you please clarify ,how to choose sample points for real time signal.....for example signal with sampling frequency of 360 HZ...sir ....

  • @bensfractals43
    @bensfractals43 2 роки тому

    how would i go about isolating this "alias"? i've seen someone else do it.

  • @sebastianvallejoperez9754
    @sebastianvallejoperez9754 3 роки тому

    duuuude, how is it that you don't have more subscribers or views,

    • @akashmurthy
      @akashmurthy  3 роки тому

      Haha..this is one of the better performing videos to be fair! :)

  • @kevinwydler4405
    @kevinwydler4405 3 роки тому

    This is so well expained!

  •  2 роки тому

    Hello again. Either, doesn't work for me when I try to make the slope signal. ¿What am I doing wrong? How do you make it work?

  • @thangible
    @thangible 3 роки тому

    you are awesome, thanksss

  • @legosteveb
    @legosteveb Рік тому

    Awesome video! Can you clarify…
    At 16:50 you summarize that they over sample then down sample. Is there a ~22kHz low pass filter step between the over sample and down sample steps?

    • @akashmurthy
      @akashmurthy  Рік тому +1

      Thanks! And yes, there's a mandatory low pass filter (usually an FIR filter) before downsampling a signal.

  • @ArtificialSoul
    @ArtificialSoul 2 роки тому

    I am trying to create soundfont preset with samples containing looped saw waves.
    For the ones who are familiar with soundfonts: aliasing usually occurs within such saw wave samples when they're above a certain pitch. They can sound correct when played in the same pitch as the root key, though with another pitch or even detuning with one cent aliasing occurs.
    So I assumed to fix it by editing the samples with a low pass filtre to remove the highest harmonics and creating "headroom" till the nyguist frequency.
    It doesn't help despite using a stronger cutoff (48 dB)
    What are the possibilities available for me to create an aliasing free soundfont?

  • @aussie_philosopher8079
    @aussie_philosopher8079 3 роки тому +1

    Hi akash I'm looking at getting up to speed with DSP and DAFX algorithm design in matlab (or other programs if you can reccomend) any books/information resources would he great so I can finish restart my masters at University.

    • @akashmurthy
      @akashmurthy  3 роки тому

      Hey Robert, there are a couple of resources I can suggest regarding DSP.
      The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith - This one is free, it's available as a PDF and piecewise chapters as well. But it's a bit old and dated, and it's not fully about processing audio, it's more general signal processing, but it's very informative nonetheless.
      Designing Audio Effect Plugins in C++ by Will Pirkle - Probably one of the best books I know regarding audio DSP algorithms. It's very informative, very easy to understand, but the examples are in C++ not Matlab.
      But really, it depends on what you are planning to learn in DSP, and what your goals are.

    • @akashmurthy
      @akashmurthy  3 роки тому

      Another great resource for DSP is Julius Smith from Stanford's CCMRA program. He has a few books. Amazing resources, and it's all free and available online.

    • @aussie_philosopher8079
      @aussie_philosopher8079 3 роки тому

      @@akashmurthy I read this at University, it was to complicated I know about the DSP guide, that's great also DAFX from Zolzer really helped.

  • @guntarssmits2104
    @guntarssmits2104 2 роки тому

    Nice educational videos with great visualization. Just wondering what tool is used to visualize your stories?

    • @akashmurthy
      @akashmurthy  2 роки тому +1

      Thanks mate! I use Adobe After Effects for the illustrations.

  • @largepoodle6036
    @largepoodle6036 2 роки тому

    so basically, 96kHz is the optimal samplerate if you want to avoid aliasing (in conjunction with analyzing frequency spectrums to ensure there is no aliasing taking place)
    i would say 192khz but pc isn't gonna be able to handle that lol. i think 96khz would still be perfectly ideal if youre going to be mastering down to 48khz or 44.1, which you most likely will.

  • @adrianbucher5299
    @adrianbucher5299 3 роки тому +1

    Very nice explanation!
    I wanted to create the aliasing effect on Audacity by myself but ran into a problem. When I set sampling-rate to 8000Hz and type the nyquist command: "return hzosc(7000)", Audacity will create a 3500Hz tone instead of 7000Hz! The debug output of nyquist says: "Warning: osc frequency reduced by 1 octaves from 7000 to 3500 hz to avoid aliasing."
    How can I force nyqist to enforce aliasing? I'm using Audacity version 2.4.2
    Many thanks!

    • @akashmurthy
      @akashmurthy  3 роки тому

      Hey Adrian, thanks for checking it out.
      I noticed the same behavior you are experiencing when I upgraded my version of Audacity to 2.4.2
      There must've been additional checks put in the code of hzosc. But if you follow the later example: return hzosc(ramp(1) * 7000)
      This works as expected! Aliasing does occur. So I am guessing there is a simple check to see if the number being entered is less than half the sample rate, otherwise it'll force it to be so.
      The reason why "ramp(1) * 7000" worked is because it's not a simple number, it's evaluated as a signal. It's a ramp signal going from 0 to 7000 in a certain duration. So I have a dirty fix for you, based on the same principle.
      You can try "return hzosc(pwl(0,1,1,1) * 7000)"
      It's not very pretty, but I'll tell you what it does. pwl is piece-wise linear function. It is essentially an envelop function. The 4 arguments state that at time 0, let the amplitude be 1, and at time 1, let the amplitude be 1. All it's describing is a straight line signal, with its value always as one. If you multiply this signal by 7000, you'll get a constant signal with 7000. Since this is not a simple number 7000, hzosc will not validate it, and will result in an aliased signal which is audible as 1000Hz. As expected.
      You can try posting any question you may have in the forums here. I'll surely be posting to find out if there is an alternate way to force aliasing.
      forum.audacityteam.org/viewforum.php?f=39

    • @adrianbucher5299
      @adrianbucher5299 3 роки тому

      Hey Akash
      Awesome!
      Thank you for showing me a workaround to force aliasing using a constant frequency!

  • @definty
    @definty 3 роки тому

    Nice video dude, you have a talent for teaching. Why not just use a low pass filter at the end of your plugins to stop anti-aliasing instead of oversampling?

    • @akashmurthy
      @akashmurthy  3 роки тому

      Cheers!
      So, higher frequency output is possible in these plugins I talked about. They are a result of calculations that are unavoidable. If frequencies greater than the Nyquist frequency are generated, they are automatically aliased! So the problem here is range. If the output frequencies exceed the range, there is no point filtering them out, they are already aliased and sitting well within the range.
      To get rid of these higher frequencies, you'll first have to exceed the range (by oversampling) such that they don't alias! After that, you can low pass filter them.

    • @definty
      @definty 3 роки тому

      @@akashmurthy Ahh I see thanks :) So you can't stop harmonics bouncing back down if your using a lower sample rate even if you use a low pass.

  • @collectionofsensations
    @collectionofsensations 2 роки тому

    If i record a analog synthesizer playing a square wave, using a 96kHz sample rate. That i guess would result in a sampled square wave with more higher order partials, less aliasing in the audible range than if i instead would use 48kHz sample rate. That way higher sample rates i guess is more useful in situations where aliasing would otherwise occur right? Or does the aliasing get filtered out in the ADC anyway? But the square wave in this example still needs higher resolution to get a higher fidelity sampled representation in the digital domain i suppose, that way higher sample rate would come closer to the analog domain signal?
    Since project sample rates affect CPU load, i am wondering when i benefit from using higher recording sample rate than 44,1kHz? If we take the square wave example, or when recording distortion effects for example, would you benefit from using a higher sample rate (96kHz) and then down sample the recording by using a lower (44,1kHz) sample rate in the project settings? To ease CPU load, and instead upsample non linear effects like compressors and saturation? 44,1kHz would create kind of edgy sampled 20kHz waves in the digital domain, but DACs will make them more rounded right through some algorithm?

    • @akashmurthy
      @akashmurthy  2 роки тому +1

      If you convert any analog medium to digital one, you are passing it through an ADC. An ADC will filter out all frequencies above the Nyquist, whatever your sampling rate maybe.
      "But the square wave in this example still needs higher resolution to get a higher fidelity sampled representation in the digital domain" - No, categorically no. The sampling theorem guarantees that all frequency partials below the Nyquist frequency will be faithfully represented.
      "44,1kHz would create kind of edgy sampled 20kHz waves in the digital domain" - Again, no it would not, for the very same reason as above. 20kHz is below the Nyquist Frequency, so it WILL be accurately represented. The DAC does not use any algorithm to smooth it out. It uses Sinc interpolation to get back the original signal, EXACTLY as it was before being digitized.
      Check out video 2 on Sampling Theorem if you haven't already.
      "i am wondering when i benefit from using higher recording sample rate than 44,1kHz" - there is no benefit. Simple as that.
      As I mention in this video, the benefit is only when generating high frequency partials WITHIN the digital domain, not when recording.

    • @collectionofsensations
      @collectionofsensations 2 роки тому +1

      @@akashmurthy Million thank you Akash! 🙇‍♂

  •  2 роки тому

    HELLO. IM TRYING TO DO IT THE SAME WAY BUT when I generate a 7000 hz didn't die me a 1000hz sine wave. Instead I get 3500. If I use 6000 it gives me 3000hz. ¿How come is this happening? What am I doing wrong?

    • @akashmurthy
      @akashmurthy  2 роки тому

      Please check the pinned comment for the solution.

  • @LakshayKukreja11
    @LakshayKukreja11 2 роки тому

    Fuckin genius, man! Mind blown at 9:22

    • @akashmurthy
      @akashmurthy  2 роки тому

      Haha! Blew my mind as well when I realised it. Cheers man!

  • @andreas9483
    @andreas9483 3 роки тому

    Great content. Do you use python for the visualisation?

    • @akashmurthy
      @akashmurthy  3 роки тому

      Thanks! No, I use expression scripting within After Effects. It's loosely written in JavaScript, and it gives quite a lot of control. Sometimes, I've had to resort to a library called Processing for some visuals.

  • @godmeherbaba5607
    @godmeherbaba5607 Рік тому

    💕💕💘💘💖💖

  • @deanrinehart
    @deanrinehart 3 роки тому

    How is this free?

    • @deanrinehart
      @deanrinehart 3 роки тому

      Well now it’s costing me $6.50 a month… ;)

    • @akashmurthy
      @akashmurthy  3 роки тому

      @@deanrinehart thanks a lot for the Patreon subscription my man! :)