HISE Logo Forum
    • Categories
    • Register
    • Login

    NoteEventID's || Overlapping notes fix...

    Scheduled Pinned Locked Moved Solved Scripting
    6 Posts 2 Posters 59 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.
    • ChazroxC
      Chazrox
      last edited by

      I have Keys triggering chords, there are some instances where multiple chords share the same notes that interferes with noteOffs and I get stuck notes. Is it possible to create unique 'noteEventIds' arrays per chord trigger script and give them unique eventID's that wont interfere with one another?

      Do I just create differnt arrays and they will get non-conflicting id's?
      Is this a thing?

      const var noteEventIds1 = [];
      const var noteEventids2 = [];
      
      

      Am I doing too much? What is best practice in this situation?

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @Chazrox
        last edited by

        @Chazrox more or less yes - use Event IDs for the notes in each chord and keep them in a couple of arrays

        HISE Development for hire.
        www.channelrobot.com

        ChazroxC 1 Reply Last reply Reply Quote 0
        • ChazroxC
          Chazrox @Lindon
          last edited by Chazrox

          @Lindon if I then send both event id arrays down the pipe, do they converge into one event list w/ unique id's even if they share the same note sometimes (if the 2 chords overlap)? The reason im asking is... would I have to deal with the noteOffs per array? or do they converge and are deal with as one?

          Im still trying to learn about midi events/messages so its fair to assume I know little to none about this thus far.

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @Chazrox
            last edited by

            @Chazrox said in NoteEventID's || Overlapping notes fix...:

            @Lindon if I then send both event id arrays down the pipe, do they converge into one event list w/ unique id's even if they share the same note sometimes (if the 2 chords overlap)?

            I have no idea what you mean by "converge" they are two separate arrays. I dont know what you mean by "send..down the pipe" they live where they live(scope).

            Assuming you want any chord to play when its key switch is down and stop when its up (so any number of keyswitched chords can be playing at the same time):

            just have an array for each keyswitch:

            on note off for the KS issue note off messages for the IDs in its array
            on note on - fill this KS's array with event IDs for the chord...

            if you only want one chord to play at a time: use one chordArray

            on any KS off: check if any other KS is down if so do nothing, else issue note off for the event IDs in chordArray

            on any KS on: issue note off for the event IDs in chordArray, clear the chordArray, then fill the array with the IDs from playNote for each chord note...

            HISE Development for hire.
            www.channelrobot.com

            ChazroxC 2 Replies Last reply Reply Quote 0
            • ChazroxC
              Chazrox @Lindon
              last edited by

              @Lindon Thank You! Im gonna try that right now. Im sure that will be the fix! Great explaination. Thanks again 🙏

              excuse my slang...like I said. Just assume I know nothing for the time being. lol.

              1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @Lindon
                last edited by

                @Lindon got it! Thank you sir! 🙏

                1 Reply Last reply Reply Quote 0
                • ChazroxC Chazrox marked this topic as a question
                • ChazroxC Chazrox has marked this topic as solved
                • First post
                  Last post

                19

                Online

                1.8k

                Users

                12.1k

                Topics

                105.5k

                Posts