HISE Logo Forum
    • Categories
    • Register
    • Login

    changing MIDI channel from onTimer / Filling MessageHolder from eventId

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 78 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.
    • SimonS
      Simon
      last edited by Simon

      I'd like to set the MIDI channel of a Synth.playNote in onTimer. It seems I need to use Message.setChannel to do so, but with only the eventId there doesn't seem to be a way.

      The Message methods seem similar to Kontakt variables like $EVENT_ID, but instead of having a specific variable that gets auto-filled, a method returns the right value for the callback we're in. Is there a way to peek directly at the objects the Message functions are getting values from? Can you fill a MessageHolder if you only know the eventId? Is there even a point in doing so outside an onNoteOn or onNoteOff callback?

      I noticed playNote is fixed to channel 1, while other related commands accept a channel. Maybe I'm going about it the wrong way and should just do a PR to add playNoteWithChannel?

      d.healeyD SimonS 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @Simon
        last edited by

        @Simon said in changing MIDI channel from onTimer / Filling MessageHolder from eventId:

        I'd like to set the MIDI channel of a Synth.playNote in onTimer.

        Use Synth.playNoteWithStartOffset();

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

        1 Reply Last reply Reply Quote 1
        • SimonS
          Simon @Simon
          last edited by

          @Simon As usual I found that right after asking :D The lack of a channel parameter in playNote definitely threw me off.

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

          29

          Online

          1.8k

          Users

          12.0k

          Topics

          104.7k

          Posts