Modulo Use?

Home Forums General Programming Modulo Use?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #115431
    lawn
    Participant
      • Topics: 1
      • Replies: 3
      • Total: 4

      It seems like the modulo operator should be easy to use, but I can’t get the syntax right. I enter:

      modulatorValue % 128

      But Crtlr says the syntax isn’t right. What am I doing wrong?

      Thanks!

      #115432
      dnaldoog
      Participant
        • Topics: 4
        • Replies: 480
        • Total: 484
        • ★★

        Hi lawn,

        You would need:

        if modulatorValue % 128 == 0 then ... end

        P.S. Oh, sorry I didn’t understand you meant the “Evaluate Expression …” Box. Not so familiar with it I’m afraid.

        #115448
        Possemo
        Participant
          • Topics: 14
          • Replies: 638
          • Total: 652
          • ★★★

          You are probably trying inserting it in the expression field (“Expression to evaluate when… etc.”). This does not work. Not all math expressions are working in exp. field. You would need a small Lua script which does what you want. This should be an easy job if you know the syntax. If you tell us what you are trying to achieve we may be able to help you.

          #115450
          lawn
          Participant
            • Topics: 1
            • Replies: 3
            • Total: 4

            Hi,

            Thank you both for your help! I built a simple librarian for my Eventide DSP4000 back when I was using Live and Max. I have since moved to Bitwig and would like to have the same convenience. I built a crude version with CTRLR thanks to the Orville patch available on the site, but I can’t get the bank selector to work correctly. I can correctly select any of the first 16 banks, but when I try the 17th, it goes back to bank 0. I reviewed what I built with max and found a % 128. I suspect this is what I’m missing.

            As you guessed, I’m trying to apply it in the “evaluate expression when calculating the midi message…”

            Thanks!

            #115451
            Possemo
            Participant
              • Topics: 14
              • Replies: 638
              • Total: 652
              • ★★★

              I hoped to get a bit more technical explanation… well, so you want to change banks on a DSP4000, right?

              I found this small sysex docu which shows how to change banks:
              https://s3.amazonaws.com/com.eventide.downloads/Discontinued+products/MIDISysexDSP4000.pdf

              According to this document a bankchange would look like this in Ctrlr:

              F0 1C 70 00 03 00 00 ms ls F7

              the last two bytes before F7 are nibbles. It is not explained which one is first, maybe you have to interchange ms and ls, so maybe ls before ms.

              Use this on a slider with max 99 value and min 0. Of course you have to set SysEx as message type.

              • This reply was modified 4 years, 9 months ago by Possemo.
              #115456
              lawn
              Participant
                • Topics: 1
                • Replies: 3
                • Total: 4

                Possemo, you are a genius!!!! Setting the Sysex formula exactly as you suggested in your post worked!

                F0 1C 70 00 03 00 00 ms ls F7

                Instead of a slider, I used uiCombo set to sysex. Now I just need to figure out how to populate another uiCombo list based on the bank selected.

                #115458
                Possemo
                Participant
                  • Topics: 14
                  • Replies: 638
                  • Total: 652
                  • ★★★

                  What do you mean by “populate another uiCombo”? Do you want to select patches within the bank?

                  #115466
                  lawn
                  Participant
                    • Topics: 1
                    • Replies: 3
                    • Total: 4

                    Hi Possemo,

                    Yes, that’s exactly what I want to do. 🙂 ideally I would like to request patches from the DSP and update each bank list. (It takes quite a while for the DSP to dump the programs, so I don’t want to do it very often.) I created a button that requests a dump from the DSP using this:

                    SYSEXC_INTERNAL_WANT 0x12
                    Data: noneResponse: Upon receiving this message, the DSP4000 will send out aSYSEXC_INTERNAL_DUMP message for the current presets.

                    I have no idea how to parse the data though. If this turns out to be too difficult, I would settle to “hard code” the bank lists within the panel. (That’s what I did with Max.)

                    #115474
                    Possemo
                    Participant
                      • Topics: 14
                      • Replies: 638
                      • Total: 652
                      • ★★★

                      Hmm yea I think this will be quite difficult. “SYSEXC_INTERNAL_DUMP” probably means that it will send the entire memory of the DSP – so every parameter of all patches. The names must be somewhere coded in the dump but you will have to find the relevant bytes, extract them and put them into the combo-component.
                      This would be all feasible if there is a comprehensive sysex implementation chart from Eventide. Ultimatively you could decode the whole dump and display all parameters of the actual patch..

                      • This reply was modified 4 years, 9 months ago by Possemo.
                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The forum ‘Programming’ is closed to new topics and replies.
                    There is currently 0 users and 68 guests online
                    No users are currently active
                    Forum Statistics
                    Threads: 2,495, Posts: 17,374, Members: 77,605
                    Most users ever online was 12 on January 22, 2019 3:47 pm
                    Ctrlr