HISE Logo Forum
    • Categories
    • Register
    • Login

    Trying to compile C++ DSP info in HISE/load into Scriptnode

    Scheduled Pinned Locked Moved General Questions
    19 Posts 4 Posters 200 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.
    • L
      Lurch @d.healey
      last edited by

      @d-healey I'm working primarily on Mac, haven't looked at this in windows yet - do I need to compile this on windows first and then macOS?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Lurch
        last edited by

        @Lurch said in Trying to compile C++ DSP info in HISE/load into Scriptnode:

        do I need to compile this on windows first and then macOS?

        Nope.

        @Lurch said in Trying to compile C++ DSP info in HISE/load into Scriptnode:

        I built a totally different scriptnode project, still fails at 50%

        Make a new project. Add one script fx, add a gain node to it. Save it, compile the DLL. Does it work?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        L 1 Reply Last reply Reply Quote 0
        • L
          Lurch @d.healey
          last edited by

          @d-healey That worked - I've then moved clouds.dsp (my Faust granulator) into the Code Library/Faust folder, opened it in a scriptfx, compiled again and that was also successful. Clouds.h is what's throwing all these errors in the main project, so I reopened the main project, cleaned the build directory (deleted all the .h files etc) and then did compile DSP Networks as DLL again.

          Same error, still tripping up on it's newly build Clouds.h file -

          Downpour - Dynamic Library
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Builds/MacOSX/Downpour.xcodeproj The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 15.5.99.
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:72:46 No member named 'Clouds' in namespace 'project'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:72:56 Expected ';' after alias declaration
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:73:50 Use of undeclared identifier 'NV'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:73:53 Expected unqualified-id
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:77:39 No template named 'wet_path_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:79:39 No template named 'wet_path_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:83:50 Use of undeclared identifier 'wet_path_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:84:52 Expected ';' after alias declaration
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:85:49 Use of undeclared identifier 'NV'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:85:52 Expected unqualified-id
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:120:51 Use of undeclared identifier 'dry_wet1_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:121:52 Expected ';' after alias declaration
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:122:49 Use of undeclared identifier 'NV'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:122:52 Expected unqualified-id
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:127:37 Use of undeclared identifier 'wet_path6_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:158:38 Use of undeclared identifier 'dry_wet5_t'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:159:52 Expected ';' after alias declaration
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:160:49 Use of undeclared identifier 'NV'
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Clouds.h:160:52 Expected unqualified-id
          
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Main.cpp
          /Volumes/RHR Audio/Development/Clouds Test/DspNetworks/Binaries/Source/Main.cpp too many errors emitted, stopping now
          
          
          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Lurch
            last edited by

            @Lurch Yeah it's what I suspected, something on the faust side of things. Is this faust code you wrote yourself?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            L 1 Reply Last reply Reply Quote 0
            • L
              Lurch @d.healey
              last edited by

              @d-healey It's a granulator example from the Faust webpage! All works fine on the Faust IDE webpage.

              ///////////////////////////////////////////////////////////////////////////////////////////////////
              //
              // Grain Generator.
              // Another granular synthesis example.
              //
              ///////////////////////////////////////////////////////////////////////////////////////////////////
              //
              // ANALOG IN:
              // ANALOG 0	: Population: 0 = almost nothing. 1 = Full grain
              // ANALOG 1	: Depth of each grain, in ms.
              // ANALOG 2	: Position in the table = delay 
              // ANALOG 3	: Speed = pitch change of the grains
              // ANALOG 4	: Feedback
              //
              ///////////////////////////////////////////////////////////////////////////////////////////////////
              
              import("all.lib");
              
              // FOR 4 grains - MONO
              
              // UI //////////////////////////////////////////
              popul = 1 - hslider("population[BELA: ANALOG_0]", 1, 0, 1, 0.001);	// Coef 1 = maximum; 0 = almost nothing (0.95)
              taille = hslider("taille[BELA: ANALOG_1]", 250, 10, 500, 0.001 );	// Size in milliseconds
              decal = 1 - hslider("decal[BELA: ANALOG_2]",0,0,1,0.001);			// Read position compared to table write position
              
              speed = hslider("speed[BELA: ANALOG_3]", 1, 0.125, 4, 0.001);
              
              feedback = hslider("feedback[BELA: ANALOG_4]",0,0,2,0.001);	
              
              freq = 1000/taille;
              tmpTaille = taille*ma.SR/ 1000;
              clocSize = int(tmpTaille + (tmpTaille*popul*10)); // duration between 2 clicks
              
              // CLK GENERAL /////////////////////////////////
              // 4 clicks for 4 grains generators.
              // (idem clk freq/4 and a counter...)
              detect1(x) = select2 (x < 10, 0, 1);
              detect2(x) = select2 (x > clocSize*1/3, 0, 1) : select2 (x < (clocSize*1/3)+10, 0, _);
              detect3(x) = select2 (x > clocSize*2/3, 0, 1) : select2 (x < (clocSize*2/3)+10, 0, _);
              detect4(x) = select2 (x > clocSize-10, 0, 1);
              cloc = (%(_,clocSize))~(+(1)) <: (detect1: trig),(detect2: trig),(detect3: trig),(detect4: trig);
              
              // SIGNAUX Ctrls Player ////////////////////////
              trig = _<:_,mem: >;
              envelop = *(2*PI):+(PI):cos:*(0.5):+(0.5);
              
              rampe(f, t) = delta : (+ : select2(t,_,delta<0) : max(0)) ~ _ : raz
              	with {
              		raz(x) = select2 (x > 1, x, 0);
              		delta = sh(f,t)/ma.SR;
              		sh(x,t) = ba.sAndH(t,x);
              	};
              
              rampe2(speed, t) = delta : (+ : select2(t,_,delta<0) : max(0)) ~ _ 
              	with {
              		delta = sh(speed,t);
              		sh(x,t) = ba.sAndH(t,x);
              	};
              
              // RWTable //////////////////////////////////////
              unGrain(input, clk) = (linrwtable(wf , rindex) : *(0.2 * EnvGrain))
              	with {
                      SR = 44100;
                      buffer_sec = 1;
                      size = int(SR * buffer_sec);
                      init = 0.;
              
                      EnvGrain = clk : (rampe(freq) : envelop);	
              
                      windex = (%(_,size) ) ~ (+(1));
                      posTabl = int(ba.sAndH(clk, windex));
                      rindex = %(int(rampe2(speed, clk)) + posTabl + int(size * decal), size);
              
                      wf = size, init, int(windex), input;
                  };
              
              // LINEAR_INTERPOLATION_RWTABLE //////////////////////////////////
              // read rwtable with linear interpolation
              // wf : waveform to read (wf is defined by (size_buffer,init, windex, input))
              // x  : position to read (0 <= x < size(wf)) and float
              // nota: rwtable(size, init, windex, input, rindex)
              
              linrwtable(wf,x) = linterpolation(y0,y1,d)
                  with {
                      x0 = int(x);                //
                      x1 = int(x+1);				//
                      d  = x-x0;
                      y0 = rwtable(wf,x0);		//
                      y1 = rwtable(wf,x1);		//
                      linterpolation(v0,v1,c) = v0*(1-c)+v1*c;
                  };
              
              // FINALISATION /////////////////////////////////////////////////////////////////////////////////////
              routeur(a, b, c, d, e) = a, b, a, c, a, d, a, e;
              
              processus = _, cloc : routeur : (unGrain, unGrain, unGrain, unGrain) :> fi.dcblockerat(20);
              process = _,_: ((+(_,_) :processus) ~(*(feedback))),((+(_,_) :processus) ~(*(feedback)));
              
              
              d.healeyD LindonL 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @Lurch
                last edited by

                @Lurch said in Trying to compile C++ DSP info in HISE/load into Scriptnode:

                It's a granulator example from the Faust webpage!

                You'll have to debug it in HISE, or perhaps someone else on the forum has already tried this in HISE and can tell you what you need to do.

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                L 1 Reply Last reply Reply Quote 0
                • L
                  Lurch @d.healey
                  last edited by

                  @d-healey It compiles fine in HISE, what further debug steps can I take in HISE to see the issues?

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Lurch
                    last edited by

                    @Lurch said in Trying to compile C++ DSP info in HISE/load into Scriptnode:

                    hat further debug steps can I take in HISE to see the issues

                    I'm not sure, I haven't worked with faust in HISE. A forum search might turn up something useful.

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

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

                      @Lurch said in Trying to compile C++ DSP info in HISE/load into Scriptnode:

                      @d-healey It's a granulator example from the Faust webpage! All works fine on the Faust IDE webpage.

                      ///////////////////////////////////////////////////////////////////////////////////////////////////
                      //
                      // Grain Generator.
                      // Another granular synthesis example.
                      //
                      ///////////////////////////////////////////////////////////////////////////////////////////////////
                      //
                      // ANALOG IN:
                      // ANALOG 0	: Population: 0 = almost nothing. 1 = Full grain
                      // ANALOG 1	: Depth of each grain, in ms.
                      // ANALOG 2	: Position in the table = delay 
                      // ANALOG 3	: Speed = pitch change of the grains
                      // ANALOG 4	: Feedback
                      //
                      ///////////////////////////////////////////////////////////////////////////////////////////////////
                      
                      import("all.lib");
                      
                      // FOR 4 grains - MONO
                      
                      // UI //////////////////////////////////////////
                      popul = 1 - hslider("population[BELA: ANALOG_0]", 1, 0, 1, 0.001);	// Coef 1 = maximum; 0 = almost nothing (0.95)
                      taille = hslider("taille[BELA: ANALOG_1]", 250, 10, 500, 0.001 );	// Size in milliseconds
                      decal = 1 - hslider("decal[BELA: ANALOG_2]",0,0,1,0.001);			// Read position compared to table write position
                      
                      speed = hslider("speed[BELA: ANALOG_3]", 1, 0.125, 4, 0.001);
                      
                      feedback = hslider("feedback[BELA: ANALOG_4]",0,0,2,0.001);	
                      
                      freq = 1000/taille;
                      tmpTaille = taille*ma.SR/ 1000;
                      clocSize = int(tmpTaille + (tmpTaille*popul*10)); // duration between 2 clicks
                      
                      // CLK GENERAL /////////////////////////////////
                      // 4 clicks for 4 grains generators.
                      // (idem clk freq/4 and a counter...)
                      detect1(x) = select2 (x < 10, 0, 1);
                      detect2(x) = select2 (x > clocSize*1/3, 0, 1) : select2 (x < (clocSize*1/3)+10, 0, _);
                      detect3(x) = select2 (x > clocSize*2/3, 0, 1) : select2 (x < (clocSize*2/3)+10, 0, _);
                      detect4(x) = select2 (x > clocSize-10, 0, 1);
                      cloc = (%(_,clocSize))~(+(1)) <: (detect1: trig),(detect2: trig),(detect3: trig),(detect4: trig);
                      
                      // SIGNAUX Ctrls Player ////////////////////////
                      trig = _<:_,mem: >;
                      envelop = *(2*PI):+(PI):cos:*(0.5):+(0.5);
                      
                      rampe(f, t) = delta : (+ : select2(t,_,delta<0) : max(0)) ~ _ : raz
                      	with {
                      		raz(x) = select2 (x > 1, x, 0);
                      		delta = sh(f,t)/ma.SR;
                      		sh(x,t) = ba.sAndH(t,x);
                      	};
                      
                      rampe2(speed, t) = delta : (+ : select2(t,_,delta<0) : max(0)) ~ _ 
                      	with {
                      		delta = sh(speed,t);
                      		sh(x,t) = ba.sAndH(t,x);
                      	};
                      
                      // RWTable //////////////////////////////////////
                      unGrain(input, clk) = (linrwtable(wf , rindex) : *(0.2 * EnvGrain))
                      	with {
                              SR = 44100;
                              buffer_sec = 1;
                              size = int(SR * buffer_sec);
                              init = 0.;
                      
                              EnvGrain = clk : (rampe(freq) : envelop);	
                      
                              windex = (%(_,size) ) ~ (+(1));
                              posTabl = int(ba.sAndH(clk, windex));
                              rindex = %(int(rampe2(speed, clk)) + posTabl + int(size * decal), size);
                      
                              wf = size, init, int(windex), input;
                          };
                      
                      // LINEAR_INTERPOLATION_RWTABLE //////////////////////////////////
                      // read rwtable with linear interpolation
                      // wf : waveform to read (wf is defined by (size_buffer,init, windex, input))
                      // x  : position to read (0 <= x < size(wf)) and float
                      // nota: rwtable(size, init, windex, input, rindex)
                      
                      linrwtable(wf,x) = linterpolation(y0,y1,d)
                          with {
                              x0 = int(x);                //
                              x1 = int(x+1);				//
                              d  = x-x0;
                              y0 = rwtable(wf,x0);		//
                              y1 = rwtable(wf,x1);		//
                              linterpolation(v0,v1,c) = v0*(1-c)+v1*c;
                          };
                      
                      // FINALISATION /////////////////////////////////////////////////////////////////////////////////////
                      routeur(a, b, c, d, e) = a, b, a, c, a, d, a, e;
                      
                      processus = _, cloc : routeur : (unGrain, unGrain, unGrain, unGrain) :> fi.dcblockerat(20);
                      process = _,_: ((+(_,_) :processus) ~(*(feedback))),((+(_,_) :processus) ~(*(feedback)));
                      
                      

                      where have you put all.lib ???

                      HISE Development for hire.
                      www.channelrobot.com

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        Lurch @Lindon
                        last edited by

                        @Lindon It's one of the Faust standard libraries, it'll be in my Faust directory - other Faust work I've done has referenced stdfaust.lib and I've never had to include that in source or anything, even in the project as a whole?

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

                        20

                        Online

                        1.8k

                        Users

                        11.9k

                        Topics

                        104.0k

                        Posts