Need help setting up configuration | Intech Studio
💬 general Grid

Need help setting up configuration

Hyperstation Jr.
Hyperstation Jr. · · 3 replies

I’ve been having a lot of trouble setting up my EN16s into what I think is a pretty simple setup, I just can’t seem to get it there and programming is not exactly my thing.

What I want are 32 encoders sending out CC messages across different CC numbers, with the same setup across all four presets. I can even modify the color I want, and this works fine.

The trouble I run into is that I then want the button portion of the encoders; I can get them all to Toggle, and switch them from notes to CCs, but I want to continue the CC numbers from the last encoder, so encoders are 16 through 47, Element 0 Button should then be sending out CCs on control 48.

I can’t seem to figure out a way to do this without just manually entering them all in. What am I missing?

Replies (3)

Hybrid Hybrid ·

Hi! I'm not sure I totally understood your explanation but it sounds like you're looking for CC values that are relative to the element number. You can get this by referencing self:element_index(). When setting your CC numbers, do it like this: self:element_index() + 48 (assuming you want the offset to be 48, so element 0 becomes 48, element 1 becomes 49, etc. Does that make sense?

You can also add a "local variables" block to your button in the Grid Editor and one of the default variables is num, which is set to self:element_index(). If you have the local variable, then your CC number can be set with num + 48 instead.

The docs have a few more details here:
https://docs.intech.studio/reference-manual/grid-functions/element/
https://docs.intech.studio/reference-manual/grid-functions/module-position/

Hope that helps!

Hyperstation Jr. Hyperstation Jr. ·

That’s helpful, thank you.

I figured an offset is what I needed, but I was trying to enter it in the Midi module under the Param 1 field, and though if I did something like “-1 + 48”, auto + a value, but clearly that didn’t work. Can I use “self:element_index()+48” in the Param field of the Midi block, or does that need to be done in the code view?

Hybrid Hybrid ·

I think the -1 is a special value that gets handled as "automatic" internally but if you do -1 + 48, it will literally get evaluated to 47 🙂

Yes, you should be able to use self:element_index() + 48 as the param field value in the MIDI block.

Another option is to have a local variable named something like cc and then you can set its value to self:element_index() + 48. In the MIDI block, you'd then put the param field value as cc (or whatever you named it). There's no right or wrong way to do it but sometimes it's a bit cleaner and saves some characters when you use vars. If you need to use it multiple times, a var is a good idea.

Discord

View on Discord

This post is from the Intech Studio Discord community.

Open thread →