Forum

    • Register
    • Login
    • Search
    • Categories

    Switch sample maps with combo box not working

    General Questions
    3
    7
    119
    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.
    • SteveRiggs
      SteveRiggs last edited by

      Hi again guys,

      Not sure if something has changed in HISE since @d-healey's video on how to do this, but I've followed it along exactly 3 times now and I'm getting 2 errors in the console. It's saying that the backslash is an unexpected character and its showing up red in my script editor?

      I'll put the code and the errors below. Can anyone spot anything wrong? It should be ok?

      Screen Shot 2019-09-02 at 21.16.29.png

      Interface:! Line 11, column 44: Unexpected character '\' in source {SW50ZXJmYWNlfHwzMDd8MTF8NDQ=}
      
      Interface:! Line 21, column 35: Unexpected end-of-input in string constant {SW50ZXJmYWNlfHw0ODN8MjF8MzU=}
      
      Content.makeFrontInterface(600, 500);
      
      //Sampler
      consat var Sampler1 = Synth.getChildSynth("Sampler1");
      
      //Sample masp array
      const var sampleMaps = Sampler.getSampleMapList();
      
      //Combo Box
      const var cmbSampleMap = Content.getComponent("cmbSampleMap");
      cmbSampleMap.set("items”, sampleMaps.join("\n"));
      
      
      inline fucntion oncmbSampleMapControl(compnent, value)
      {
          Sampler1.asSampler().loadSampleMap(sampleMaps[value-1]);
      };
      
      Content.getComponent("cmbSampleMap").setControlCallback(oncmbSampleMapControl);
      

      www.anarchyaudioworx.com

      www.facebook.com/groups/audioworx/

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

        It‘s funny how the syntax highlighting in this forum points you to the error 😉

        SteveRiggs 3 Replies Last reply Reply Quote 1
        • SteveRiggs
          SteveRiggs @Christoph Hart last edited by

          @Christoph-Hart I have no idea what that means haha 🤣

          www.anarchyaudioworx.com

          www.facebook.com/groups/audioworx/

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

            @Christoph-Hart I did notice differences from how the code was in the video, to how it shows up in my console...

            The \n in line 11 shows up red and white, and the cmbConsoleMap at line 19 shows up in white on my script editor, where in the video its all brown. Is that what syntax highlighting is? (Please excuse my limited knowledge of the correct terms)

            The one in the video also compiles and mine doesn't, even though its identical.

            Confused .com 🤔

            www.anarchyaudioworx.com

            www.facebook.com/groups/audioworx/

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

              I've been stuck on this for a couple of weeks now. I thought it might be because I was on 1.6.0 still at the time so I got scriptnode installed in the end, but still the same errors. Really confused 😥

              www.anarchyaudioworx.com

              www.facebook.com/groups/audioworx/

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

                @SteveRiggs said in Switch sample maps with combo box not working:

                cmbSampleMap.set("items”, sampleMaps.join("\n"));

                Why does the quotation mark after items not look like the rest of the quotation marks 😉

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

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

                  @d-healey Haha. Oh dear. Taxiiiii! 🤣

                  I'll change that in a minute then once my other ones finished compiling. Pretty sure that will fix it. Thanks, yet again!

                  www.anarchyaudioworx.com

                  www.facebook.com/groups/audioworx/

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

                  3
                  Online

                  1.2k
                  Users

                  7.0k
                  Topics

                  64.8k
                  Posts