HISE Logo Forum
    • Categories
    • Register
    • Login

    I don't see some parameters from FAUST to Scriptnode

    Scheduled Pinned Locked Moved Solved General Questions
    18 Posts 4 Posters 384 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.
    • M
      Mighty23
      last edited by

      Some parameters of my code in FAUST are not displayed in Scriptnode. Here is an example

      a2945be0-b0bf-4143-aa85-78d9b90ac037-image.png

      import("stdfaust.lib");
      
      declare name "Stereo Voice Harmonizer";
      declare version "0.4";
      declare description "Stereo voice harmonizer with formant preservation";
      
      // Voice controls
      pitch1 = vgroup("Voice 1", hslider("Pitch[unit:semitones]", -12, -12, 12, 1));
      pitch2 = vgroup("Voice 2", hslider("Pitch[unit:semitones]", -7, -12, 12, 1));
      pitch3 = vgroup("Voice 3", hslider("Pitch[unit:semitones]", -5, -12, 12, 1));
      
      level1 = vgroup("Voice 1", hslider("Level[style:knob]", 0.8, 0, 1, 0.01));
      level2 = vgroup("Voice 2", hslider("Level[style:knob]", 0.8, 0, 1, 0.01));
      level3 = vgroup("Voice 3", hslider("Level[style:knob]", 0.8, 0, 1, 0.01));
      
      // Essential controls
      wetLevel = vgroup("Mix", hslider("Wet[style:knob]", 0.6, 0, 1, 0.01));
      formantPreserve = vgroup("Formant", hslider("Preserve[style:knob]", 0.7, 0, 1, 0.01));
      presence = vgroup("EQ", hslider("Presence[style:knob]", 0.5, 0, 1, 0.01));
      
      // Phase vocoder 
      windowSize = 2048;
      hopSize = 512;
      
      // Basic EQ
      simpleEQ = _ : 
          fi.lowpass(2, 10000) :              
          fi.peak_eq(1.0 + presence, 2500, 0.7);
      
      // Formant preservation using parallel filters - too basic :(
      formantBands = fi.filterbank(3, (800, 2500));
      
      // Extract spectral envelope
      spectralEnvelope = _ : formantBands : par(i, 3, abs : si.smooth(0.997)) :> _;
      
      // Improved formant preservation
      formantProcess(x) = x : (_ <: 
          _, 
          (spectralEnvelope : *(formantPreserve))
      ) :> *;
      
      // Enhanced voice with better formant handling
      voice(pitch, level) = _ : 
          formantProcess :
          ef.transpose(windowSize, hopSize, pitch) :
          simpleEQ :
          *(level);
      
      // Process three voices for one channel
      processChannel = _ <: (
          *(1-wetLevel),
          (voice(pitch1, level1) +
           voice(pitch2, level2) +
           voice(pitch3, level3)) * wetLevel
      ) :> _;
      
      // Main stereo process
      process = si.bus(2) : (processChannel, processChannel);
      

      In HISE:
      88c0a194-f058-47b2-b171-7bbfc7f4290d-image.png

      HiseSnippet 1901.3ocuX0sbaabEFPxPpB0soYlN45czUfJzzDjhhxRsw1RhrQSijoCUTyLY5nYIvRycH.VTrKoDcldWunOV8UoOAsWz6cO6Oj.PjikLmj.MhD6dN624rme2kj6DjjPR3M7DZZJQXYYuYuLV.gyYYV1tWMKkXY+Tm9yRDiNcDllXc9YV1+VmKvbAICom5jYoXNmDZYau4eRNg8NOwR87ee4I3HbR.IeJKqqYz.x2Pioh7Y68p+LMJpKNjbEMt.26+pyCXImxhXS.8YSm5Vo3fw32QtDKYaCGquFyGYYumyKZ0xGGNr8P+l9uXP3v.Ry10OX+1MvsNb3v1082uYX6g6CJ4VcBoBVVeAVP3.nmvBm0eD61Ds.tlxoChHxA9V8AIqm15zQznvEFGNXpdRAS0lZS0u24BZHcw74lremh.JeEEMZ1a7wTI+OAUxtfJ8DsJ84N8CxnohbJR84W6bdB3AGhAeSQUQyqk8+x4TFvPhnVLdLoaFLXwB7Nnd8pH3iJGObRRffxRPrjKYBxaR7p39it6392cQ2mzvgqjlTLYrnHR1JIKCGx9XKzKYR7.RVUzTbzDxBFgseYa5VONaZfdWWfQVx4ITwaRIlwcYQgRak78k8.VFyF712c9YXAV5TLyA7kRxDTo5XeFYJjFncQ63bFgOVvRgDgk7ePjCKbRDVTNbRlnYH.1iR9PoiJgSEyJlH9IDiU+iFi8XUwO2oGUDLZ053FqPGAK0OG5nIy723zY3PRfHWAehS2uecSCq+ImF5ZRCAYJE9SMCQc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jiFmvFHgpdsCgO.TjuVWgkBpGXe9o.0CrIejPI8ucfyrjHn3nbe7sDgBfBx3B5cEwG5yuD5GbezMAUyaoT.stZJkbKFtVB112G1TSGxB304sKAEvvRP0ZU6+divbHChE.GQKC4dKMIjcqrkIfei56e3wtiXolws7anWzIXNM.04stbp7VFcdKP7FzQHWD7LjVCNGr7vfdxPo5vSEfVom4LlRviug727fCef9Rz7sVUTiVxe7.X2azxtqHAEMgCc+PvcdvQQf2Bp8H6FidFRvXnAJU7Hu4tgSvIgbPMAgpYb.NYrWypHuCkhRJvEgD2IxfyGffyjG.uEgHIPz.zO1c9LcLSX11kDwQRMxiVEAXiGHGyo03wLlXjW8ZvQ4p.ViuBciVVmGC2.aJIbkkfxCgT2Ox6tJf.uCPz6FzevXsuop9aukzsiP64cuXvJUbUBeOyFMYj7mcKzTUTUJb.QH+M6lqN.CgQfY1UwhmpBSUjJGrRImdIMEcjZRxvZfFkvSYbhWdjEDqpCophT3Uwv9hfI8v87zhwDmZPVLJiPzJLWJU3poP4Y8YXbM2l0bjFk9A1IOCb9OadlckpZaVgMkuYW4WA8kJhnBDaXH1XUDaZH1Dbr6glKB2hd4KfKpg35NPFcbttBJIDeLXBjrHyR7JuEphJOtxwVV+eHqpgzF
      

      Free Party, Free Tekno & Free Software too

      LindonL S 2 Replies Last reply Reply Quote 0
      • LindonL
        Lindon @Mighty23
        last edited by

        @Mighty23 as you see HISE ignores the Faust vgroup construct, so try removing it from your faust code and renaming the hsliders pitch1, pitch2, pitch3 etc.

        HISE Development for hire.
        www.channelrobot.com

        LindonL M 2 Replies Last reply Reply Quote 1
        • LindonL
          Lindon @Lindon
          last edited by

          @Lindon like this:

          import("stdfaust.lib");
          
          declare name "Stereo Voice Harmonizer";
          declare version "0.4";
          declare description "Stereo voice harmonizer with formant preservation";
          
          // Voice controls
          pitch1 = hslider("Pitch1", -12, -12, 12, 1);
          pitch2 = hslider("Pitch2", -7, -12, 12, 1);
          pitch3 = hslider("Pitch3", -5, -12, 12, 1);
          
          level1 = hslider("Level1", 0.8, 0, 1, 0.01);
          level2 = hslider("Level2", 0.8, 0, 1, 0.01);
          level3 = hslider("Level3", 0.8, 0, 1, 0.01);
          
          // Essential controls
          wetLevel = hslider("Wet", 0.6, 0, 1, 0.01);
          formantPreserve = hslider("Preserve", 0.7, 0, 1, 0.01);
          presence = hslider("Presence", 0.5, 0, 1, 0.01);
          
          // Phase vocoder 
          windowSize = 2048;
          hopSize = 512;
          
          // Basic EQ
          simpleEQ = _ : 
              fi.lowpass(2, 10000) :              
              fi.peak_eq(1.0 + presence, 2500, 0.7);
          
          // Formant preservation using parallel filters - too basic :(
          formantBands = fi.filterbank(3, (800, 2500));
          
          // Extract spectral envelope
          spectralEnvelope = _ : formantBands : par(i, 3, abs : si.smooth(0.997)) :> _;
          
          // Improved formant preservation
          formantProcess(x) = x : (_ <: 
              _, 
              (spectralEnvelope : *(formantPreserve))
          ) :> *;
          
          // Enhanced voice with better formant handling
          voice(pitch, level) = _ : 
              formantProcess :
              ef.transpose(windowSize, hopSize, pitch) :
              simpleEQ :
              *(level);
          
          // Process three voices for one channel
          processChannel = _ <: (
              *(1-wetLevel),
              (voice(pitch1, level1) +
               voice(pitch2, level2) +
               voice(pitch3, level3)) * wetLevel
          ) :> _;
          
          // Main stereo process
          process = si.bus(2) : (processChannel, processChannel);
          

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 1
          • M
            Mighty23 @Lindon
            last edited by

            @Lindon It was so obvious. Thank you for your help, it really gave me a breakthrough.

            Free Party, Free Tekno & Free Software too

            LindonL 1 Reply Last reply Reply Quote 0
            • M Mighty23 has marked this topic as solved on
            • LindonL
              Lindon @Mighty23
              last edited by

              @Mighty23 nice effect by the way - did you write the faust code?

              HISE Development for hire.
              www.channelrobot.com

              M 1 Reply Last reply Reply Quote 0
              • M
                Mighty23 @Lindon
                last edited by

                @Lindon I'm running some tests for a vocal harmonizer, exploring different solutions. I still don't think I'm quite there yet, but I really appreciate the help.

                Like many, I rely on AI to assist me. Personally, I prefer Claude over chatGPT.
                I believe that, for now, without proper 'guidance,' they tend to oversimplify the structure of what you ask for. They first need to be supplied with solid documentation and, ideally, an already working example of what you're trying to achieve

                Free Party, Free Tekno & Free Software too

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

                  @Mighty23 so you are using AI(Claude/ChatGPT) to generate Faust code for you?

                  HISE Development for hire.
                  www.channelrobot.com

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    Mighty23 @Lindon
                    last edited by

                    @Lindon Yes, I use it as a support tool to explore different solutions in Faust, but not primarily to generate code directly. In my experience, using it to generate code from scratch can often be much more time-consuming. Instead, I focus on:

                    • Analyzing and better understanding the documentation
                    • Discussing various approaches and strategies
                    • Reviewing the logic of my code
                    • Getting suggestions for potential optimizations

                    Free Party, Free Tekno & Free Software too

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

                      @Mighty23 wow it really seems to be working for you - love to see what you come up with at the end...

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 1
                      • DabDabD
                        DabDab
                        last edited by DabDab

                        @Lindon said in I don't see some parameters from FAUST to Scriptnode:

                        Claude

                        Which prompt you entered on claude ?

                        Bollywood Music Producer and Trance Producer.

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

                          @Mighty23 as you see HISE ignores the Faust vgroup construct,

                          what do you mean here ?

                          LindonL 2 Replies Last reply Reply Quote 0
                          • LindonL
                            Lindon @sletz
                            last edited by Lindon

                            @sletz
                            In the Faust environment you can name sliders(for example) the same as long as they are in a vgroup.... in the HISE environment you cant have two sliders with the same name, no matter where they are, or how they are grouped :

                            Two hsliders both called "mySlider" results in only one of them showing up in the interface...

                            as you can see in the original post,:

                            pitch1 = vgroup("Voice 1", hslider("Pitch[unit:semitones]", -12, -12, 12, 1));
                            pitch2 = vgroup("Voice 2", hslider("Pitch[unit:semitones]", -7, -12, 12, 1));
                            pitch3 = vgroup("Voice 3", hslider("Pitch[unit:semitones]", -5, -12, 12, 1));
                            

                            gets one just one knob called Pitch

                            HISE Development for hire.
                            www.channelrobot.com

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

                              @sletz meanwhile if you are here...could you look at this:

                              Link Preview Image
                              More than one faust node = one not compiling and running properly

                              So I havent tried this in a compiled DLL yet, but if I have a scriptnode network with two core.faust nodes then when I load it one of them doesn't work until...

                              favicon

                              Forum (forum.hise.audio)

                              HISE Development for hire.
                              www.channelrobot.com

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

                                @Lindon

                                OK then the HISE architecture machinery could possibly use "shortname", which can be generated to uniquely name same "labels" in different groups. See: https://faustdoc.grame.fr/manual/architectures/#dsp-json-description

                                @Christoph-Hart would this make sense ?

                                LindonL S 2 Replies Last reply Reply Quote 0
                                • LindonL
                                  Lindon @sletz
                                  last edited by

                                  @sletz said in I don't see some parameters from FAUST to Scriptnode:

                                  @Lindon

                                  OK then the HISE architecture machinery could possibly use "shortname", which can be generated to uniquely name same "labels" in different groups. See: https://faustdoc.grame.fr/manual/architectures/#dsp-json-description

                                  @Christoph-Hart would this make sense ?

                                  Im not sure its that big a deal really - once you know it then you can work with it.

                                  HISE Development for hire.
                                  www.channelrobot.com

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

                                    @sletz sure but then you cannot simply copy/paste Faust code and be sure it will work 😢 this can surely be improved.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      Mighty23 @DabDab
                                      last edited by Mighty23

                                      @DabDab said in I don't see some parameters from FAUST to Scriptnode:

                                      Which prompt you entered on claude ?

                                      Provide prompts that clearly outline your goal and your level of expertise. Guide the AI to steer clear of common pitfalls by specifying the libraries and functions you intend to use upfront. Keep in mind that the most frequent AI errors are related to signal routing rather than syntax. Therefore, describe the 'sequential composition' you aim to achieve, even if it seems like a minor or obvious detail to you.
                                      Have it tackle one step at a time, avoiding the assignment of multiple tasks simultaneously. Once your questions are clarified or you've obtained a portion of code that satisfies you, start a new chat and move on to the next (sub)task.

                                      Free Party, Free Tekno & Free Software too

                                      DabDabD 1 Reply Last reply Reply Quote 0
                                      • DabDabD
                                        DabDab @Mighty23
                                        last edited by

                                        @Mighty23 said in I don't see some parameters from FAUST to Scriptnode:

                                        Provide prompts that clearly outline your goal and your level of expertise. Guide the AI to steer clear of common pitfalls by specifying the libraries and functions you intend to use upfront. Keep in mind that the most frequent AI errors are related to signal routing rather than syntax. Therefore, describe the 'sequential composition' you aim to achieve, even if it seems like a minor or obvious detail to you.
                                        Have it tackle one step at a time, avoiding the assignment of multiple tasks simultaneously. Once your questions are clarified or you've obtained a portion of code that satisfies you, start a new chat and move on to the next (sub)task.

                                        Nice. I am using FAUST for the past 5-6 years. But I am curious to implement it with AI.

                                        Bollywood Music Producer and Trance Producer.

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

                                        30

                                        Online

                                        1.7k

                                        Users

                                        11.7k

                                        Topics

                                        102.0k

                                        Posts