HISE Logo Forum
    • Categories
    • Register
    • Login

    Random Presets

    Scheduled Pinned Locked Moved General Questions
    19 Posts 7 Posters 747 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.
    • 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

                        19

                        Online

                        1.9k

                        Users

                        12.4k

                        Topics

                        108.1k

                        Posts