HISE Logo Forum
    • Categories
    • Register
    • Login

    Frequencies past Nyquist folding.

    Scheduled Pinned Locked Moved Faust Development
    5 Posts 3 Posters 99 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xander
      last edited by

      I have created a simple saw wave here.
      When the saw wave happens to produce frequencies above half the sample rate the frequencies fold so all the higher notes sound very ugly. Is there anyway I can create a fix for this in Faust?

      // xander
      import("stdfaust.lib");
      
      // midi controls
      freq = hslider("freq", 440, 1, 16000, 1);
      t = button("gate");
      
      // simple phasor
      phasor(f) = (+(freq / ma.SR)) ~ ma.frac;
      
      // subtle smoothing
      saw(f) = sin(phasor(f) * 2.0 - 1.0);
      
      // signal
      signal = saw(freq) * en.adsr(0.01, 1.5, 0.5, 1, t);
      
      // subtle harmonics
      tape(x) = x + aa.sine2(x^3) / 3;
      
      // process
      process = tape(signal), tape(signal);
      
      griffinboyG 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @xander
        last edited by

        @xander

        Search up videos on bandlimiting oscillators / antialiasing oscillators

        X 1 Reply Last reply Reply Quote 0
        • X
          xander @griffinboy
          last edited by

          @griffinboy Will do! If you have any resources you could point me towards, it'd be a big help

          griffinboyG LindonL 2 Replies Last reply Reply Quote 0
          • griffinboyG
            griffinboy @xander
            last edited by

            @xander

            I've never used faust, so IDK what the method would be like to do this in faust. But I'm sure people have done bandlimited / antialiased oscillators for faust before so you should be able to find something.

            1 Reply Last reply Reply Quote 1
            • LindonL
              Lindon @xander
              last edited by

              @xander try asking on the faust discord channel

              Link Preview Image
              Discord - Group Chat That’s All Fun & Games

              Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.

              favicon

              Discord (discord.com)

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              50

              Online

              1.7k

              Users

              11.7k

              Topics

              102.1k

              Posts