Home › Forums › General › Programming › Modulo Use?
- This topic has 8 replies, 3 voices, and was last updated 4 years, 9 months ago by Possemo.
-
AuthorPosts
-
July 7, 2019 at 11:44 pm #115431
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!
July 8, 2019 at 2:11 am #115432Hi 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.
July 8, 2019 at 10:13 am #115448You 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.
July 9, 2019 at 5:49 am #115450Hi,
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!
July 9, 2019 at 11:56 am #115451I 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.pdfAccording 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.
July 10, 2019 at 3:26 am #115456Possemo, 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.
July 10, 2019 at 11:43 am #115458What do you mean by “populate another uiCombo”? Do you want to select patches within the bank?
July 10, 2019 at 1:21 pm #115466Hi 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.)
July 11, 2019 at 10:49 am #115474Hmm 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.
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.