HISE Logo Forum
    • Categories
    • Register
    • Login

    AudioLoopPlayer load

    Scheduled Pinned Locked Moved General Questions
    51 Posts 6 Posters 2.8k 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 @d.healey
      last edited by

      @d-healey @Natan
      I have asked several times in this forum whether the audio files for the AudioLoopPlayer can be installed separately and - more importantly - whether they are protected.

      Both were answered with no.

      Above all, there is no protection such as Monolith for samples used in the AudioLoopPlayer. - Or?

      "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

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

        @MikeB said in AudioLoopPlayer load:

        there is no protection such as Monolith for samples

        Monolith isn't "protection" it's compression. HISE is open source, it wouldn't take an experienced programmer very long to reverse the compression.

        But yes it is possible to ship asset files as a separate data file

        Export Pooled Files to Binary Resource
        Will collect all pooled Audio-, Image-, MIDI files and SampleMaps and save them as .dat files in a newly created PooledResources folder in your project.
        

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

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

          @d-healey
          I'll leave it David. It's not enough for you to throw me little nibbles and then smugly say - now try a few hours.
          I know you mean well - but sorry

          "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

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

            @d-healey
            I know that Monolith is not a protection - but a big obstacle against the use of the samples by the normal user - or

            Since it is not possible to protect the samples for the AudioLooPlayer against further use the only possibility at the moment is
            is to embed them.

            "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

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

              @MikeB Well the audio files will be put into a .dat file, which I think is similar to a monolith. I could be wrong though.

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

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

                @d-healey
                Where and when are the audio files inserted into a dat.file????
                Is there a description?

                "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 0
                • d.healeyD
                  d.healey
                  last edited by

                  It's in the export menu, this is all it says in the docs:

                  Export Pooled Files to Binary Resource
                  Will collect all pooled Audio-, Image-, MIDI files and SampleMaps and save them as .dat files in a newly created PooledResources folder in your project.

                  Link Preview Image
                  HISE | Docs

                  favicon

                  (docs.hise.audio)

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

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

                    @MikeB said in AudioLoopPlayer load:

                    It's not enough for you to throw me little nibbles

                    Which part do you need? We've figured out how to get an array of audio file names, I've shown you how to use string functions to get the folders from those names, and you can use the same string functions with a slight adjustment to get the file names.

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

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

                      @d-healey

                      This is my status
                      in reg myList are 500 samples in this form

                      "{PROJECT_FOLDER}Kick/Dumpy.wav",
                      "{PROJECT_FOLDER}Snare/Dryer.wav",
                      "{PROJECT_FOLDER}Perc/Bongos.wav", etc.

                      reg myList = Engine.loadAudioFilesIntoPool();
                      Console.print(trace(myList));
                      
                      const ss = myList.substring(s.indexOf("}") + 1, s.indexOf("/"));
                      
                      Knob 1 - Select Folder 
                      Synth.getAudioSampleProcessor("Audio Loop Player_S1").setFile
                      
                      Knob 2 - Select Sample
                      Synth.getAudioSampleProcessor("Audio Loop Player_S1").setFile
                      
                      
                      
                      

                      "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

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

                        @MikeB

                        You need to create two new arrays. One for the folder, and one for the sample.

                        Then you loop through the master array (myList). And using the string functions you extrac the folder and push it to the folder array and you extract the file name and put it to the sample array. Then the rest of your code is just like you were doing before with your two handwritten arrays.

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

                        MikeBM 3 Replies Last reply Reply Quote 0
                        • MikeBM
                          MikeB @d.healey
                          last edited by

                          @d-healey let it go - I don't understand you!!!!

                          "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 0
                          • MikeBM
                            MikeB
                            last edited by

                            Although my samples have 40 MB at the moment (not yet cleaned up) and 4 MB images, the compiled VSTi plug-in has a whopping 146 MB.

                            "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 0
                            • MikeBM
                              MikeB @d.healey
                              last edited by

                              @d-healey I can adapt what I have seen - I am a graphic designer - I see things and try to understand and adapt them.

                              I can't do much with text creaming of complex programming processes. Since I can't find the beginning.

                              I need to see examples - see the code then I can understand ahhh this is how it's meant to be or ohh this is easy.

                              That's why 5 lines of code are more useful than page-long descriptions of what to do.

                              I'm about to throw everything away after 7 months anyway.
                              Every day the same sh... I can't do that. The programme crashes all the time. You first have to write a script for this.
                              You can't write a script for this - because the function doesn't exist. (AudioWaveForm Start/End) etc.

                              No sooner have you spent 5 hours solving a simple pipifax problem than the next one comes along the next day.

                              Actually, I only wanted to create a small drum plug-in.

                              "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

                              d.healeyD musictopM DanHD 3 Replies Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @MikeB
                                last edited by

                                @MikeB I try to design around the features that are available then I don't hit limits so often, of course sometimes I want new things, then I nag Christoph :)

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

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

                                  @d-healey

                                  Can you write the lines I need in this example
                                  So that I can get an idea of it and understand it.
                                  That would be nice

                                  reg myList = Engine.loadAudioFilesIntoPool();
                                  //Console.print(trace(myList));
                                  
                                  const ss = myList.substring(s.indexOf("}") + 1, s.indexOf("/"));
                                  
                                  Knob 1 - Select Folder 
                                  Synth.getAudioSampleProcessor("Audio Loop Player_S1").setFile
                                  
                                  Knob 2 - Select Sample
                                  Synth.getAudioSampleProcessor("Audio Loop Player_S1").setFile
                                  
                                  

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

                                    @MikeB I often find my self in very simmilar situations, and not only in working with HISE :)
                                    In my case i found out that leaving projects aside for a while helps me understand them better and often rethink the initial ideas and find solutions. Also i work on at least 7 or 8 other projects in paralel and sometimes problems/solutions relate between them.

                                    But, i doubt i would have gotten anywhere without the help from community here in HISE forum. Especialy since i know almost nothing in regards to scripting and i can therefore easely relate to your problems and frustration.

                                    my website: https://musictop69.wixsite.com/ilirbajri
                                    https://musictop69.wixsite.com/creatools
                                    https://musictop69.wixsite.com/orchestools

                                    1 Reply Last reply Reply Quote 1
                                    • DanHD
                                      DanH @MikeB
                                      last edited by

                                      @MikeB Take a break Mike 😆

                                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                      https://dhplugins.com/ | https://dcbreaks.com/
                                      London, UK

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

                                        Here's a simple version that splits the audio files list into two arrays, one for folders, and one for files.

                                        const audioFiles = Engine.loadAudioFilesIntoPool();
                                        const folders = [];
                                        const files = [];
                                        
                                        inline function splitAudioFilesList()
                                        {
                                        	for (x in audioFiles)
                                        	{
                                        		local folder = x.substring(x.indexOf("}") + 1, x.indexOf("/"));
                                        	
                                        		if (folders.indexOf(folder) == -1) // Prevents duplicate folder names
                                        			folders.push(folder);
                                        		
                                        		files.push(x.substring(x.indexOf("/") + 1, x.length));
                                        	}
                                        }
                                        
                                        splitAudioFilesList();
                                        
                                        Console.print(trace(folders));
                                        Console.print(trace(files));
                                        

                                        And here's another way (my preferred choice) which organises the samples into one array per folder. All of the arrays are stored in a single object so you can access them with sorted.folderName[index].

                                        const audioFiles = Engine.loadAudioFilesIntoPool();
                                        const sorted = {};
                                        
                                        inline function sortAudioFilesList()
                                        {
                                        	for (x in audioFiles)
                                        	{
                                        		local folder = x.substring(x.indexOf("}") + 1, x.indexOf("/"));
                                        		local file = x.substring(x.indexOf("/") + 1, x.length);
                                        		
                                        		if (!isDefined(sorted[folder]))
                                        			sorted[folder] = [];
                                        					
                                        		sorted[folder].push(file);
                                        	}
                                        }
                                        
                                        sortAudioFilesList();
                                        
                                        Console.print(trace(sorted));
                                        

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

                                        MikeBM 2 Replies Last reply Reply Quote 3
                                        • MikeBM
                                          MikeB @d.healey
                                          last edited by

                                          @d-healey
                                          Then, thanks to you, I have made a small step forward today. And the day was not completely in vain.
                                          Thank you very much David. 👍 👍 👍

                                          I will deal with this tomorrow

                                          "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 2
                                          • MikeBM
                                            MikeB @d.healey
                                            last edited by

                                            @d-healey
                                            New day - new misfortune

                                            Just kidding :-)

                                            I have now implemented your scriptsnippet.
                                            It works in principle - but unfortunately the samples are not
                                            from the respective folder are loaded but always the first samples in the order.
                                            So the bass samples appear in the Kick folder.
                                            The bass samples appear in the HiHat folder.

                                            The array folders goes from 0-8
                                            The array files goes from 0 -490
                                            But in each folder there are only 55 samples

                                            With your 2nd method I don't know how to distribute them to the two knobs. The first one selects the folder and the second one selects the samples in the folder.

                                            const audioFiles = Engine.loadAudioFilesIntoPool();
                                            const folders = [];
                                            const files = [];
                                            var InstrumentID_S1;
                                            var VariationID_S1;
                                            
                                            inline function splitAudioFilesList()
                                            {
                                            	for (x in audioFiles)
                                            	{
                                            		local folder = x.substring(x.indexOf("}") + 1, x.indexOf("/"));	
                                            		if (folders.indexOf(folder) == -1) // Prevents duplicate folder names
                                            			folders.push(folder);		
                                            		files.push(x.substring(x.indexOf("/") + 1, x.length));
                                            	}
                                            }
                                            
                                            splitAudioFilesList();
                                            
                                            Console.print(trace(folders));
                                            //Console.print(trace(files));
                                            
                                            
                                            //Knob-KitSelector----------------------------------------------------------------------
                                            inline function onKitSelector_Knob_S1Control(component, value){
                                            	InstrumentID_S1 = parseInt(value); //Knobvalue 1-55
                                            	Console.print("{PROJECT_FOLDER}"+folders[InstrumentID_S1]+"/"+files[VariationID_S1]);
                                            };
                                            Content.getComponent("KitSelector_Knob_S1").setControlCallback(onKitSelector_Knob_S1Control);
                                            //End --------------------------------------------------------------------------------------
                                            
                                            //Knob-SampleSelector-----------------------------------------------------------------
                                            inline function onSampleSelector_Knob_S1Control(component, value){
                                            	VariationID_S1 = parseInt(value-1); //Knobvalue 1-55		
                                            	Console.print("Variation_S1" + "{PROJECT_FOLDER}"+folders[InstrumentID_S1]+"/"+files[VariationID_S1]);
                                            };
                                            Content.getComponent("SampleSelector_Knob_S1").setControlCallback(onSampleSelector_Knob_S1Control);
                                            //End ---------------------------------------------------------------------------------------------------   
                                            
                                            
                                            

                                            "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 0
                                            • First post
                                              Last post

                                            18

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.2k

                                            Posts