Snap knob to select input channels

Thank you guys. I already have a clearer idea with these examples. @gc3 I can definitely say that this was the really missing part, maybe among the thousand attempts I had used .getValue () well, but it didn’t work because all the next part was missing!

2 Likes

Fantastic! Please feel free to loop back later, even if it’s working fine but you want to tighten up the code. If @k-chaffin and I aren’t around at the moment you’re working on it, I’m sure plenty of others will be :slight_smile:

By the way, friendly suggestion–you might want to change the title of the thread to something like “How to use snap knobs to select input channels” or something like that. Easier for others who might be working on a similar issue to find it that way.

2 Likes

I have yet to test it well but it seems to work divinely! Thanks again.

Perhaps as a next step (but this is more of a generic topic) I would like to summarize the code. Especially if it can positively affect CPU consumption (crucial for me, empty Rack requires 3-4%) I have seen in several modules that even though they have multiple knobs or multiple inputs / outputs, they only show one parameter in the code. Example:

ENUMS (CHANNEL_PARAM, 2)

ENUMS (SIGNAL_INPUT, 4)

ENUMS (SIGNAL_ OUTPUT, 4)

If using 50 lines instead of 100 can save 0.2% CPU, that’s definitely something I want to learn.

1 Like

The change you just gave as an example probably won’t save you any CPU when rack is running. It just saves the tedium of typing out lots of names.

1 Like