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.
    • 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

                        49

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts