HISE Logo Forum
    • Categories
    • Register
    • Login

    Random Presets

    Scheduled Pinned Locked Moved General Questions
    17 Posts 6 Posters 639 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 @MikeB
      last edited by

      @MikeB

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

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon
        I've already tried with arrays and giant loops. But this is elegant.
        Thank you very much Lindon.

        "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 0
        • NatanN
          Natan @MikeB
          last edited by

          @MikeB Dear Mike, Can You Confirm That It Works?

          MikeBM 1 Reply Last reply Reply Quote 1
          • NatanN
            Natan
            last edited by

            @Lindon Thank Lindon, Works Nicely

            HiseSnippet 1105.3ocsV0saaaCElzIpa1cNcEXO.B4JafTC4zzthFTrT6XuYrjTi3jtATTzwHQaSDIRCJpjZTTf9HrWk8Fr62U6MYWt6xNGQYK4FmhDCL4a74W9cN77C6qU973XklPKexzIbB8abFLUZF2dLSHI81mP2v4PVrgqcsrZMcBKNlGPnz09QjAs75jzu+4GZwBYRedNKB40JgO+.Qjvjys+d+rHLrKKfehHpf16rWOekrsJTk.3YMGOxDl+4rQ7iXnZkbHz60IPXT5AFlgGC5zRELcvX0kRq9uVDKNKjiDMIC.GYYSZOVDFzeVrFSHz06mG4qYi7uy4PQfXN+7Lv2lJvM2hh4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1ryJXySVAad5JXy2uB17runM3vgWlXTQ11DfQ+NoivozNoSORqHI+GbYjTKB
            
            1 Reply Last reply Reply Quote 1
            • 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+g82udEqZGTodkFJnl0WUddVsyDqx0OcUcf3JYMrt7JTw56g5RNwByZZsG.hgNpJCAuz1I4P2TvRauBHqsaiq+hOlzbufGZKeGLodp3hxd76OPX4vwMkqUjnJx4XhdEmLAFHf7D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0VWoe.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

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

                                  49

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  101.8k

                                  Posts