HISE Logo Forum
    • Categories
    • Register
    • Login

    How to code some intricate legato logic... use onTimer() ?

    Scheduled Pinned Locked Moved Scripting
    20 Posts 3 Posters 852 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.
    • d.healeyD
      d.healey @tonewolf
      last edited by

      @tonewolf said in How to code some intricate legato logic... use onTimer() ?:

      I thought I read something about the timer being limited to 40ms intervals, though

      Looks like 4ms to me - https://github.com/christophhart/HISE/blob/develop/hi_core/hi_dsp/modules/ModulatorSynth.cpp#L410

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

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

        @tonewolf said in How to code some intricate legato logic... use onTimer() ?:

        Is there significant advantages to separating those all out into discrete MidiLists?

        Yes, do this

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

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

          @d-healey ah, great. So is this something different from…

          https://docs.hise.dev/hise-modules/midi-processors/list/scriptprocessor.html#the-ontimer-callback

          Which says it is limited to 40ms…?

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

            @tonewolf said in How to code some intricate legato logic... use onTimer() ?:

            Which says it is limited to 40ms…?

            Well the code says otherwise, unless my maths is wrong and 0.004 seconds is not 4ms

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

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

              @d-healey great! Just wanted to make sure we were talking about the same Timer.

              Wonderful. That’s been super helpful, thanks! I’ll see what I can come up with using this method.

              1 Reply Last reply Reply Quote 0
              • T
                tonewolf
                last edited by tonewolf

                Perhaps missing something obvious, but how can I use MidiList to store times, when it only seems to be able to store integer values between -128 and 128?

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

                  @tonewolf said in How to code some intricate legato logic... use onTimer() ?:

                  store integer values between -128 and 128?

                  hmmm, integer yes, but you can store any value (well I'm sure there'll be an upper limit).

                  So yeah you'll probably need to use arrays for the time for the precision you need.

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

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

                    @d-healey I think I must have misunderstood the online docs (or they are out of date), as it appears to state the values must be between -128 and 128. But testing, it seems I can have 9 figure integers. Perhaps it means there are indexes between -128 and 128?

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

                      @tonewolf Not sure which doc but the indexes go from 0 to 127, so you get one value for each MIDI note - hence the name, MIDI list.

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

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

                        @d-healey this is the doc…

                        https://docs.hise.audio/scripting/scripting-api/midilist/index.html#setvalue

                        But in reality, I think it can store a 32bit integer

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

                          @tonewolf Ah yeah, that's confusing and wrong :)

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

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

                          31

                          Online

                          2.0k

                          Users

                          12.7k

                          Topics

                          110.0k

                          Posts