HISE Logo Forum
    • Categories
    • Register
    • Login

    Some Faust errors on Hise

    Scheduled Pinned Locked Moved Faust Development
    18 Posts 8 Posters 1.6k 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.
    • ?
      A Former User
      last edited by A Former User

      Hello guys.

      I've just started to tweak the Faust library on my M1 Mac (Xcode 13.1 - Monterey), some examples are great and working.

      But I am getting sime kind of errors with some of them. So here are the codes and errors, are these bugs or is there any way to fix them? @Christoph-Hart @etXzat @sletz


      Diode Clipper.png

      import("stdfaust.lib");
      diode_clipper(in1) = wd.buildtree(tree)
      with{
          // declare components
          d1(i) = wd.u_diodeAntiparallel(i, 2.52*10^-9, 25.85*10^-3, 1, 1); 
          vin(i) = wd.resVoltage(i, 4700, in1);
          c1(i) = wd.capacitor_Vout(i, 47.0e-9);
          // declare connection tree
          tree = d1 : (wd.parallel : (vin, c1));
      };
      
      process = diode_clipper; 
      

      Flanger.png

      declare name "phaserFlangerLab";
      
      import("stdfaust.lib");
      
      fx_stack = 
       vgroup("[1]", dm.sawtooth_demo) <:
       vgroup("[2]", dm.flanger_demo) : 
       vgroup("[3]", dm.phaser2_demo);
      
      level_viewer(x,y) = attach(x, vgroup("[4]", dm.spectral_level_demo(x+y))),y;
      
      process = fx_stack : level_viewer;
      
      

      Cuaua Clip.png

      //Chua's diode circuit
      //original circuit featuring Chua's diode taken from Kurt Werner thesis
      //for reference, see  Meerkotter and Scholz, "Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles"
      wdf = library("wdmodels.lib");
      
      import("stdfaust.lib");
      
      //create circuit components
      c1(i) = wdf.capacitor_output(i, 5.5*10^(-9));
      r2(i) = wdf.resistor_output(i, 1.6*10^3); //resistance must be slightly higher than original document, currently unsure why. 
      l3(i) = wdf.inductor_output(i, 7.07*10^(-3));
      c4(i) = wdf.capacitor_output(i, 49.5*10^(-9));
      d1(i) = wdf.u_chua(i, -500*10^-6, -800*10^-6, 1);
      //I've added a voltage injection for agitation purposes. the system will always initialize with zeros, so adding an impulse will get oscillations started. 
      vInject(i) = wdf.series_voltage(i, button("impulse")*5 : ba.impulsify);
      
      //input tree structure
      treeChua =  d1 : (wdf.parallel : (c1, (wdf.series : (r2, (wdf.parallel : (l3, (vInject :c4)))))));
      
      
      chua = wdf.buildtree(treeChua);   
      
      process = chua;
      
      toxonicT Dan KorneffD 2 Replies Last reply Reply Quote 0
      • toxonicT
        toxonic @A Former User
        last edited by toxonic

        @Steve-Mohican
        In the first example you only have one in- and one output, while the hise core.faust node expects 2 ins and outs.
        you can make it process stero channels by changing the process line as follows:

        process = sp.stereoize(diode_clipper);
        

        In the second exapmple, there's an 15 band analyzer included, each band displayed by an "bargraph" module, which HISE interprets as a modulation source. Since HISE only accepts 4 moulation sources per node, this will lead to an error. You can just delete the ": level_viewer" from the process line, then the example works, but without analyzer.

        The last one is somehow mystic (at least to me). There are a lot of functions that are not part of the included libray "wdmodels.lib". You can have a look at the contents of the library here.

        ? ? 2 Replies Last reply Reply Quote 1
        • Dan KorneffD
          Dan Korneff @A Former User
          last edited by

          @Steve-Mohican in the last example, I think you have to use capacitor_Vout instead of capacitor_output

          Dan Korneff - Producer / Mixer / Audio Nerd

          toxonicT ? 2 Replies Last reply Reply Quote 0
          • toxonicT
            toxonic @Dan Korneff
            last edited by

            @Dan-Korneff Yeah, i thought about that too, but since i have no clue of electrics, i kept that advice for me... 😂 . Maybe the example code is outdated and the library was updated in the meantime?

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

              Since HISE only accepts 4 moulation sources per node

              BTW this is just an arbitrary limitation and you can raise that with a preprocessor constant if you need more but it has a small impact on CPU usage so I picked whatever sensible value I thought makes sense.

              toxonicT 1 Reply Last reply Reply Quote 1
              • toxonicT
                toxonic @Christoph Hart
                last edited by toxonic

                @Christoph-Hart What would i have to type into the preprocessor definitions to extend the modulation sources amount?

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

                  It's called HISE_NUM_MAX_FAUST_MOD_SOURCES.

                  hisefiloH 1 Reply Last reply Reply Quote 2
                  • ?
                    A Former User @toxonic
                    last edited by

                    @toxonic Thank you so much for the tips, Faust is very good and it'j so enjoying to use it :)

                    1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @Dan Korneff
                      last edited by

                      @Dan-Korneff I'll try this ASAP, thank you so much!

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @toxonic
                        last edited by A Former User

                        @toxonic

                        I am trying to run the reverbs from here: https://faustdoc.grame.fr/examples/reverb/

                        But I get the below errors on most of them. How to overcome this?

                        Screen Shot 2023-01-05 at 11.47.31.png

                        For example, the below one gives this error:

                        declare name "zitaRevFDN";
                        declare version "0.0";
                        declare author "JOS, Revised by RM";
                        declare description "Reverb demo application based on zita_rev_fdn.";
                        
                        import("stdfaust.lib");
                        
                        process = dm.zita_rev_fdn_demo;
                        
                        
                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @A Former User
                          last edited by

                          @harris-rosendahl Seems related to this:
                          https://forum.hise.audio/topic/7024/faust-channel-mismatch-how-to-tackle-it

                          Can't help pressing F5 in the forum...

                          ? 1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User @ustk
                            last edited by A Former User

                            @ustk Thank you for the suggestion. I think this duplicating solution doesn't work every time. Maybe because of this is the demo.

                            This doesn't work

                            declare name "zitaRevFDN";
                            declare version "0.0";
                            declare author "JOS, Revised by RM";
                            declare description "Reverb demo application based on zita_rev_fdn.";
                            
                            import("stdfaust.lib");
                            
                            process = dm.zita_rev_fdn_demo, dm.zita_rev_fdn_demo;
                            
                            toxonicT 1 Reply Last reply Reply Quote 0
                            • toxonicT
                              toxonic @A Former User
                              last edited by

                              @harris-rosendahl i just took a look at the faust library description in the web, it seems, that this demo has 8 channels....

                              ? 1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User @toxonic
                                last edited by

                                @toxonic So we can't convert it to stereo? Most of the reverbs give this error on that library page

                                toxonicT 1 Reply Last reply Reply Quote 0
                                • toxonicT
                                  toxonic @A Former User
                                  last edited by

                                  @harris-rosendahl
                                  It's always a good idea to check the examples in the Faust Web IDE (just google for it), and have a look at the diagram. There you can see, if you can simply converst a mono channel code to stereo, or if there are other channel issues:
                                  Screenshot from 2023-01-05 11-03-51.png
                                  Which reverb for example has a channel mismatch in HISE too?

                                  ? 1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User @toxonic
                                    last edited by A Former User

                                    @toxonic

                                    I see that, thank you so much.

                                    Which reverb for example has a channel mismatch in HISE too?

                                    I've come across this error on reverbTester, reverbDesigner, fdnRev and zitaRevFDN. And as I see in the diagrams, all of them have multiple input channels.

                                    Regarding the JPVerb and Greyhole reverbs, on the Web IDE page the GRAME License has been declared.

                                    But the license of these reverbs has been declared as GPL2+ here: https://github.com/grame-cncm/faustlibraries/blob/master/reverbs.lib

                                    So that means these reverbs can't be used without sharing the source code? So this is not MIT License as @Christoph-Hart shared here: https://forum.hise.audio/topic/6505/faust-is-here/9

                                    I think Licensing is very tricky in Faust :)

                                    Screen Shot 2023-01-05 at 13.42.00.png

                                    Screen Shot 2023-01-05 at 13.31.58.png

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

                                      Licence of Faust functions in libraries are the choice of the contributors. Some are GPL, some MIT/BSD like...or others. Each function can have its own licensing scheme, which is usually described as a declare licence XXX line (see https://github.com/grame-cncm/faustlibraries/blob/master/aanl.lib#L261 for instance).

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

                                        @Christoph-Hart Any way to get more than 16 mod sources? My Faust synth needs a lot of them :)

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

                                        6

                                        Online

                                        1.7k

                                        Users

                                        11.8k

                                        Topics

                                        102.8k

                                        Posts