HISE Logo Forum
    • Categories
    • Register
    • Login

    Message.getEventId()

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 163 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.
    • ulrikU
      ulrik
      last edited by

      I don't remember if this is the way it should be but,
      Console.print the EventId in NoteOff Callback is 1 number below the EventId in NoteOn Callback, is this the way it should be? Has it always....?
      Maybe I miss something here when I log it
      look here:

      HiseSnippet 764.3ocsU01aSCCD1tqFQKLDShe.Q6SshRUJrMPLgXr9BJB5VEcLw2l7bbZsVpcThagJD+kQ7O.NmjtjLRQaUh7ob28b1O2km6xnPEiGEoBQ3ZmsLfivOjLdoTOs6TpPhb5gvOhLjFo4gVItNdY.MJh6hv3sduwAtVUT7yud6wTepjwybgPmqDL9GEyD5LuiN5CBe+ATW9YhY4Pu2QNLkrqxWMG3yVDaT.kcEcB+DpAVEBBeu9tBsJbrlp4Q.liUtKGOU8UYB9yEQhK84FiNnwvAk3F0cpv2czpZMBgvUGkU4akT4OgLT3Jt1eVG3wwArxxHeO.WoHkpVfRcVGkFn7cMGvZnGNG8plPucHiYgh.cVDC2d.wQBeb7nPaOOsRvhp7SLoqBPH0smQuhOHDLtNiFGXa2xZea6lG5MWxzBkzRIOQo4mJazr92qWyWwn9VRq2XMDtS3SQ6IbsAvIymcIOrQyC2ttE7jfaQQbmyA2B8xqQsJlXhTEx6u.XUCc3bdwSwwENlXQXapqaJa5zxR1xZQKK6UfgxJR4yaGDJfiY2DbNtud2m5317v5+nt0MqIOu7EU70jiswzwwMlr0Jd8Phv8ulNPJkpUFe77VGgLeTBU99lSvvoaD1LXTdjzDaHiudnkP8gF3JffZonb7d2N4HKQijCnR5HE5SC3o1YB1NkHXQohL3sO6zipoFMbpO.W.OTKLzA2iu.VHjnnqQ5witRqBfUB+kbGF5Tty8o5hShlUNoAf9QAIuQVKi.8V9UR2gwS6RGOKsZukzcGxHglMsb9VoD9Bcs+27McY21j9ddblNirUIC9xltY6NPkOolqExICo5Pw2PXBLFMF12y3.SjRtObQDbEihJw11Xa5Li4R2XieCOoA6XrwoA6rJHZFkEptfkLoXVmd+XO.mjw+IoF7KMv1pCJd5AxiX21FMC1xeAiYZEOC3d4477MHmWrA4r2Fjy9aPNGrA47xMHmW8Oyw7C12MWqlkLl.NF0OdMBF2WRAUVrhD8G.Z3ecD
      

      Hise Develop branch
      MacOs 15.3.1, Xcode 16.2
      http://musikboden.se

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

        Well the way you're doing it I would expect the result you are seeing.

        It works like this.

        You press a note, so the on note callback generates a note ID of 1

        You then play a note with Synth.addNoteOn which will have an ID of 2 (which is what you see in the Console the first time you load your snippet).

        Then you release the key, this is the release of the first event so it will also have an ID of 1. And this is what you're outputting to the console so it will always be one less than the note you created in on note.

        In other words you are outputting two different things in the two callbacks. In on note on you are outputting the ID of your new note that you create with Synth.addNoteOn, you are not outputting Message.getEventId(). In the note off callback though you are outputting the event ID that is triggered when you press/release a key, here you are outputting Message.getEventId().

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

        ulrikU 1 Reply Last reply Reply Quote 2
        • ulrikU
          ulrik @d.healey
          last edited by

          @d-healey Ahh, of course, thank you! 👍

          Hise Develop branch
          MacOs 15.3.1, Xcode 16.2
          http://musikboden.se

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

          31

          Online

          1.7k

          Users

          11.7k

          Topics

          101.9k

          Posts