HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing Instruments

    Scheduled Pinned Locked Moved General Questions
    14 Posts 4 Posters 1.3k 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.
    • JayJ
      Jay
      last edited by

      Can anyone tell me how to do an instrument change, let's say for example, I have an instrument plugin with different instruments (piano, bass, guitar, etc) how do I change the patches inside the preset instead of creating various instruments for this.

      Joansi Villalona

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

        @jay You need a function to load different sample maps. You could have this happen from a drop down menu.

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

        JayJ 1 Reply Last reply Reply Quote 1
        • Tod SlaughterT
          Tod Slaughter
          last edited by

          @d-healey Hi David, would these be loaded in one sampler with multi sample maps or one sampler per sample map?

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

            @tod-slaughter You can only load one sample map into a sampler at a time but you can swap them at (almost) any time.

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

            1 Reply Last reply Reply Quote 0
            • Tod SlaughterT
              Tod Slaughter
              last edited by

              @d-healey Ok cool that simplifies things somewhat.

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

                @d-healey I tried already but it didn't do anything at all

                Joansi Villalona

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

                  @jay Post code please

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

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

                    @d-healey

                    ==========onInit========

                    const var mainSampler = Synth.getSampler("Sampler");
                    const var CmbSampleMap = Content.addComboBox("CmbSampleMap", 220, 480);
                    const var samplemaps = ["SampleMaps NAME Instruments", "a - Classic Tiney", "b - DX-Seven II", "k - Full Tines on Steroids"];
                    CmbSampleMap.set("items", samplemaps.join("\n"));

                    =========onControl============

                    function onControl(number, value)
                    {

                    {  
                        case CmbSampleMap:
                            Sampler.loadSampleMap(CmbSampleMap.getItemText());
                        break;
                    }
                    

                    }

                    Joansi Villalona

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

                      @jay Sampler.loadSampleMap(CmbSampleMap.getItemText()); Your sampler variable is called mainSampler not Sampler.

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

                      JayJ 1 Reply Last reply Reply Quote 1
                      • Tod SlaughterT
                        Tod Slaughter
                        last edited by

                        Well I've just bought a book for javascript newbies. Hopefully I'll be up to speed soon. 😵

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

                          @tod-slaughter It will help but remember that although HISE script looks like javascript it isn't javascript and a lot of stuff (beyond the basics) won't be applicable to HISE.

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

                          1 Reply Last reply Reply Quote 0
                          • Tod SlaughterT
                            Tod Slaughter
                            last edited by

                            @d-healey Hi David, I need to know the basics or I'll never understand what's going on. From what I gather the syntax is similar/same but the naming is different?

                            1 Reply Last reply Reply Quote 0
                            • Christoph HartC
                              Christoph Hart
                              last edited by

                              A knowledge of Javascript basics is definitely useful, but don’t overdo it because a lot of advanced language features are not supported by HISE and there are a few additions in the scripting engine that are not part of the Javascript standard (mostly stuff adapted from C/C++ for meeting realtime requirements).

                              1 Reply Last reply Reply Quote 1
                              • JayJ
                                Jay @d.healey
                                last edited by

                                @d-healey Thanks David, that was it.

                                Joansi Villalona

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

                                52

                                Online

                                1.7k

                                Users

                                11.7k

                                Topics

                                101.8k

                                Posts