Do everything in code? | Intech Studio
💬 general Grid

Do everything in code?

goatbamf
goatbamf · · 3 replies

I'm pretty new to grid, have only been using for a week or so, but I'm a software engineer and have a lot of experience working with controllers and MIDI, so this is basically the perfect product for me. I really do love it, but admittedly find the APIs a little limiting as far as communicating between modules / managing state. I have some pretty complex grid needs and honestly I find myself fighting against the Editor in most cases. Let's start with a simple one, and then I'll continue with the more complex things I have and what I want to accomplish:

For an encoder, I want to send 127 on push, but on release send whatever the encoder was at (this includes the value + LED). At this point I have to delete the Button Mode action, because that makes it send 0 on release, so that's useless. So now I have to manage the sending of MIDI and updating of the LED myself and to do that I need to read the value of the encoder, which is fine, but in order to send the correct MIDI I need to define self variables channel and command. But I've also already defined channel and command within the MIDI action on the encoder! This is redundant and it means I have to define these things twice, manually, per element - that 4 x 16 = 64 manual data entries on my part just do something pretty basic. Or I could just manage the encoder sending MIDI myself, which means for each element I'd only need a single Self action to define the channel and command (I think I may go this route).

(bear with I have to break this into multiple posts)

Replies (3)

goatbamf goatbamf ·

(cont)

I also have to manually set the LED on/off myself because I have custom color code because the existing color configurations don't work for me. That's kind of besides the point, I'll make another post / feature request about that (basically I need LEDs to range from completely off to bright, not dimly lit to bright, it's way better/readable my way). This required I do setup code for all encoders that set the min/mid/max, really great that I could that, but it doesn't play well with using color on the Button, so I have to handle that manually.

And to put more into perspective, I have my EN16 connected to a VSN1 controller. I have it working so when pressing Button 1 on the VSN, then any encoder I turn or press will automatically be reset to 0. For Button 2 it sets it to 64, for Button 3 it sets it to 128 - I call these Quick Sets. This is pretty fun as it allows me to quickly turn things off/on without having to do a full manual turn. I also have Buttons 5-8 working as an exclusive radio button group that controls what CC the endless encoder sends on. Button 4 will randomize all encoders. Another cool thing is that I'm displaying the value of all 16 encoders and all 4 "virtual" endless encoder CCs.

Now I want to use the screen buttons to enter a second mode on the VSN1 that is basically identical to the Quick Sets above only instead of holding a button to set a single encoder, pressing the button will just reset all encoders to 0, 64, or 128, depending on the button I press.

I also want a 3rd page where I can store/recall presets. This is where things are going to get really tricky, because I'll have to do a bunch of data management.

goatbamf goatbamf ·

So sorry for the long post, but the main gripe I have with all of this, is that I'm writing a lot of code and it all lives in so many places. The Setup page, The VSN1 screen, the VSN1 buttons, globals, the EN16 encoders and buttons. It's a lot of View Code and then Pressing Dismiss and I can never read more than one thing at a time, and it's about to get a lot worse to manage pages myself (since I have to basically abandon the built in page functionality) if I have to do everything across all of these different elements.

Even for the basic use case of sending the encoder value on button release, I have to basically write the script, and then copy it to all 16 encoders manually.

This is all super tedious and honestly since I kind of have to manage everything myself including updating the LED values AND sending the MIDI. Would love to have some sort of global script to do all of this in and not have to worry about the element actions at all, except maybe to define unique self variables that the global script could access on the element, like channel/command?

Basically I want to just write a single script where I can define the state up top and just have event handlers to deal with everything that is now spread out across all the element actions. Seems like the actions right now as is are just event handlers anyway.

nikodemus nikodemus ·

commenting to say "me too", hoping someone from intech will answer 🙂

i don't quite have the time to dive into grid editor's own sources myself right now, but a pointer along the lines of "here's where you would implement import/export script functionality, you probably need to pay special attention to XXX and YYY" kinda pointer might make it feasible for me...

Discord

View on Discord

This post is from the Intech Studio Discord community.

Open thread →