Forum
    • Categories
    • Register
    • Login

    Unknown Functions 'set' & 'getRange'

    Scheduled Pinned Locked Moved Scripting
    15 Posts 3 Posters 1.2k 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.
    • David HealeyD
      David Healey @soundsync
      last edited by

      @trillbilly Is it because the sample map is not loaded?

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - HISE tutorials
      My Patreon - More HISE tutorials

      soundsyncS 1 Reply Last reply Reply Quote 0
      • soundsyncS
        soundsync @David Healey
        last edited by

        @d-healey You're right, when I load an internal sample map, it works. But it wont work anymore with Drag-And-Drop samples.

        I would rather use the sample maps from internal samples, but, you cant edit the loop range. I've made a post about it HERE.

        Also, obiviously Im using custom sample import so users can use their own samples. Im confused why it doesnt recognize them as sample maps anymore?

        Best,

        Aaron
        https://soundsync.dev

        soundsyncS 1 Reply Last reply Reply Quote 0
        • soundsyncS
          soundsync @soundsync
          last edited by

          @d-healey Ok, scratch that. its working ONLY if there is a sample loaded. If the sampler is cleared, it throws the error.

          If you save a preset without a sample/samplemap loaded, it will save but crash upon opening it again.

          Best,

          Aaron
          https://soundsync.dev

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @soundsync
            last edited by

            @trillbilly So before you try to call a function on the sound object you need to check if the object is populated.

            if (!isDefined(sound))
                return;
            

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - HISE tutorials
            My Patreon - More HISE tutorials

            soundsyncS 2 Replies Last reply Reply Quote 0
            • soundsyncS
              soundsync @David Healey
              last edited by

              @d-healey That will work better than my idea of populating an empty samplemap when a sampler is not in use. Thank you.

              Best,

              Aaron
              https://soundsync.dev

              1 Reply Last reply Reply Quote 0
              • soundsyncS
                soundsync @David Healey
                last edited by

                @d-healey It solved the sound.set issue but not the sound.getRange issue.

                Best,

                Aaron
                https://soundsync.dev

                David HealeyD 1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey @soundsync
                  last edited by

                  @trillbilly This line?

                  local newValue = parseInt(sound.getRange(Sampler1.LoopXFade)[1] * value);

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - HISE tutorials
                  My Patreon - More HISE tutorials

                  soundsyncS 1 Reply Last reply Reply Quote 0
                  • soundsyncS
                    soundsync @David Healey
                    last edited by

                    @d-healey Yes, that is correct

                    Best,

                    Aaron
                    https://soundsync.dev

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @soundsync
                      last edited by

                      @trillbilly And you tried placing the check before it?

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - HISE tutorials
                      My Patreon - More HISE tutorials

                      soundsyncS 1 Reply Last reply Reply Quote 0
                      • soundsyncS
                        soundsync @David Healey
                        last edited by soundsync

                        @d-healey No, Im an idiot, I only put it in 1 callback.
                        Worked like a charm. Much appreciated.

                        Best,

                        Aaron
                        https://soundsync.dev

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

                        20

                        Online

                        2.8k

                        Users

                        14.0k

                        Topics

                        121.5k

                        Posts