Forum
    • Categories
    • Register
    • Login

    Is it possible to check whether a loaded MIDI file contains a specific note number?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 32 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.
    • M
      mehmethand
      last edited by

      Hi, I’d like to read note number data from a loaded MIDI file. Is it possible to detect whether the file contains a specific MIDI note number (e.g. note 36)?

      1 Reply Last reply Reply Quote 0
      • M
        mehmethand
        last edited by

        I found it.

        local list = midiPlayer.getEventList();

        for (e in list)
        {
            if (e.isNoteOn() && e.getNoteNumber() == noteNumber)
                return true;
        }
        
        dannytaurusD 1 Reply Last reply Reply Quote 1
        • dannytaurusD
          dannytaurus @mehmethand
          last edited by

          @mehmethand Nice 👌

          Meat Beats: https://meatbeats.com
          Klippr Video: https://klippr.video

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

          29

          Online

          2.1k

          Users

          13.1k

          Topics

          113.5k

          Posts