HISE Logo Forum
    • Categories
    • Register
    • Login

    How do I return the number of instances of a value in an array?

    Scheduled Pinned Locked Moved Scripting
    2 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.
    • VirtualVirginV
      VirtualVirgin
      last edited by

      How do I count the instances of a particular value in an array?
      I don't see a particular method for that in the API.

      The MidiList has one:
      Screenshot 2024-11-07 at 1.17.47 PM.png

      Is there a similar function for the array?

      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'd need to loop through the array and keep count in a variable

        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

        33

        Online

        1.8k

        Users

        12.0k

        Topics

        104.7k

        Posts