HISE Logo Forum
    • Categories
    • Register
    • Login

    Funny Chat GPT AI for HISE

    Scheduled Pinned Locked Moved Blog Entries
    10 Posts 5 Posters 798 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.
    • DabDabD
      DabDab
      last edited by DabDab

      What is this ..... ?
      Q: HISE LAF Example.
      Ans : In HISE, LAF stands for "Look And Feel" and refers to the visual appearance and behavior of the user interface controls in a HISE project.

      HISE provides a variety of built-in LAF options, including basic controls like buttons, sliders, and text boxes, as well as more advanced controls like multi-segmented meters, multi-state buttons, and FFT analyzers. Each of these controls has a set of properties that can be customized to adjust the appearance and behavior of the control.

      In addition to the built-in LAF options, HISE also supports custom LAFs that can be created using HISE's scripting system and the image editing tools. With a custom LAF, you can create a unique look and feel for your project that matches your brand or artistic vision.

      To create a custom LAF in HISE, you can use a combination of HISE's scripting system, image editing tools, and CSS-style styling. Here's a basic example of how to create a custom LAF for a button:

      Open the interface designer in HISE.
      Create a new interface control for your button, and set the properties to the desired values (e.g. size, position, text, etc.).
      In the image editing tools, create a new image for the button background, and import it into HISE as a PNG or JPEG file.
      Create a new image for the button hover state, and import it into HISE as a PNG or JPEG file.
      In the script editor, add the following code:

      const var backgroundImage = Image.getImageFromFile("{PROJECT_FOLDER}button_background.png"); // Set the background image
      const var hoverImage = Image.getImageFromFile("{PROJECT_FOLDER}button_hover.png"); // Set the hover image
      
      Content.getComponent("MyButton").setLookAndFeel({
         backgroundImage: backgroundImage,
         hoverImage: hoverImage,
         backgroundColor: "transparent",
         fontColour: "#ffffff",
         hoverTint: 0.3,
         textPadding: 10,
         cornerSize: 5
      });
      
      

      This code sets up a custom LAF for the button that uses two images - one for the button background and one for the hover state. The setLookAndFeel() function is used to set the custom LAF properties, including the background image, hover image, background color, font color, hover tint, text padding, and corner size.

      Save the script and close the editor.
      Preview the interface to see the custom button LAF in action.
      You can experiment with different background and hover images, as well as different LAF properties, to create a wide range of custom LAFs for your HISE project. You can also apply the same custom LAF to other controls in your project, or create different LAFs for different sections of your project.

      Chat GPT is pretty confident about this script. In reality it doesn't work in HISE.

      Another Example

      const var sliderHeight = 20; // Set the height of the slider
      const var sliderWidth = 200; // Set the width of the slider
      const var thumbImage = Image.getImageFromFile("{PROJECT_FOLDER}thumb.png"); // Set the image for the slider thumb
      const var backgroundColour = Colours.lightgrey; // Set the background colour for the slider track
      const var foregroundColour = Colours.blue; // Set the foreground colour for the slider track
      
      Content.getComponent("MySlider").setColour(Slider::backgroundColourId, backgroundColour); // Set the background colour for the slider track
      Content.getComponent("MySlider").setColour(Slider::thumbColourId, foregroundColour); // Set the foreground colour for the slider thumb
      Content.getComponent("MySlider").setSliderStyle(Slider::LinearHorizontal); // Set the slider style
      Content.getComponent("MySlider").setTextBoxStyle(Slider::NoTextBox, false, 0, 0); // Hide the text box for the slider
      Content.getComponent("MySlider").setBounds(0, 0, sliderWidth, sliderHeight); // Set the dimensions of the slider
      Content.getComponent("MySlider").setImages(false, true, true, thumbImage, 1.0f, foregroundColour, thumbImage, 1.0f, foregroundColour, thumbImage, 1.0f, foregroundColour); // Set the thumb image for the slider
      Content.getComponent("MySlider").setLookAndFeel({}); // Set the custom look and feel
      Content.getComponent("MySlider").setPaintRoutine(onRender); // Set the custom paint routine
      
      function onRender(g : Graphics) {
         g.fillAll(backgroundColour); // Fill the slider background with the background colour
         g.drawImage(thumbImage, Content.getComponent("MySlider").getThumbCentreX() - thumbImage.getWidth() / 2, 0, thumbImage.getWidth(), sliderHeight); // Draw the thumb image
      }
      
      

      Bollywood Music Producer and Trance Producer.

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

        ChatGPT is a useful tool if to know how to correct it.

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

        Christoph HartC DabDabD 2 Replies Last reply Reply Quote 1
        • Christoph HartC
          Christoph Hart @d.healey
          last edited by

          @d-healey Another option would be to change the HISE API so that the ChatGPT output works. Hail to the new overlords, we‘re not worth it!

          1 Reply Last reply Reply Quote 3
          • DabDabD
            DabDab @d.healey
            last edited by

            @d-healey Do you know how to use it correctly ?Then please make a tutorial. I didn't find it useful for HISE.

            Bollywood Music Producer and Trance Producer.

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

              @DabDab I find it faster to write the code myself than to correct the AI's nonsense. Maybe it would be more useful for outputting pseudo code, I'll have to try.

              You are using it "correctly" by the way. It's just that it can't do the thing you want it to do.

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

              Christoph HartC 1 Reply Last reply Reply Quote 2
              • Christoph HartC
                Christoph Hart @d.healey
                last edited by

                Then please make a tutorial. I didn't find it useful for HISE.

                I like how it transformed from "Oh my god, look what this thing can do" to "I can't believe it doesn't work perfectly and do my job" within three months...

                DabDabD 1 Reply Last reply Reply Quote 3
                • DabDabD
                  DabDab @Christoph Hart
                  last edited by

                  @Christoph-Hart True... (y)

                  Bollywood Music Producer and Trance Producer.

                  1 Reply Last reply Reply Quote 1
                  • clevername27C
                    clevername27
                    last edited by clevername27

                    Be a whole lot easier, faster and more accurate to just spent the few hours necessary to fix the documentation manually.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Martinsteve
                      last edited by

                      It ain't funny at all, if you are missing the power of Chat GPT, then just read about these facts and tools about Chat GPT and then decide later with cool mind.

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

                        When CGPT is used for writing Docs, Manual, correction it will do it's best. But when it works for specific softwares like HISE,JUCE etc... since it is unaware of HISE,JUCE API as a result it throws wrong output. I know it will be useful for near future for writing codes etc.. but now it is Funny for HISE for writing some coding.

                        Bollywood Music Producer and Trance Producer.

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

                        51

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.1k

                        Posts