I'm trying to setup buttons and knobs to the same variable, the program I'm using doesn't support relative input. Am I able to use the built in software to combine outputs into a single value managed internally so the program only receives the correct absolute value?
Accounting for relative and absolute inputs
Replies (50)
hello, why do you need the midi translator?
The program I'm using doesn't support relative and absolute inputs
hmm then what is it supports?
relative input only.
Hmmm in your post you say it doesn't support relative, only absolute. Then you say it doesn't support either. And now you say relative only...
Both relative and absolute are supported. Supported relative modes are bin offset and complement of 2.
https://docs.intech.studio/wiki/actions/element-settings/encoder-mode/
correction. the software im using intech to control doesn't support relative input, only absolute
Great, absolute is the default (0-127)
yes but I want to use the knobs in relative not absolute.
if i hit 70 on a button then spin the knob I want it to go plus or minus from there, not its own respective last postion
I dont ideally, I'd rather keep everything in InTech vs another program
You just need a code block to update the respective encoder value when you hit the button, keep sending absolute from the encoder
so I have 4 buttons set to absolute values currently.
kind of a 5% 25% 50% and 100% ( out of 127)
Ok, so you're using 2 modules, right? Maybe EN16 + BU16?
TEK2
Ok, even easier, no remote messages involved. On the button's push event add a code block similar to this:element[i]:encoder_value(70)
If you want to revert back to the original encoder value, you can cache it in a self or global var and restore it with another push or whatever suits your flow
Sorry but I dont understand this
Do you need to restore the original value (before pushing the button) at all?
no, for example the keys are like bookmarks to jump to specific points while scrolling the wheel is just scrolling from the last 1-127 value ( + / - ) last pressed or scrolled to value
if the program im using with these supported absolute and varible input everythin would be perfect, im trying to replicate that before it hits the program
Got it, then you only need the snippet above
Var i is the element number for the knob, I don't know it (I don't have that module)
I'm working from my phone, if you still need help I can send you the whole code later tonight
Thanks, I will give it a shot I appreicate the help!
Sorry for my limited understanding but I am not sure where this should go.
no worries, I created a profile for you: grid-editor://?config-link=NCAqLRcUOuT7CtFr5nYa
I'm not sure if it will work because I don't own a TEK2 to test it, but even if it had some bug it helps explain what you need and where
here's the breakdown of what it does
using System makes the function global and available by the time the buttons try to use it
8 and 9 are the element numbers of each endless knob
on each button of the first row we call the function with different values (5, 25, 50, 100) when the button is pressed
it prevents the function from being called twice (on press and on release)
double triggering doesn't matter in this example, you could keep it simple by only using a code block without the press-release block, it's just for "learning" purposes
@user hope it works and it sort of makes sense now
@user I'm sure you're explaining it well and I am trying to understand with my very limited coding understanding. If I get you correctly the code on the button should be _update_endless(8, 50)
the 8 referencing the left knob and 50 referencing 50%. I am not seeing an update from the midi monitor to reflect that this is working. I do have the encoder mapped to a midi channel as well
if this is too much to get in the weeds over no worries, I can still try and fiure it out from here
Yes, that would be the code if you only want to update one of the encoders instead of both of them
I'll try using my EN16 to debug it
turns out you cannot set an endless pot on an EN16, it errors out, I cannot test it without a TEK2 or a VSN1
wait, are you saying you don't see anything in the midi monitor when you turn the knob? that is unrelated to the code, the encoders should still work properly
if the encoders don't work, can you take a look at debug monitor for errors and share them?
if those work, maybe you're saying you don't see anything in the midi monitor when you press the buttons? if so, the buttons don's send midi, they're bookmarks like you said, press a button and then turn the encoder - e.g., value before pressing button 0 = 123, after pressing button = 5, you still need to turn the knob to send midi
Midi updates only when I turn the knob but not when the button is pressed. Is there a way to confirm the button is updating the % of the knob?
Turn the encoder down to zero, then press the button for 100% and start turning down the knob again. In the MIDI monitor you should see it coming down from 127 (not 0 anymore)
UPDATE
so _update_endless(8, 50) or _update_endless(8, 5) puts the midi at 11
update_endless(50) puts it at 64
View on Discord
This post is from the Intech Studio Discord community.

