Potentiometer Event
- About Potmeter Event
- Reference Manual Entry
The Potmeter Event is a UI Event that's triggered when a potentiometer is turned or a slide potentiometer is moved. Each potentiometer on the module has one of these Events, and by default they control values which determine the LED light intensities and values used for MIDI messages.
Potentiometers send continuous, linear, analog signal to Grid as they are turned. These then get translated into values and stored in memory. This way Grid always associates the so-called 'state' of a potentiometer (how much is it turned) with a discrete value.
You can set how this value is defined by using a Potentiometer Mode Action Block, you can learn more about these here, but generally Mode-type Action Blocks change how user interaction turns into values in Grid.
Potmeter Rotation
potmeter_number
- shortname: pnu
- How:
self:potmeter_number()
orself:potmeter_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
0
to15
OR in the case of the PBF4 from0
to11
. When this function is given a parameter, it will set the # number of the control element to thenumber
given. - Example:
potmeter_value
- shortname: pva
- How:
self:potmeter_value()
orself:potmeter_value(value)
- value: integer, ranging 0...127
- What: This function returns the value of the potentiometer state. By default, this value is
0
when the potentiometer is set in the minimum position, and tops out at127
. When this function is given a parameter, it will set the value associated with the potentiometer state according to the parameter given and will output thatvalue
on each trigger. - Example:
potmeter_min
- shortname: pmi
- How:
self:potmeter_min()
orself:potmeter_min(value)
- value: integer, ranging 0...127
- What: This function returns the minimum value configured to the potentiometer minimum state. This is
0
by default. When given a parameter, this function changes the minimum value of the potentiometer state according to thevalue
given as parameter. - Example: The code
self:potmeter_min(30)
will set the potentiometer value minimum to30
.
potmeter_max
- shortname: pma
- How:
self:potmeter_max()
orself:potmeter_max(value)
- value: integer, ranging 0...127
- What: This function returns the maximum value configured to the potentiometer maximum state. This is
127
by default. When given a parameter, this function changes the maximum value of the potentiometer state according to thevalue
given as parameter. - Example: The code
self:potmeter_max(100)
will set the potentiometer value maximum to100
.
potmeter_resolution
- shortname: pmo
- How:
self:potmeter_resolution()
orself:potmeter_resolution(bitdepth)
- bitdepth: integer, ranging 4...12
- What: This function returns the value of the potentiometer mode. This is
7
by default. This means that the number of steps between maximum and minimum values will be2 to the power of 7
or128
. When given a parameter, this function sets the 'steps' between the minimum and maximum value according to thebitdepth
given. For example setting it to2
makes the potentiometer have2 to the power of 4
or16
steps. - Example: The code
self:potmeter_resolution(11)
will make the potentiometer have2048
steps. But be careful, if you don't increase the minimum and maximum potentiometer values, this "resolution" increase won't really show in usage. Increasing potmeter resolution could be useful for using 14-bit MIDI usage.
potmeter_elapsed_time
- shortname: pel
- How:
self:potmeter_elapsed_time()
- What: This function returns the time elapsed since the last trigger in frames.
- Example:
potmeter_state
- shortname: pst
- How:
self:potmeter_state()
- What: This function will return the "state" of the control element.
- Example: