HISE Logo Forum
    • Categories
    • Register
    • Login

    confusing convolution

    Scheduled Pinned Locked Moved Scripting
    37 Posts 3 Posters 2.0k 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.
    • d.healeyD
      d.healey @Christoph Hart
      last edited by d.healey

      @christoph-hart said in confusing convolution:

      not sure if you did that already

      Me neither :) but I shall whip one up very soon.

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

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

        @Christoph-Hart Here's the full expansion project and also the test expansion with the included scripts. I notice that the scripts are inlined when the expansion is loaded. I'm not sure if the issue is caused when the hxi is generated or when the expansion is loaded.

        I also noticed the using Engine.loadFontAs("{PROJECT_FOLDER}FontName.ttf", "pretty-name"); causes issue too because once the expansion loads it's still looking in the PROJECT_FOLDER instead of the expansion folder. Even if I include the font in the shell's images folder it won't work. I assume the best way to handle this would be to have the hxi exporter replace PROJECT_FOLDER with EXP::EXPNAME ? That way it would work while developing the expansion but also work when loaded as an expansion...

        I haven't tested but I think this would affect anything that's using PROJECT_FOLDER paths, like additional source code, sample maps, and images.

        Test Exp1.zip
        Full Expansion Test.zip

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

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

          @d-healey Oh wow, that might be the commit with the weirdest looking fix in the history of HISE...

          Link Preview Image
          - fix scripts in subfolders not being included when exporting a full … · christophhart/HISE@2bdd95a

          The open source framework for sample based instruments - - fix scripts in subfolders not being included when exporting a full … · christophhart/HISE@2bdd95a

          favicon

          GitHub (github.com)

          Like you see the code change and immediately know, "yeah, that makes total sense".

          d.healeyD 2 Replies Last reply Reply Quote 0
          • d.healeyD
            d.healey @Christoph Hart
            last edited by d.healey

            @christoph-hart Haha, you gotta love regex :D

            Thanks, I'll give it a try this evening.

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

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @Christoph Hart
              last edited by

              @christoph-hart Thank you 😊

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by A Former User

                @Christoph-Hart im still getting this problem when using the later commits:

                6605d360-891e-4297-a4cc-be7a92f46971-image.png

                Same expansions from my current working version, same code too.

                I'm thinking the problem might be similar? Expansion Wildcards doing some strange stuff? If I remove {EXP::Blackout} it removes the overlay, but obviously the samples aren't loaded. I feel like it might be looking in the appdata folder, not where the Samples are installed to.

                const var expHandler = Engine.createExpansionHandler();
                
                var currentExpansion; 
                
                const var expansionNames = [];
                
                expansionNames.push("No Expansion");
                
                for (e in expHandler.getExpansionList())
                    expansionNames.push(e.getProperties().Name);
                
                for (i=1; i<expansionNames.length; i++)
                {
                    expButton[i].data.expansionName = expansionNames[i];
                    expButton[i].set("allowCallbacks", "Clicks & Hover");
                    
                    expButton[i].setLoadingCallback(function(isPreloading)
                    {
                        if(isPreloading)
                        {       
                            this.data.preload = true;
                        }
                        else
                        {       
                            this.data.preload = false;
                        }
                    });      
                    
                    expButton[i].setMouseCallback(function(event)
                    {
                        if (event.clicked)
                        {
                            //Here we add the safety check.
                            
                            if (this.data.preload == false)
                            {
                                expHandler.setCurrentExpansion(this.data.expansionName);   
                                load+this.data.expansionName;
                            }
                        }
                    });    
                };
                
                currentExpansion = expHandler.getCurrentExpansion();
                currentExpansion = currentExpansion.Name;
                
                var expansionDirectory = FileSystem.getFolder(FileSystem.Samples);
                var selectExpansionFile = "";
                reg hr;
                
                expHandler.setAllowedExpansionTypes([expHandler.FileBased, 
                                                     expHandler.Intermediate, 
                                                     expHandler.Encrypted]);
                
                //Install Single
                
                var installDirectory = expansionDirectory;
                
                inline function onButton_InstallLibraryControl(component, value)
                {
                    if (value)
                    {         
                        FileSystem.browse(installDirectory, false, "", function(result) 
                        {
                            hr = result;
                            expHandler.installExpansionFromPackage(hr,FileSystem.getFolder(FileSystem.Samples));
                            expHandler.refreshExpansions(); 
                            installDirectory = result.getParentDirectory();
                        });
                    };
                };
                
                Content.getComponent("Button_InstallLibrary").setControlCallback(onButton_InstallLibraryControl);
                
                //Blackout
                
                inline function loadBlackout()
                {
                    
                        //Setting Up Samplers
                    clearSamplers();
                    
                    SamplerA.asSampler().loadSampleMap("{EXP::Blackout}Blackout_SampleMap");
                };
                
                1 Reply Last reply Reply Quote 1
                • d.healeyD
                  d.healey @Christoph Hart
                  last edited by d.healey

                  @christoph-hart That fix works beautifully!! It didn't solve the font issue though. I've attached an updated test expansion that loads a font.

                  Test Exp1 - Font.zip

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

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User
                    last edited by

                    Made a minimal example to demonstrate the issue.

                    1. Set samples install directory.
                    2. Install expansion.
                    3. Everything installs to the right place, etc.
                    4. Re-open plugin and get a Sample Directory Missing error.

                    be257682-7f3a-4155-93e6-92f8666ae10f-image.png

                    Project: https://drive.google.com/file/d/11dZ_MwBFkGNkfg5mK7PzoKd1cfPXU4pA/view?usp=sharing

                    There's a pre-compiled windows Binary, and an encoded expansion in the root folder of that

                    is anyone else getting this issue with the more recent commits?

                    1 Reply Last reply Reply Quote 1
                    • ?
                      A Former User
                      last edited by

                      bump (char min)

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by A Former User

                        still can't open my plugin on the latest updates without getting a Samples Folder Missing error.

                        this commit works: https://github.com/christophhart/HISE/commit/20dc01cfd48ea727a6d296615f594e262690a003

                        but pretty much all of the ones afterwards don't

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by

                          hate to be that guy but buuump :slight_smile:

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

                          27

                          Online

                          1.8k

                          Users

                          12.0k

                          Topics

                          104.1k

                          Posts