HISE Logo Forum
    • Categories
    • Register
    • Login

    Run Script In Expansion

    Scheduled Pinned Locked Moved Scripting
    42 Posts 4 Posters 1.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.
    • CasmatC
      Casmat @Lindon
      last edited by Casmat

      @Lindon @d-healey @Christoph-Hart thanks guys! Makes sense to me! Just a couple questions:

      1. How do I get to the linkfile location in appdata? Is it just FileSystem.getFolder(AppData).getChildFile(LinkFile)

      2. Yup, I'm planning on putting a js script file in each of my expansions, so How would I run the actual script file? do we use include() to run it, and if so, how do I get the name of the expansion to put in the include function?

      3. So if i'm understanding correctly, the samples getting put in the appdata and expansion presets require some code, so do we put the code on the main plugin script or the script in the expansion folder?

      4. @Christoph-Hart This is only true if you're using regular expansions - if you're running in Full Instrument Expansion mode, then the expansions become encapsulated entities that can't load content from other expansions.

      So if this is the case, then why does my system right now not work? What does it mean when the samplemaps turn pink in the sampler?

      1. So I see that the best way to go about this is via a zip file, but of course, there isn't any protection methods implemented for zips. Sooo, how do you guys suggest copy protecting this whole system?

      Thanks again!

      i make music

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

        @Casmat

        1. Why do you want the link file? Yes you can use the file system API to get it but remember it will be different for each OS.

        2. All js code must be included at compile time, you can't add it dynamically. What is your goal?

        3. User Presets are automatically put into the correct location if you are using the built in expansion installer. Samples shouldn't go in the app data folder. Or did you mean sample maps? In which case as I said previously sample maps aren't in a folder once your project/expansion is compiled.

        4. Pink sample maps mean the samples are purged/not loaded

        5. I don't see why zip files are better that the built in system, except for the update situation I mentioned earlier.

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

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

          @d-healey Thanks David!

          1. @Lindon said that he put his samples in the appdata link file location.. what is it really? I was just basing it off of what he said

          2. I have the main object which takes care of my samplemap identifying and I’m planning on using the JS script to push the samplemap object into the main object:

          I’m also trying to do some other things with the main plugin for each expansion, for example my samplemap swapping. Basically, I have three samplers and for each sampler, you can mix and match samplemaps from all the expansions the user has. I’ve made this browser for each sampler that lets you select samplemaps with two viewports, one viewport for tags and categories (All, Pad, Chord, Pluck) and the second (with a label to search the viewport) for seeing the available samplemaps and selecting them to change the samplemap for that layer. To accomplish this, I’ve set made an object which has multiple objects inside (these are the tags and categories). In those objects, I’ve put in an object for each samplemap entry. So this object system acts as a file system where the objects are kind of the directories. (Is this a good system, first thing to come in mind to try, but I feel like there may be a better one) Basically, each expansion I add would come with a set amount of samplemaps and there would need to be a script which pushes the samplemap objects into the main object if that makes any sense..

          1. Basically #1 in that what did @Lindon mean by putting samples in the linkfile location?

          2. Ahh, so the samples being in different locations are what’s throwing off hise when I try to load different samplemaps from different locations/expansions.

          3. So with my use case I could still use the standard encoding files from hise?

          Thanks again!

          i make music

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

            @Casmat

            1. Well that's automatic with the hr installer if I remember correctly because it gives the user the choice of where to install the samples and that populates the link file. You really should just go an try the built in installer and see how it works.

            2. You'll have to find another way, you can't include extra scripts in your expansions.

            3. Yeah the samples need to be in the location the link file in app data is pointing to.

            4. I haven't seen anything in your use case that would prevent it.

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

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

              @d-healey Tried exporting samples as an archive but the end result hr1 file doesn't seem to have the samples included as the file size is very small and is the exact same as the hxi file size. Do you know what I may be doing wrong? And i'm deciding on putting all samples into the main samples folder under my project folder, so I've set the location in the installer function to the samples folder, but after installing the hr file, nothing happens... Is there something I'm not getting?

              Thanks for your help!

              i make music

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

                @Casmat

                Do you know what I may be doing wrong?

                Did you select the hxi in the sample exporter dialog window?

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

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

                  @d-healey Yup, the info.hxi one in my expansion folder

                  i make music

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

                    @Casmat Have the samples been converted to ch monoliths?

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

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

                      @d-healey bingo! never heard of them before and definitely did not do anything with the sample files. Mind giving a quick rundown on what it is and how to do it? Tried doing tools -> convert all samples to monolith + samplemap but it says missing convert sampler..

                      Thanks!

                      i make music

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

                        @Casmat

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

                        CasmatC 2 Replies Last reply Reply Quote 0
                        • CasmatC
                          Casmat @d.healey
                          last edited by

                          @d-healey ooh! Handy! Will update you once I tinker round

                          Thanks

                          i make music

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

                            @d-healey got the ch1 files but the same issue when exporting the samples occurs. The hr1 file should include the size of the ch1 samples, right? Right now the hr1 file is still very small

                            i make music

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

                              @Casmat Post a video of what you're doing

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

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

                                @d-healey my screen capture has been bugging out, but hope this would be enough:

                                note: "Morphology - Night Owl" is one of the expansions

                                This was my popup values for the export samples as archive:
                                bbe714bc-61a6-4c39-bdb8-d92aefebf0e7-image.png

                                This is the generated hr1 file in main project folder:
                                6b0ba713-08e4-4d97-81e5-2325d9b0a714-image.png

                                info.hxi in "Morphology - Night Owl" file i used for the export samples page:
                                eb7ea1f8-9e0c-4462-a0d6-ffba2658da93-image.png

                                ch1 files in the "Morphology - Night Owl/Samples" folder:
                                82dc1e7c-b1ee-4553-b8f1-05719314c4f5-image.png

                                what my ch1 converter page looked like:
                                2257e857-b343-4a26-ac9a-75ea294cdcbe-image.png

                                samplemaps i used for the converter in "Morphology - Night Owl/SampleMaps":
                                0199ed99-a0e3-4214-a01f-9b0df0e8762b-image.png

                                main samples folder in the project folder after "installing" the hr1 file:
                                47823bd4-7c1e-4222-bea8-169a1fa44865-image.png

                                Hope this helps!

                                i make music

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

                                  @Casmat You keep your projects in your Downloads folder?

                                  It looks like you're doing everything correctly so I'm not sure why it's not working. What is the expansion type in your project preferences set to?

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

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

                                    @d-healey yeah, when testing out hise i had just put the project in the downloads and now i just stick with it haha! Heres the project settings: (dont mind the 1234...)
                                    23c8a13d-3dba-4d45-9ee9-23c106816438-image.png

                                    i make music

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

                                      @Casmat 1234 is the best, that's the secret key to run a library in Rhapsody ;)

                                      I have no idea why it's not working. I suggest you make a new minimal test project with just a single sample and try and figure out what's happening.

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

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

                                        @d-healey true:beaming_face_with_smiling_eyes:! I’ll give it a go, what am I supposed to see once the hr1 package gets installed? Is the folder where you placed the samplers in the installer function supposed to populate with the ch1 files?

                                        i make music

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

                                          @Casmat Yes you should the ch1 files

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

                                          CasmatC 1 Reply Last reply Reply Quote 1
                                          • CasmatC
                                            Casmat @d.healey
                                            last edited by

                                            @d-healey after deleting the expansion and starting from scratch, it seems to work, dont know why it didnt work before but now it does! I have installed the hr1 file and now the samples folder has the ch1 files. To revert the installation, I'd just need to delete the ch1 files, right? Is there any other files created by installing the hr1 file?

                                            i make music

                                            d.healeyD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            62

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.1k

                                            Posts