HISE Logo Forum
    • Categories
    • Register
    • Login

    FFT Spectral Denoiser Faust dsp

    Scheduled Pinned Locked Moved General Questions
    7 Posts 5 Posters 265 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.
    • T
      treynterrio
      last edited by

      Hi there, I found a .pdf file with a Faust code for FFT spectral denoising and other spectral stuff I fixed a couple things in the code and can open it in the Faust WEB editor but I don't get any sound only a little sound at the beginning.
      Maybe someone could check that and fix this

      import("stdfaust.lib");
      
      fftSize = hslider("fftSize", 1024, 2, 16384, 1);
      
      bufferSize = fftSize / 2 + 1;
      
      cartopol(x, y) = sqrt(x * x + y * y), atan2(y, x);
      
      poltocar(r, theta) = r * cos(theta), r * sin(theta);
      
      freezeBtn = checkbox("Capture");
      
      reduceSld = hslider("Reduce", 0, 0, 2, 0.01);
      
      freeze(rIn, iIn, bin) = out with {
          freezeSignal(sig, frz) = orig + freezed with {
              orig = sig * (1 - frz);
              freezed = (orig : @(bufferSize)) + (orig * frz : @(bufferSize - 1)) * frz;
          };
          out = freezeSignal(rIn, freezeBtn), freezeSignal(iIn, freezeBtn);
      };
      
      fftproc(rIn, iIn, bin) = out with {
          pol = cartopol(rIn, iIn);
          mag = pol : _, !;
          phase = pol : !, _;
      
          pol_frozen = freeze(rIn, iIn, bin) : cartopol;
          mag_frozen = pol_frozen : _, !;
          phase_frozen = pol_frozen : !, _;
      
          out = poltocar(max(mag * (1 - freezeBtn) + (mag - mag_frozen * reduceSld) * freezeBtn, 0), phase);
      };
      
      process = fftproc;
      
      AxiomCruxA 1 Reply Last reply Reply Quote 1
      • AxiomCruxA
        AxiomCrux @treynterrio
        last edited by

        @treynterrio FAUST does FFT NOW!??! :O

        http://www.axiom-crux.net

        S 1 Reply Last reply Reply Quote 0
        • S
          sletz @AxiomCrux
          last edited by sletz

          @AxiomCrux No this FFT code can only work in a specialised "hacked" Faust IDE version that does FFT/iFF around the actual Faust DSP, using a social architecture, basically following the Max/MSP pfft model (https://docs.cycling74.com/legacy/max8/refpages/pfft~). This is not "official".

          1 Reply Last reply Reply Quote 0
          • A
            Allen
            last edited by

            seems like it's a faustgen code only for running inside maxmsp.

            Faust currently don't have any FFT functions for audio processing but since spectral denoiser doesn't need a complicated FFT structure so I think it'll be easy to be done in RNBO

            S mmprodM 2 Replies Last reply Reply Quote 0
            • S
              sletz @Allen
              last edited by

              Extract of Shihong Ren thesis "Creating an Online Platform and Tools for Real-Time Music Composition and Signal Processing"

              3e5870ee-509c-4f16-880e-65c17ebfbee2-These_Shihong_REN-FFT.pdf These_Shihong_REN-FFT

              1 Reply Last reply Reply Quote 0
              • mmprodM
                mmprod @Allen
                last edited by

                @Allen I’ve done this in rnbo(it’s pretty straightforward) but it uses a ton of cpu especially if you try to add different fft sizes

                For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
                John 3:16

                A 1 Reply Last reply Reply Quote 0
                • A
                  Allen @mmprod
                  last edited by

                  @mmprod
                  Didn't expect that...
                  I thought the fft performance in rnbo is really bad but if it couldn't even handle a denoiser, it probably just isn't designed for audio processing purpose...

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

                  30

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  102.3k

                  Posts