HISE Logo Forum
    • Categories
    • Register
    • Login

    I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise

    Scheduled Pinned Locked Moved Scripting
    32 Posts 16 Posters 2.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
      aaronventure @d.healey
      last edited by

      @d-healey That's why you should ask Claude with the Context7 MCP installed

      // ========================================
      // HISE Hello World Script Examples
      // ========================================
      
      // 1. BASIC CONSOLE OUTPUT
      // The simplest way to output "Hello World" in HISE
      Console.print("Hello World");
      
      // 2. CREATING A BASIC USER INTERFACE
      // Create the main interface (600x500 pixels)
      Content.makeFrontInterface(600, 500);
      
      // Add a button programmatically
      const var HelloButton = Content.addButton("HelloButton", 10, 10);
      HelloButton.set("text", "Click for Hello World!");
      
      // 3. BUTTON CALLBACK FUNCTION
      // Define what happens when the button is clicked
      inline function onHelloButtonControl(component, value)
      {
          if(value) // Button was pressed (value = 1)
          {
              Console.print("Hello World from Button!");
              
              // You can also show a popup message
              Engine.showMessageBox("Hello World", "Greetings from HISE!", 0);
          }
      };
      
      // Connect the callback to the button
      HelloButton.setControlCallback(onHelloButtonControl);
      
      // 4. DRAWING TEXT ON A PANEL
      // Add a panel for custom graphics
      const var HelloPanel = Content.addPanel("HelloPanel", 10, 70);
      HelloPanel.set("width", 300);
      HelloPanel.set("height", 100);
      
      // Set a custom paint routine for the panel
      HelloPanel.setPaintRoutine(function(g)
      {
          // Set background color
          g.setColour(Colours.withAlpha(Colours.blue, 0.3));
          g.fillRect(this.getLocalBounds(0));
          
          // Set text properties
          g.setFont("Arial", 24);
          g.setColour(Colours.white);
          
          // Draw the hello world text
          g.drawFittedText("Hello World!", this.getLocalBounds(5), "centred", 1, 1.0);
      });
      
      // 5. CREATING A SIMPLE SOUND GENERATOR
      // Get reference to a sine wave generator (if one exists in your project)
      // Note: You need to add a SineWaveGenerator module first in HISE
      /*
      const var SineGen = Synth.getChildSynth("Sine Wave Generator");
      
      if(isDefined(SineGen))
      {
          Console.print("Sine generator found - Hello World with sound!");
          
          // Set some basic parameters
          SineGen.setAttribute(SineGen.SaturationAmount, 0.1);
          Console.print("Saturation set to: " + SineGen.getAttribute(SineGen.SaturationAmount));
      }
      else
      {
          Console.print("No sine generator found - add one to test sound generation");
      }
      */
      
      // 6. WORKING WITH ARRAYS AND LOOPS
      Console.print("=== Array Hello World ===");
      const var words = ["Hello", "World", "from", "HISE"];
      
      for(i = 0; i < words.length; i++)
      {
          Console.print("Word " + i + ": " + words[i]);
      }
      
      // Join the words together
      var message = "";
      for(word in words)
      {
          message += word + " ";
      }
      Console.print("Complete message: " + message);
      
      // 7. BASIC MATH OPERATIONS
      Console.print("=== Math Hello World ===");
      const var x = 5;
      const var y = 10;
      const var result = x + y;
      Console.print("Math result: " + x + " + " + y + " = " + result);
      
      // 8. TIMER-BASED HELLO WORLD
      // Create a timer that prints hello world every 2 seconds
      const var HelloTimer = Engine.createTimerObject();
      HelloTimer.setTimerCallback(function()
      {
          Console.print("Timer says: Hello World! " + Engine.getUptime());
      });
      
      // Start the timer (2000ms = 2 seconds)
      HelloTimer.startTimer(2000);
      
      // 9. BASIC FUNCTION DEFINITION
      inline function sayHello(name)
      {
          return "Hello " + name + " from HISE!";
      }
      
      // Call the function
      Console.print(sayHello("Developer"));
      Console.print(sayHello("World"));
      
      // 10. BASIC CONDITIONAL LOGIC
      const var currentTime = Engine.getUptime();
      if(currentTime > 5.0)
      {
          Console.print("Hello World - HISE has been running for more than 5 seconds!");
      }
      else
      {
          Console.print("Hello World - HISE just started!");
      }
      
      Console.print("=== HISE Hello World Script Complete! ===");
      
      d.healeyD 1 Reply Last reply Reply Quote 1
      • d.healeyD
        d.healey @aaronventure
        last edited by

        @aaronventure said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

        That's why you should ask Claude

        For us it's useful, but a beginner shouldn't use it for learning scripting because they don't know if the output is good or bad. I can already pick holes in that Claude output but a beginner wouldn't know.

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

        A 1 Reply Last reply Reply Quote 0
        • ChazroxC
          Chazrox
          last edited by

          Screenshot 2025-06-07 at 2.38.39 PM.png

          1 Reply Last reply Reply Quote 1
          • A
            Allen
            last edited by

            AI is currently really bad at writing DSP code.

            the reverb&delay code is really looks like something from r/programminghorror btw
            I can already hear the pop and clicks followed by a loud-ass feedback lol.

            StraticahS 1 Reply Last reply Reply Quote 0
            • StraticahS
              Straticah @Allen
              last edited by

              Hise Forum is the best meme page by far.

              building user interfaces in HISE :)
              web: www.vst-design.com

              1 Reply Last reply Reply Quote 2
              • A
                aaronventure @d.healey
                last edited by

                @d-healey yeah you're right

                plus as I've said elsewhere, large part of HISE is not code-based

                No way through HISE currently other than the hard way. which may become increasingly inaccessible as people become super impatient with AI doing their shit for them in seconds in other areas of life. I do often think how impossible it will be for us to relate to the new kids, given how we had to go and read 300 pages of docs before writing some code back in the day.

                Now it's all just a prompt away.

                ChazroxC 1 Reply Last reply Reply Quote 2
                • ChazroxC
                  Chazrox @aaronventure
                  last edited by

                  @aaronventure

                  You're a Picasso worrying about how to relate to people who call stuff like this art...

                  5L893dV.jpg

                  lol

                  ask them to explain the logic? There is none. Its 'vibe'. I myself appreciate the learning curve and the mid entry level requirements to get something decent done. I can already imagine the MESS ai is gonna make of everything before it makes things better.

                  Who will maintain all this 💩 code??? lol

                  d.healeyD A 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Chazrox
                    last edited by

                    @Chazrox You'll like this

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

                    ChazroxC 1 Reply Last reply Reply Quote 0
                    • ChazroxC
                      Chazrox @d.healey
                      last edited by Chazrox

                      @d-healey

                      💀 💀 💀
                      Screenshot 2025-06-08 at 12.43.56 PM.png
                      They tried it. lol

                      I love how lazy people are.

                      1 Reply Last reply Reply Quote 1
                      • A
                        aaronventure @Chazrox
                        last edited by

                        @Chazrox said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                        Who will maintain all this 💩 code??? lol

                        The point is that you shouldn't look at it. Does it work? Is the performance acceptable? Have you tested for security issues? Just ship it. That's the current way of things. Some of the stuff I'm seeing in new repos popping up is the stuff of nightmares, but hey, it works.

                        I mean it's incredible, it's literal science fiction stuff, you write an instruction as if you were writing it to a developer on your team, and it becomes reality. If you told me 3 years ago this would be a reality today I would've called you crazy. Of course, currently it's just step by step, so you still need to have the big picture, understand on high level how things work so your instructions can be accurate etc.

                        But code developed both to be functional and to be readable to humans so they can write it and debug it. This is no longer necessary, so I have no trouble imagining a language coming up in a very near future that is completely oriented to be written by LLMs.

                        The potential is just too much to ignore.

                        ChazroxC 1 Reply Last reply Reply Quote 3
                        • ChazroxC
                          Chazrox @aaronventure
                          last edited by

                          @aaronventure I agree with the potential implications. We're just not there yet obviously and i'll probably make fun of it til then...

                          Best believe when ai can figure out how to properly write an Auto-Tune in HISE, WE are ALL gonna go crazy and i'll be first in line!

                          Until then, we're asking an infant to do gymnastics. <-- just more jokes. lol.

                          I do use ai myself but only for extending index libraries and/or help with math. Other than that, it just makes a mess without proper (in-depth) context.

                          Based on your experience, what are you're thoughts on best use cases as it stands today?
                          ...pertaining to HISE of course.

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            aaronventure @Chazrox
                            last edited by

                            @Chazrox Writing small pieces of code, like functions. Connect it to context7 so it can get docs, but obviously that only works if the docs are complete, and HISE docs are not.

                            I did once write a full 3d rendering engine in HISE PaintRoutine, with frustum culling and all the jazz. You'd just pass it a "mesh" like a an array of points relative to a center, pass it a location for the the mesh center, pass it camera specs like xyz, pitch, yaw, fov and it would render the whole scene using line calls. Of course it was all running on the CPU so it wasn't very efficient at all.

                            I did eventually move to WebView and three.js because that's what three is made for and it runs on the GPU, but this is the kind of stuff where even testing it out meant you had to go and learn computer graphics from complete zero just to implement this here, but the toughest question would be where to even look and what to look for. With AI it was much faster to find the relevant information and get it going.

                            So in a world where a question "is this even viable to try to implement" can be answered in days instead of months, it's like magic wand.

                            ChazroxC VirtualVirginV 2 Replies Last reply Reply Quote 2
                            • ChazroxC
                              Chazrox @aaronventure
                              last edited by

                              @aaronventure

                              @aaronventure said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                              small pieces of code

                              same.

                              @aaronventure said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                              3d rendering engine in HISE PaintRoutine,

                              Wahh?? I'll say it again.. you guys are geewwwwd! haha.

                              @aaronventure said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                              So in a world where a question "is this even viable to try to implement" can be answered in days instead of months, it's like magic wand.

                              I agree.

                              1 Reply Last reply Reply Quote 0
                              • VirtualVirginV
                                VirtualVirgin @aaronventure
                                last edited by

                                @aaronventure said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                                I did once write a full 3d rendering engine in HISE PaintRoutine, with frustum culling and all the jazz. You'd just pass it a "mesh" like a an array of points relative to a center, pass it a location for the the mesh center, pass it camera specs like xyz, pitch, yaw, fov and it would render the whole scene using line calls. Of course it was all running on the CPU so it wasn't very efficient at all.

                                I found this video pretty interesting on learning about 3D graphics: https://www.youtube.com/watch?v=gYRrGTC7GtA

                                You can listen to my orchestral mockups here:
                                https://www.virtualvirgin.net/

                                d.healeyD 1 Reply Last reply Reply Quote 1
                                • rglidesR
                                  rglides
                                  last edited by

                                  I think this is a really interesting topic, especially for HISE since it's almost impossible to vibe code in HISE in the sense that people use the term, since AI knows almost nothing about HISE and if it does, it tries its darndest to infect it with traditional JS or non-existent API calls and fictional Engine.addTheSpecialHiseAutoTune . After learning to code a bit with HISE, I spent around two weeks working with ChatGPT to try and come up with a drum sequencer. It was an absolute nightmare and a mess and in the end I found myself having to learn everything bit by bit to then teach the AI how to do what I wanted in order for it to give me a working script, at which point I realised I had figured out what to do already. Looking at the script that CGPT gave me, it was a total mess, around 2000 lines of code, for a basic sequencer. The only thing that it was quite helpful at was providing some ideas about what to implement, but even then, many of those ideas were overcomplicated and unnecessary. What I found AI was eventually good for was cleaning up or refactoring code that was already created. So, I think AI is actually quite great for HISE, but only if you actually already understand how to script in HISE and even then, it is important to inspect every bit of code it gives to remove all the unnecessary bulk it likes to add. Use with caution is what I suppose I'm trying to say. And use Claude, ChatGPT is a complete lunatic

                                  DanHD ChazroxC 2 Replies Last reply Reply Quote 2
                                  • DanHD
                                    DanH @rglides
                                    last edited by

                                    @rglides haven't tried Claude yet but I've been using ChatGPT for some web stuff, css styling, php and simple js. I assume Claude is better at that too?

                                    DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                    https://dhplugins.com/ | https://dcbreaks.com/
                                    London, UK

                                    rglidesR 1 Reply Last reply Reply Quote 0
                                    • rglidesR
                                      rglides @DanH
                                      last edited by

                                      @DanH I'm not sure but I'd assume so, Claude so far has been overall better at everything I've tried and it is designed for code specifically. Try Claude 3.7 preview in VSCode

                                      mmprodM 1 Reply Last reply Reply Quote 1
                                      • mmprodM
                                        mmprod @rglides
                                        last edited by

                                        @rglides I’ve asked Claude to create custom c++ node dsps for HISE import and within a couple revisions it can create something that sounds decent. Meanwhile when I ask chatGPT the same thing it takes like 50 revisions just to get it to run without error

                                        For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
                                        John 3:16

                                        rglidesR d.healeyD 2 Replies Last reply Reply Quote 1
                                        • rglidesR
                                          rglides @mmprod
                                          last edited by

                                          @mmprod haha yeah! The difference is huge

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

                                            @mmprod said in I wasted 3 hours on deepseek trying to create Autotune, Reverb and Delay in Hise:

                                            it can create something that sounds decent.

                                            But is it good code?

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

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

                                            8

                                            Online

                                            1.8k

                                            Users

                                            11.9k

                                            Topics

                                            103.8k

                                            Posts