Forum

    • Register
    • Login
    • Search
    • Categories

    case range for switch statements?

    Scripting Forum
    3
    6
    106
    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.
    • iamlamprey
      iamlamprey last edited by

      I've noticed it doesn't work in HISE:

      case 60 ... 95:
      

      Do we have an alternative?

      New Song 🥰 - Instruments

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

        Have to use if else in this situation

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

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

          @d-healey Yeh just tried it, works. Is that fine for performance in an onNote() call?

          New Song 🥰 - Instruments

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

            @iamlamprey Yeah. And if it's a deferred script then even better 🙂

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

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

              @d-healey Sweet 🙂 cheers!

              New Song 🥰 - Instruments

              ustk 1 Reply Last reply Reply Quote 0
              • ustk
                ustk @iamlamprey last edited by

                @iamlamprey you should be able do use a switch this way:

                case (x >= 5 && x < 9):
                

                I can't help pressing F5 in the forum...

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

                12
                Online

                1.1k
                Users

                7.0k
                Topics

                64.7k
                Posts