Endless Event
- About Endless Event
- Reference Manual Entry
The Endless Potentiometer Event is a UI event that triggers upon user interaction, specifically when the user turns the endless potentiometer. Unlike a detent encoder, an endless potentiometer is smooth in its rotation and does not have distinct clicks or associated values. Each movement of the endless potentiometer triggers an Endless Potentiometer Event.
Endless potentiometers are versatile and can be used in various ways. Due to their infinite nature, they can function in a relative manner, adding to or subtracting from a value. Additionally, they can perform the same role as traditional potentiometers, providing smooth and continuous adjustments.
Endless Button
button_number
- shortname: bnu
- How:
self:button_number()orself:button_number(number)- number: signed integer
- What: This function when given no parameter, returns the # number of the control element. These numbers are from the top left, read left to right, top to bottom
0to15OR in the case of the TEK2 from0to7. When this function is given a parameter, it will set the # number of the control element to thenumbergiven. - Example:
button_value
- shortname: bva
- How:
self:button_value()orself:button_value(value)- value: integer, ranging 0...127
- What: This function returns the value associated to the button. By default, this value is
127when the button is pressed down and0when released. When this function is given a parameter, it will set the value associated with the button state according to the parameter given. When using other types of button modes, described later in this chapter, the button values are evenly spread across the steps: eg. spilt 3 was would be values063127split 4-way would be04795and127. - Example: Inputting the code
self:button_value(127)will make all button press and button release event return the value127.
button_min
- shortname: bmi
- How:
self:button_min()orself:button_min(value)- value: integer, ranging 0...127
- What: This function returns the minimum value of the "released" button state. This is
0by default. When given a parameter, this function changes the minimum value of the button state according to thevaluegiven as parameter. - Example: The code
self:button_min(20)will set the value of the button to20when released.
button_max
- shortname: bma
- How:
self:button_max()orself:button_max(value)- value: integer, ranging 0...127
- What: This function returns the maximum value of the "pressed down" button state. This is
127by default. When given a parameter, this function changes the maximum value of the button state according to thevaluegiven as parameter. - Example: The code
self:button_max(110)will set the value of the button to110when pressed down. This can be useful to set easy to use values for a switch, likeself:button_max(1)will make it so that there are only two values this button can send out0and1.
button_mode
- shortname: bmo
- How:
self:button_mode()orself:button_mode(mode)- mode: integer, ranging 0...127
- What: This function returns the value of the button mode. This is
0by default. Button mode means how many 'steps' the button has between its maximum and minimum value. For example when the function is used to set this value like this:self:button_mode(mode)the resolution parameter will govern the number of steps. - Example: The code
self:button_mode(2)will make the button a 3-step switch. The three states will be0,63and127.
button_elapsed_time
- shortname: bel
- How:
self:button_elapsed_time() - What: This function returns the time elapsed since the last trigger in frames.
- Example:
button_state
- shortname: bst
- How:
self:button_state() - What: This function will return the "state" of the control element. In case of a button this is either "pressed down"
127OR "released"0. These values independent from value variable of the control element. This means that the button_state() function will always return the values associated with the "pressed" or "released" states, independently from any kind of alterations to the button value functions, such as changing the max or min values. - Example:
Endless Rotation
endless_number
- shortname:
- How:
self:endless_number()orself:endless_number(number)- number: signed integer
- What: This function, when given no parameter, returns the # number of the control element. These numbers are from the top left, read left to right
8to9. When this function is given a parameter, it will set the # number of the control element to thenumbergiven. - Example:
endless_value
- shortname:
- How:
self:endless_value()orself:endless_value(value)- value: integer, ranging 0...16383
- What: This function returns the value of the endless state. By default, this value is
0when the endless is turned and tops out at16383. When this function is given a parameter, it will set the value associated with the endless state according to the parameter given and will output thatvalueon each trigger. - Example:
endless_min
- shortname:
- How:
self:endless_min()orself:endless_min(value)- value: integer, ranging 0...127
- What: This function returns the minimum value configured to the endless minimum state. This is
0by default. When given a parameter, this function changes the minimum value of the endless state according to thevaluegiven as parameter. - Example: The code
self:endless_min(20)will set the starting value of the endless potentiometer to20when rotated.
endless_max
- shortname:
- How:
self:endless_max()orself:endless_max(value)- value: integer, ranging 0...16383
- What: This function returns the maximum value configured to the endless maximum state. This is
16383by default. When given a parameter, this function changes the maximum value of the endless state according to thevaluegiven as parameter. - Example: The code
self:endless_max(110)will set the end value of the endless potentiometer to110when turned.
endless_mode
- shortname:
- How:
self:endless_mode()orself:endless_mode(mode)- resolution: integer, ranging 0...2
- What: This function returns the value of the endless mode. This is
0or "absolute mode" by default.
When function is given1as a value, it will change the endless potentiometer to "relative mode binary offset". In this mode turning the endless 'backwards' or counterclockwise will always result in the value8146and turning it 'forwards' or clockwise will always result in the value8247.
When the function is given2as a value and self:endless_max(127), it will change the endless potentiometer to "relative mode 2's comp". In this mode turning the endless potentiometer 'backwards' or counterclockwise will always result in the value127and turning it 'forwards' or clockwise will always result in the value1. - Example: The code
self:endless_mode(1)will change the endless potentiometer into relative mode.
When using either relative mode, setting the endless potentiometer to a 7bit by setting its maximum value with self:endless_max(127) is recommended.
endless_sensitivity
- How:
self:endless_sensitivity()orself:endless_sensitivity(sensitivity) - What: Returns the value of the endless sensitivity, which is 100 by default. When given a value for the sensitivity parameter, it changes the sensitivity of the endless potentiometer. It adjusts how much rotation is needed to send out a value; a lower number means more rotation is required to send the value.
- Example: Set the sensitivity to a new value
self:endless_sensitivity(1)> Max amount of rotation to send out the value
endless_elapsed_time
- shortname:
- How:
self:endless_elapsed_time() - What: This function returns the time elapsed since the last trigger in frames.
- Example:
endless_state
- shortname: est
- How:
self:endless_state() - What: This function will return the "state" of the control element.
- Example: