HISE Logo Forum
    • Categories
    • Register
    • Login

    Random Presets

    Scheduled Pinned Locked Moved General Questions
    19 Posts 7 Posters 751 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.
    • MikeBM
      MikeB @Natan
      last edited by

      @Natan here the complete Snippet from the preset selector with next/previous/random

      HiseSnippet 2472.3oc6Z0saaibElzxSRj1jrIAAs8hhEDt8BYfDaIY63jFjF4ejSU2XaAKkMaQQgyXpQRCL0LpjibVk.CrnnWz2gdy9HzK6k4Qn2zqytuA4MX6YFRJNThTVqS1MIcECBjm4L+7c9+LbXMWtMwyi6ZXlswfdDCyKipOfI5rUGLkYTcaCyqip4R7HBq5DGhs.F5lC5g87HMMLMy7H4vLyNug54MObSrClYSh5xv3K3TaxiocohndqU9yoNN6faRZP6pM5UKW0ly1h6v6CPJCpfQOr8w31j8vxgMGxv7BUZRATTWfEDOCy42j2bP8N7my7G+WP8nG4PjMJZTGVH+t2g6zThXYuFa0g5zrVHq6YXXhpEIHx3KHtIZWZS5v9iDHWSQvJZF5xCy4lD7JpCuBSO7L0f279v65n51tzdhHJRr8InpLAwsEFTA5vxerFy8OuHZKNLBlXot3iI63BMFNi72sPgaYsxcVew6ekbx+s7xV038rdROq.SfMc4O2i3Zs6FU2KGnn7DVmfcCnFR7AVgaQahXKd2dbFzH+BwF0Bx8XzUvay9BAmU5LVhvgoVCJygxHVs5yrETNyhyhOH4B4xcxaGtJ2B1Pm9jEuRtWdkbVzVV4CaaAOuz+G4SL7tjGnCCWKgKL966OxS8+g33Q9ArBsvv30VhSg+b5X4k7jjUqxVXGmi.2i7ovyZpQoEXnRjxrdL9Hhit7W0QwyPtK8AGQu84L9QoOME0TzRJZSV4jUpbpvZCyTsv8ccgg7DPVFgm7KZ8fGXsvBvLxJkkmM9kBv7KHHekXgaYsvV+g82udEqZGTodkFJnl0WUddVsyDqx0OcUcf3JYMrt7JTw56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QRu4g6.LYhyI5NZF8pkFON27SWbty3VFm+C5Oj7e5tt6LSGbOiafKaHF8yNVARZ4vgdBiB2B22QD1ab65c4LduNbF0VWoe.A7ja2l3pi8DYnQuqfaVdraG42V9wfgG1EjSjyor3czsQ9qP9v0R5LZ8+GelBY9Y4movnobPIlxYt2pTNefmVqK11kens+GVpzK3Rpd.IFS8QXlEJMFZaM7yQEgJrTAitPrzCsskJpaCR1jmSoywbV4bLmUOGyYsywbty4XNqeNlycm3bjow1nuf202IF5nVE+ueQygWTKbXw+GPiJwyN
      

      "One hour of trial and error can save 10 minutes of reading the manual."
      "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
      HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

      NatanN DabDabD 2 Replies Last reply Reply Quote 1
      • NatanN
        Natan @MikeB
        last edited by

        @MikeB Very Nice, Thanks A Ton Dear Mike :)

        MikeBM 1 Reply Last reply Reply Quote 1
        • MikeBM
          MikeB @Natan
          last edited by

          @Natan
          is lovingly compiled from various snippets of the programming jedis lingering here :-)

          "One hour of trial and error can save 10 minutes of reading the manual."
          "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
          HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

          NatanN 1 Reply Last reply Reply Quote 1
          • NatanN
            Natan @MikeB
            last edited by Natan

            @MikeB Haha, I Just Finished My Project :) And Started To Packaging.
            And After Finding Out This Feature,
            Deleted Everything, And Added the Random Button To The UI And Started The Compiling Again :)
            That Was The Last Time Gift For My Project :)

            This Week I'll Release It 🙌

            MikeBM 1 Reply Last reply Reply Quote 1
            • MikeBM
              MikeB @Natan
              last edited by

              @Natan That sounds good - I'm looking forward to your work. I hope you will present it here.

              "One hour of trial and error can save 10 minutes of reading the manual."
              "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
              HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

              NatanN 1 Reply Last reply Reply Quote 1
              • NatanN
                Natan @MikeB
                last edited by

                @MikeB Sure Will Send Copies To Our Top Hise Users.

                Also @Christoph-Hart Said That, There will Be A MADE BY HISE Page In Future, That He Will Mention About Top Plugins That Made By Hise, So Everyone Can See The Power Of Hise And The Result At One Glance👏🏻

                MikeBM 1 Reply Last reply Reply Quote 1
                • MikeBM
                  MikeB @Natan
                  last edited by

                  @Natan Great thanks.
                  I also wanted to suggest this page because it makes sense to see what you can do with HISE.

                  "One hour of trial and error can save 10 minutes of reading the manual."
                  "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
                  HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

                    @MikeB Error coming !!

                    Interface:! Line 58, column 37: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxNjk4fDU4fDM3}
                    
                    

                    As soon as I click on Random Button.

                    Bollywood Music Producer and Trance Producer.

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

                      @DabDab Does your project have presets? Also I think there is a bug with this, .preset will probably need to be added to the end of the name.

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

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

                        @d-healey I don't know, Prev & next button is working only random button not working.

                        const var Random = Content.getComponent("Random");
                        inline function onRandomControl(component, value)
                        {
                        	if(value)
                        	{
                        	local myRandName = myPresetList[Math.randInt(0,myPresetList.length)];
                            Engine.loadUserPreset(myRandName);
                            }       
                        };
                        Content.getComponent("Random").setControlCallback(onRandomControl);
                        
                        

                        Bollywood Music Producer and Trance Producer.

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

                          @DabDab The error is telling you that myRandName is undefined. You need to find out why that is. On my system it works.

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

                          cassettedeathC 1 Reply Last reply Reply Quote 0
                          • cassettedeathC
                            cassettedeath @d.healey
                            last edited by

                            @d-healey Seemingly working for me, although it’s trying to load old presets that I’ve deleted and showing an error.

                            Doesn’t seem to be a refresh or clear function…

                            Do you know which file I might be able to delete to clear the preset list?

                            I’ve tried cleaning the build directory

                            cassettedeathC 1 Reply Last reply Reply Quote 0
                            • cassettedeathC
                              cassettedeath @cassettedeath
                              last edited by

                              @cassettedeath Scratch that

                              Incase anyone encounters the same issue I did, I used

                              var  myPresetList = Engine.getUserPresetList();
                              const var RandomPreset = Content.getComponent("RandomPreset");
                              
                              inline function onRandomPresetControl(component, value)
                              {
                                  if(value)
                                  {
                                      // Get the current list of presets from disk
                                      local presets = Engine.getUserPresetList();
                                      
                                      if(presets.length > 0)
                                      {
                                          // Pick a random index
                                          local index = Math.floor(Math.random() * presets.length);
                                          
                                          // Load it by name with the .preset extension
                                          Engine.loadUserPreset(presets[index] + ".preset");
                                      }
                                      else
                                      {
                                          Console.print("No user presets available.");
                                      }
                                  }
                              }
                              
                              RandomPreset.setControlCallback(onRandomPresetControl);
                              
                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post

                              30

                              Online

                              1.9k

                              Users

                              12.4k

                              Topics

                              108.2k

                              Posts