HISE Logo Forum
    • Categories
    • Register
    • Login

    How do I use the presence of just CC messages as a condition?

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 118 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.
    • VirtualVirginV
      VirtualVirgin
      last edited by

      I am trying to filter MIDI message types but have encountered a problem.
      At the moment I am trying to filter just CC messages, so that certain things happen only when a CC message is present (and not a PC, PB etc.).
      When using “onController” callback, I can filter PC and Aftertouch messages with:

      if
      Message.isProgramChange

      or
      Message.isMonophonicAftertouch
      Message.isPolyphonicAftertouch

      but how do I filter other messages?

      I see no:

      Message.isController
      Message.isControlChange
      Message.isPitchBend

      How do I isolate the presence of just the CC messages?

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

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

        @VirtualVirgin you can use

        If (Message.getControllerNumber() = ?)

        Replace ? with the cc number you're interested in.

        I think pitch is 128 or 129

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

        1 Reply Last reply Reply Quote 0
        • VirtualVirginV
          VirtualVirgin
          last edited by VirtualVirgin

          Thanks :)

          This worked to select all CC messages by checking for >= 0 && <=127.

          I can confirm that controller #128 is Pitch Bend here.

          I'm working on a MIDI monitor and getting some readings:
          Screenshot 2024-10-24 at 3.17.56 PM.png

          Is there a way to direct all console prints to a text field label in the GUI?
          I can figure out how to do a label that gives one readout at a time,
          but what about text field like the console where there is a history of the recent messages?

          You can listen to my orchestral mockups here:
          https://www.virtualvirgin.net/

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

            @VirtualVirgin

            You could use a panel, or a multi-line label.

            Add each line to a variable (use the + operator to stick strings together). Then set the text of the label to this variable.

            reg myText = "some text";
            
            myText += " Some more text"; // myText is now "some text Some more text"
            
            myLabel.set("text", myText);
            

            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

            26

            Online

            1.8k

            Users

            12.0k

            Topics

            104.0k

            Posts