HISE Logo Forum
    • Categories
    • Register
    • Login

    Vst Instrument without having to install the samples

    Scheduled Pinned Locked Moved General Questions
    53 Posts 10 Posters 4.7k 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.
    • AxiomCruxA
      AxiomCrux @d.healey
      last edited by AxiomCrux

      @d-healey Ok, I just finished the tutorial for Music Box, and the SAMPLES DONT WORK. I created the samples for installer, everything said it succeded, and then I launched logic and the AU works, and asked me for the sample resource file, and when I select it and select the destination folder, it says everything worked, and everything else in the instrument other than the samples

      EDIT, I then reloaded the instrument and it works... I think this needs to be a message that pops up telling the user they need to reload the plugin or HISE needs to make it so they work the first time this is loaded, cause that makes it feel immediately like its broken on first launch.

      Also the screen popup. where you supply the samples doesn't really fit in this tutorial instrument.. there must be some kind of solution to make it feel like its not cropped in the window.

      http://www.axiom-crux.net

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @AxiomCrux
        last edited by Lindon

        @MacroMachines said in Vst Instrument without having to install the samples:

        EDIT, I then reloaded the instrument and it works... I think this needs to be a message that pops up telling the user they need to reload the plugin or HISE needs to make it so they work the first time this is loaded, cause that makes it feel immediately like its broken on first launch.

        This a well known pre-condition that isnt going to go away any time soon - what we all do is put a big red comment in the user manual that explains you have to restart the plug-in to get any sound.

        Also the screen popup. where you supply the samples doesn't really fit in this tutorial instrument.. there must be some kind of solution to make it feel like its not cropped in the window.

        You have to make your instrument big enough to hold these dialogs...

        HISE Development for hire.
        www.channelrobot.com

        AxiomCruxA 1 Reply Last reply Reply Quote 0
        • AxiomCruxA
          AxiomCrux @Lindon
          last edited by

          @Lindon said in Vst Instrument without having to install the samples:

          This a well known pre-condition that isnt going to go away any time soon - what we all do is put a big red comment in the user manual that explains you have to restart the plug-in to get any sound.

          that presumes users would read the manual before using or during setup, nobody I know does that, they assume the plugin they just installed will work immediately.

          Ideally, this would be fixed or set up so that there is a dialogue that comes up after the sample installation that simply says "samples installed successfully reload the plugin to continue". there already is one that tells you the samples were installed, the text just needs to be amended.

          Even more ideally, the package installer would do this before the plugin is even run, the samples would be installed and the plugin would know where they were installed so they don't have to do anything but run the plugin and it works.

          I would love to learn enough JUCE to help in implementing these types of things if they are not priorities for the developer. I think of these things as very important, maybe others are ok with this. HISE is so close to being an ideal tool for plugin development, I just think with a few tweaks it would be so much better.

          http://www.axiom-crux.net

          LindonL 1 Reply Last reply Reply Quote 1
          • LindonL
            Lindon @AxiomCrux
            last edited by Lindon

            @MacroMachines said in Vst Instrument without having to install the samples:

            Ideally, this would be fixed or set up so that there is a dialogue that comes up after the sample installation that simply says "samples installed successfully reload the plugin to continue". there already is one that tells you the samples were installed, the text just needs to be amended.

            So thats a simple fix in the C++ -- go for it.

            I think it might be line 982 in BackgroundThreads.cpp

            HISE Development for hire.
            www.channelrobot.com

            ustkU 1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @Lindon
              last edited by

              @Lindon I think it's worth to add permanently so I'll push a request to @d-healey's fork with the "fix" ;)

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

              LindonL 1 Reply Last reply Reply Quote 1
              • LindonL
                Lindon @ustk
                last edited by

                @ustk said in Vst Instrument without having to install the samples:

                @Lindon I think it's worth to add permanently so I'll push a request to @d-healey's fork with the "fix" ;)

                er... its not even tested as the right spot....so David will need to do some work...I would do it if I wasn't in the middle of a big development build...

                HISE Development for hire.
                www.channelrobot.com

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

                  I think it's a good idea. I'll take a look when I have a bit of spare time.

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

                  1 Reply Last reply Reply Quote 1
                  • ustkU
                    ustk @Lindon
                    last edited by

                    @Lindon Was nothing more than changing the line you kindly spotted :)
                    @d-healey pull request ;)

                    Untitled.png

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

                    LindonL 1 Reply Last reply Reply Quote 3
                    • LindonL
                      Lindon @ustk
                      last edited by

                      @ustk cool well done.

                      HISE Development for hire.
                      www.channelrobot.com

                      ustkU 1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk @Lindon
                        last edited by ustk

                        @Lindon I tried to add \nbut it doesn't work. Although I've seen it in some other .cpp using the same message window...
                        So I let it on one line... any idea?

                        PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully.\nPlease relaunch the instrument.");
                        

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

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

                          Try \r\n

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

                          ustkU 1 Reply Last reply Reply Quote 1
                          • ustkU
                            ustk @d.healey
                            last edited by

                            @d-healey It doesn't work, it's taken as a literal... Not a big deal though!

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

                            AxiomCruxA 1 Reply Last reply Reply Quote 0
                            • AxiomCruxA
                              AxiomCrux @ustk
                              last edited by AxiomCrux

                              @ustk Do you maybe have to do it with another quote as in :

                              PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully."\n"Please relaunch the instrument.");
                              

                              or maybe it just requires a space between the /n? as in :

                              PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully. \n Please relaunch the instrument.");
                              

                              http://www.axiom-crux.net

                              1 Reply Last reply Reply Quote 0
                              • AxiomCruxA
                                AxiomCrux @ustk
                                last edited by

                                @ustk Also, as far as my other mentioned slightly more ideal option, do you know what it is that happens upon plugin load that makes it so it works when you reload it? Is there any possible way to trigger the sample references or whatever is happening to be re-initialized automatically upon hitting OK on the popup? I realize that might be slightly more complex than the text solution, just figured it might be worth asking, as then it would simply work without needing to reload at all.

                                Either way good work :D. thanks for doing this :)

                                http://www.axiom-crux.net

                                ustkU 1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @AxiomCrux
                                  last edited by

                                  @MacroMachines said in Vst Instrument without having to install the samples:

                                  @ustk Do you maybe have to do it with another quote as in :

                                  PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully."\n"Please relaunch the instrument.");
                                  

                                  or maybe it just requires a space between the /n? as in :

                                  PresetHandler::showMessageWindow("Samples imported", "All samples were imported successfully. \n Please relaunch the instrument.");
                                  

                                  I tried both solutions but the first throws a compile error and the second doesn't work...

                                  @ustk Also, as far as my other mentioned slightly more ideal option, do you know what it is that happens upon plugin load that makes it so it works when you reload it? Is there any possible way to trigger the sample references or whatever is happening to be re-initialized automatically upon hitting OK on the popup? I realize that might be slightly more complex than the text solution, just figured it might be worth asking, as then it would simply work without needing to reload at all.

                                  Either way good work :D. thanks for doing this :)

                                  I think it's because samples aren't found at init so the plugin needs a re-init that can only be done this way I imagine. But there might be a solution to this at Christoph's level, dunno...

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

                                  AxiomCruxA 1 Reply Last reply Reply Quote 0
                                  • AxiomCruxA
                                    AxiomCrux @ustk
                                    last edited by

                                    @ustk I just found this in the JUCE doc, taking the output kadenze online course:

                                    void 	drawSingleLineText (const String &text, int startX, int baselineY, Justification justification=Justification::left) const
                                     	Draws a one-line text string. More...
                                     
                                    void 	drawMultiLineText (const String &text, int startX, int baselineY, int maximumLineWidth, Justification justification=Justification::left, float leading=0.0f) const
                                     	Draws text across multiple lines. More...
                                    

                                    So he may have used the single line text in the message window class possibly?

                                    http://www.axiom-crux.net

                                    ustkU 1 Reply Last reply Reply Quote 0
                                    • ustkU
                                      ustk @AxiomCrux
                                      last edited by ustk

                                      @MacroMachines seems a nice find, but when searching for that I found no references to these methods in Hise, code, only once in a juce file for the multiLine
                                      here's the function that is called in the PresetHandler.cpp, but this is the end of my skills...

                                      void PresetHandler::showMessageWindow(const String &title, const String &message, PresetHandler::IconType type)
                                      {
                                      #if USE_BACKEND
                                          if (CompileExporter::isExportingFromCommandLine())
                                          {
                                      	std::cout << title << ": " << message << std::endl;
                                      	return;
                                          }
                                      		
                                      #endif
                                      
                                      #if HISE_IOS
                                          
                                          NativeMessageBox::showMessageBox(AlertWindow::AlertIconType::NoIcon, title, message);
                                          
                                      #else
                                      
                                          ScopedPointer<LookAndFeel> laf = createAlertWindowLookAndFeel();
                                          ScopedPointer<MessageWithIcon> comp = new MessageWithIcon(type, laf, message);
                                          ScopedPointer<AlertWindow> nameWindow = new AlertWindow(title, "", AlertWindow::AlertIconType::NoIcon);
                                          
                                          nameWindow->setLookAndFeel(laf);
                                          nameWindow->addCustomComponent(comp);
                                          nameWindow->addButton("OK", 1, KeyPress(KeyPress::returnKey));
                                          
                                          nameWindow->runModalLoop();
                                      #endif
                                      
                                          return ;
                                      };
                                      

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

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

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • FrankbeatF
                                          Frankbeat
                                          last edited by Frankbeat

                                          In case this isn't yet solved since this old threat stopped growing and some of you are still interrested…

                                          As far as a Mac VST is concerned: I have put my samples folder into the MyInstrument.vst itself. This is possible by right clicking it in Finder and choosing Show Package Content. This opens its subdirectory where you could store your samples folder in.

                                          Of course, this is kind of a hack and doesn't come with the PlugIn recognizing the path automatically, but… Isn't there any string within the bundle that could be changed from something like

                                          %HOME%/Library/Applications Support/your_company_name/
                                          

                                          to something like

                                          %HOME%/Library/Audio/PlugIns/VST/YourInstrumentName.vst/Samples
                                          

                                          ?

                                          Using HISE from the develop branch (Feb '23)

                                          LindonL 1 Reply Last reply Reply Quote 0
                                          • LindonL
                                            Lindon @Frankbeat
                                            last edited by Lindon

                                            @Frankbeat The plugin will "look for" the sample folder on start up - this is always in the LinkOS file in the "AppData" folder - I think its a pretty big hack to change this -

                                            Plus it then it makes the sample location very very fixed, as well as making some pretty big assumptions about the machine config. and disk layout, and space availability on your end users machine s(which is why it was done this way to start with) , so the problems with this approach are:

                                            1. you dont have any known fixed locations across OSes
                                            2. You dont know how much disk space is available on the users machine even if you knew this location
                                            3. The location you hard-wire is impossible to change for the user

                                            So the only alternative is to ask the user where they want to put the samples - and use that location(stored in a file that the plugin looks at on start up - that's the LinkOS files)

                                            HISE Development for hire.
                                            www.channelrobot.com

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

                                            17

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts