Help converting rotary encoder input to dial input


#1

I want to use a rotary encoder, rather than a dial/pot, to control an inlet that expects a positive fractional input ("pos" inlet on "table/play" object).

My plan to do so was to use one of Gavin's rotary encoder objects to output an integer 1-100, divide that by integer 100 to get a fractional number 0.01-1.00, then scale that number to give table/play the input that it wants. But I can't find any combination of objects to complete that final step. What am I doing wrong?

Here's a screenshot where I've tried to scale using math/*c. When I set my constant value to 64.00, the output is equal to the input, so clearly 64.00 = unity in this case. This doesn't work to control table/pitch, though when I connect a simple positive dial control, it works fine.


#2

i never worked with the encoder object yet, but a simple general tip for debuggging is connecting a bunch of "disp" (or in your cae "patch/outlet") objects between your conversion objects to see where it goes wrong.


#3

All of the objects using integers output as expected, it's just the fractional numbers that I don't quite understand. Can't seem to find a way to convert the fractional value I have to one that the object wants to see.


#4

Update: I fixed it with a workaround found in another thread.


#5

Nice one, which thread? I am a electronics/coding/patching newborn child and will also be attempting to futz around with encoders shortly


#6

This thread. This still isn't an ideal solution, as converting an integer input to a fractional is a needless extra step when the table start position could most appropriately be input as an integer. I may attempt to make a modified version of the object instead.