HISE Logo Forum
    • Categories
    • Register
    • Login

    Ingnoring notes

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 142 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.
    • orangeO
      orange
      last edited by

      I am trying to ignore the notes below 36 and above 95. This is not working. How can we handle that?

      function onNoteOn()
      {
         if (Message.getNoteNumber() < 36 || Message.getNoteNumber() > 95)
              {
                  Message.ignoreEvent(true);
              } 
      }
       
      

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

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

        According to my friend, Console.print(), it's working. The problem must be some other part of your project.

           if (Message.getNoteNumber() < 36 || Message.getNoteNumber() > 95)
           {
               Console.print(Message.getNoteNumber());
                Message.ignoreEvent(true);
           }
        

        I have a module that does this btw, it also takes into account transposed notes.

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

        orangeO 1 Reply Last reply Reply Quote 1
        • orangeO
          orange @d.healey
          last edited by

          @d-healey said in Ingnoring notes:

          if (Message.getNoteNumber() < 36 || Message.getNoteNumber() > 95)
          {
          Console.print(Message.getNoteNumber());
          Message.ignoreEvent(true);
          }

          Thank you! I inserted that code into onNoteOn function, and it worked ✌

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

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

          38

          Online

          1.8k

          Users

          12.0k

          Topics

          104.4k

          Posts