HISE Logo Forum
    • Categories
    • Register
    • Login

    [feature request] Midi broadcaster

    Scheduled Pinned Locked Moved Feature Requests
    feature requestbroadcasterarticulationkeyswitch
    10 Posts 2 Posters 363 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
      last edited by d.healey

      A broadcaster that is triggered by incoming MIDI.

      Example use case:

      I have a list of articulations on the UI. When a "keyswitch" is pressed I change the selected articulation displayed in the list. This is managed from an "Articulation Handler" namespace.

      My current solution is to call the necessary function in the articulation handler from the on note on callback. But it would be nice if the behaviour could be self-contained within the namespace and the note on callback didn't need to be aware of the articulation handler's existence.

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

      A 1 Reply Last reply Reply Quote 0
      • A
        aaronventure @d.healey
        last edited by

        @d-healey is it just about avoiding one function call in on note or do you have a bunch of logic in on note for it as well?

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

          @aaronventure In on note on I call articulationHandler.onNoteOn() which handles all the necessary stuff for updating the UI. This is just one example, I also have a similar call in on controller, for my guitar stuff I have similar things.

          Basically anything that responds to MIDI input currently has to be called directly from the MIDI callbacks, I'd like to see an observer pattern option as this is the way HISE seems to be going in general and it's making things so much more modular.

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

          A 1 Reply Last reply Reply Quote 0
          • A
            aaronventure @d.healey
            last edited by

            @d-healey the only problem I see with that is maintaining control of execution order, which at the moment is very clear along the entire tree

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

              @aaronventure Broadcasters have a priority setting for this purpose. But most of my modules are independent and the order doesn't matter.

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

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @d.healey
                last edited by

                @d-healey no I mean I relation to other script editors. Currently a note on starts at the top, goes through all the sibling processors, then spreads to the children but still executes in order.

                Where does the broadcaster fit in? Before the processor where it's defined? After? Maybe that would be one of the arguments when creating it.

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

                  So Broadcaster.attachToMidiMessage(executeBefore) with the function argument defining message type (0,1 or 2), number, value, channel

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

                    @aaronventure Oh I understand now, that wouldn't be affected at all. The broadcaster only exists within the script processor in which it is declared.

                    It's like having multiple on note on callbacks in a single processor.

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

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      aaronventure @d.healey
                      last edited by

                      @d-healey of course, but does it go before or after the processors bote/controller call backs?

                      Maybe you want it to go before so that all on note calls assume the articulation is already set and can refer to the variables? Maybe you want it to go after, just in case there's something else happening specific to this instrument where you want to ignore a note on so that it doesn't trigger the articulation?

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

                        @aaronventure I would expect it to work in the same way as component value broadcasters and component control callbacks. - I've never tested which triggers first. I think after the callback would make the most sense.

                        Edit: I just did the test with the value broadcaster and it fires before the component control callback, but I think for MIDI messages it makes sense for the callback to fire first - although I haven't given it much thought.

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

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

                        19

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.5k

                        Posts