HISE Logo Forum
    • Categories
    • Register
    • Login

    Faustian compiles still a nightmare - now something new...

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 180 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.
    • LindonL
      Lindon
      last edited by

      So Im trying to build a compressor using the std faust compressor library, and the dll compile proces sis giving me this :

      D:\HISE\hi_dsp_library\snex_basics\snex_Types.h(1167,4): error C2148: total size of array must not exceed 0x7fffffff by
      tes [C:\Current_HISE_work\Horizen\DspNetworks\Binaries\Builds\VisualStudio2022\Horizen_DynamicLibrary.vcxproj]
        (compiling source file '../../Source/Main.cpp')
        D:\HISE\hi_dsp_library\snex_basics\snex_Types.h(1167,4):
        the template instantiation context (the oldest one first) is
              C:\Current_HISE_work\Horizen\DspNetworks\Binaries\Source\Main.cpp(31,3):
              see reference to function template instantiation 'void scriptnode::dll::StaticLibraryHostFactory::registerPolyN
        ode<scriptnode::faust::faust_static_wrapper<1,scriptnode::parameter::empty_list,_myFaustCompTwoFile,project::myFaustC
        ompTwoFileMetaData,2>,scriptnode::faust::faust_static_wrapper<256,scriptnode::parameter::empty_list,_myFaustCompTwoFi
        le,project::myFaustCompTwoFileMetaData,2>>(void)' being compiled
              D:\HISE\hi_dsp_library\node_api\nodes\OpaqueNode.h(413,79):
              see reference to function template instantiation 'void scriptnode::OpaqueNode::create<PolyT>(void)' being compi
        led
                with
                [
                    PolyT=scriptnode::faust::faust_static_wrapper<256,scriptnode::parameter::empty_list,_myFaustCompTwoFile,p
        roject::myFaustCompTwoFileMetaData,2>
                ]
              D:\HISE\hi_dsp_library\node_api\nodes\OpaqueNode.h(130,28):
              see reference to class template instantiation 'scriptnode::faust::faust_static_wrapper<256,scriptnode::paramete
        r::empty_list,_myFaustCompTwoFile,project::myFaustCompTwoFileMetaData,2>' being compiled
              D:\HISE\hi_faust\FaustStaticWrapper.h(29,27):
              see reference to class template instantiation 'snex::Types::PolyData<FaustClass,256>' being compiled
                with
                [
                    FaustClass=_myFaustCompTwoFile
                ]
      

      so it seems to be upset with my Faust code (myFaustCompTwoFile, which contains this:

      // Faust Source File: myFaustCompTwoFile
      // Created with HISE on 2024-07-23
      import("stdfaust.lib");
      
      //strength: strength of the compression (0 = no compression, 1 means hard limiting, >1 means over-compression)
      //strength = hslider("Strength", 0, 0, 2, 0.01);
      
      strength = co.ratio2strength(hslider("Ratio", 1, 1, 20, 0.01));
      //thresh: dB level threshold above which compression kicks in
      thresh = hslider("Thresh", 0, -60, 0, 0.1);
      //att: attack time = time constant (sec) when level & compression going up
      att = hslider("Attack", 0, 0, 2, 0.01);
      //rel: release time = time constant (sec) coming out of compression
      rel = hslider("Release", 0, 0, 3, 0.01);
      //knee: a gradual increase in gain reduction around the threshold: below thresh-(knee/2) there is no gain reduction, above thresh+(knee/2) there is the same gain reduction as without a knee, and in between there is a gradual increase in gain reduction.
      knee = hslider("knee", 0, 0, 8, 0.1);
      //prePost: places the level detector either at the input or after the gain computer; this turns it from a linear return-to-zero detector into a log domain return-to-threshold detector
      //prePost = hslider("Mode", 0, 0, 1, 1);
      //link: the amount of linkage between the channels. 0 = each channel is independent, 1 = all channels have the same amount of gain reduction
      //link = hslider("Link", 0, 0, 1, 0.01);
      
      compress(left,right) = left,right : co.RMS_compression_gain_N_chan(strength,thresh,att,rel,knee,0,1,2) : *(left), *(right);
      
      process = compress;
      

      Does anyone have any idea what is going on here?

      HISE Development for hire.
      www.channelrobot.com

      Christoph HartC 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart @Lindon
        last edited by

        @Lindon looks like a compile error in the faust code generator - something is allocating an array too large for your compiler.

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

          @Christoph-Hart said in Faustian compiles still a nightmare - now something new...:

          @Lindon looks like a compile error in the faust code generator - something is allocating an array too large for your compiler.

          yes...but what? where? and how to fix it?

          The compile process for the file executes fine...so it goes away and builds its cpp and .h files, but frankly its a pretty vanilla piece of code in faust I think...

          HISE Development for hire.
          www.channelrobot.com

          Christoph HartC 1 Reply Last reply Reply Quote 1
          • Christoph HartC
            Christoph Hart @Lindon
            last edited by

            @Lindon ah hold on, it seems to be in the wrapper code, maybe something is blowing up the parameter count.

            Christoph HartC 1 Reply Last reply Reply Quote 2
            • Christoph HartC
              Christoph Hart @Christoph Hart
              last edited by

              So the problem was that the C++ code that is generated by the Faust example above indeed creates an object that has a compile-time array of around 8MB (most likely some delay buffers). The problem was that if by default, HISE also generated a polyphonic version, which multiplied this with the voice count, so you ended up with an object that is 2GB big, which made the compiler nope out of there.

              I fixed it by changing the default to NOT create polyphonic versions of the FX, unless the faust / SNEX node is explicitely used in a network that has the AllowPolyphony flag set (or if it's a custom C++ node, if the node_properties.json file has defined the AllowPolyphony flag alongside with the isPolyphonic flag).

              LindonL clevername27C 2 Replies Last reply Reply Quote 3
              • LindonL
                Lindon @Christoph Hart
                last edited by

                @Christoph-Hart well done. Im just dropping this in as a master or send FX so no polyphony set at all.. so Im all good. thanks.

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 2
                • clevername27C
                  clevername27 @Christoph Hart
                  last edited by

                  @Christoph-Hart @Lindon Can you guys share what the case is for polyphonic vs master ScriptNode? As I understand, if I want the effect applied independently to every voice, I go polyphonic — if it's like a buss thing, then it's master. (All of my ScriptNode stuff distorts after it's been compiled, and I'm trying to. figure it out. Everything is poly.)

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

                  14

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  103.2k

                  Posts