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 441 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 @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

                                      37

                                      Online

                                      1.7k

                                      Users

                                      11.9k

                                      Topics

                                      103.5k

                                      Posts