HISE Logo Forum
    • Categories
    • Register
    • Login

    Change image on preset load

    Scheduled Pinned Locked Moved General Questions
    7 Posts 4 Posters 419 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.
    • hisefiloH
      hisefilo
      last edited by

      Im trying to load custom images to the UI for each preset.
      How can I detect user changed a preset? I can get the current preset name, and I can replace the image, but cant trigger that on preset change

      const var currentUserPreset = Engine.getCurrentUserPresetName();
      const var instrumentImage = Content.getComponent("instrumentImage");    
      
      
      Console.print(currentUserPreset);
      
      if (currentUserPreset == "Clarinet") {
      
          instrumentImage.setImageFile("{PROJECT_FOLDER}key-vectors.png", true);
          }
      
      
      1 Reply Last reply Reply Quote 0
      • ustkU
        ustk
        last edited by

        I have kind of the same idea in mind recently but didn't have the time to try it...

        I see two solutions here that might worth a try:

        • using a timer to check the preset every now and then
        • or why not a hidden knob, saved with the presets, with the image selection in its callback

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

        hisefiloH 2 Replies Last reply Reply Quote 1
        • hisefiloH
          hisefilo @ustk
          last edited by

          @ustk hidden knob idea is brilliant! will try

          1 Reply Last reply Reply Quote 0
          • hisefiloH
            hisefilo @ustk
            last edited by

            @ustk Solved! A slider with a filmstrip containing all of the images as frames. Then just re-saved presets selecting the matching image on the slider

            Dan KorneffD 1 Reply Last reply Reply Quote 3
            • ustkU
              ustk
              last edited by

              @hisefilo You're the guy! 👍

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

              1 Reply Last reply Reply Quote 1
              • DalartD
                Dalart
                last edited by

                Very interesting, thanks for the shared information in this thread.

                1 Reply Last reply Reply Quote 1
                • Dan KorneffD
                  Dan Korneff @hisefilo
                  last edited by

                  @hisefilo great idea!

                  Dan Korneff - Producer / Mixer / Audio Nerd

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

                  55

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.9k

                  Posts