Get Value From Ranges

What is ‘Get Value From Ranges’

With Reactions, you can use your MIDI controller to set pretty much any parameter in Ableton Live to a value of your choice.

For example, if you want to set the Clip Trigger Quantization menu option with a MIDI button, you can use the action Set Clip Trigger Quantization and input the value you want.

But if you want to scroll through options using a knob, you’ll need a dynamic way to change that value. This is where Get Value From Ranges comes in.

How it works

Get Value From Ranges works by linking an input range (e.g., a range of MIDI values sent from a knob/fader usually 0 – 127) to an output range (e.g., menu options or parameter values in Ableton Live).

For example:

  • Input: MIDI encoder sends values from 0–127.
  • Output: Quantization menu has 14 options (0–13).

The 128 input values are divided into 14 steps so that each output value is mapped to a subset of input values. When the encoder sends a value, CSS calculates the corresponding output step and uses that value.

‘Clip Trigger Quantization Menu’ Walkthrough

To set up an encoder to scroll through the Clip Trigger Quantization options:

  1. Create a new Reaction.
  2. Set the Listener Event to an encoder (e.g., Encoder 1).
  3. In the Action section, select Set Clip Trigger Quantization from the Live Object Model → Song category.
  4. Enable Get Value From Ranges.
  5. Set:
  • Input Range: 0–127 (MIDI velocity values from the encoder).
  • Output Range: 0–13 (menu options).
  • Steps: 14
  1. Set the Current Input Value to dynamically update from the encoder’s current velocity value.

When installed and run in Ableton, turning the encoder scrolls through the available menu options.

LED Feedback with ‘Get Value From Ranges’

You can also use Get Value From Ranges to display LED feedback based on the current menu selection:

  1. Create another Reaction.
  2. Set the Listener Event to Clip Trigger Quantization has changed.
  3. In the Action block, choose Send MIDI Velocity Value to Input.
  4. Target the correct encoder (e.g., Encoder 4).
  5. Enable Get Value From Ranges:
  • Input Range: 0–13 (Clip Trigger Quantization).
  • Output Range: 0–127 (MIDI LED range).
  • Steps: 14

This way, the encoder’s LED ring reflects the currently selected quantization setting.

Track Volume with ‘Get Value From Ranges’

To control track volume (which uses decimal values from 0 to 1):

  1. Add a new Reaction.
  2. Set the Listener Event to Encoder 2.
  3. Choose the action Set Volume Value from the Track category.
  4. Enable Get Value From Ranges.
  5. Set:
  • Input: Encoder 2 (0–127, 0 decimal places).
  • Output: Track Volume (0–1, 2 decimal places).
  • Use Track Volume Minimum and Maximum fields for precision.
  1. Adjust steps for control resolution (e.g., 127 steps = smooth; 10 = jerky).
  2. Optional: Limit volume range (e.g., max = 0.85 for 0 dB cap).

Logging Data

To debug or understand your input/output mappings:

  1. Enable Log Data in the Get Value From Ranges settings.
  2. Run the script and interact with your encoder.
  3. Open the log to view the step table:
  • Each column = a step.
  • “In” = input values mapped to that step.
  • “Out” = resulting value sent to Ableton.
  • Green column = the step used.
  • Current input value is shown in brackets.

This helps identify how values are translated and whether things behave as expected.

Rounding Up & Down

CSS rounds input values to the nearest output step:

  • By default, it rounds up (arrow pointing right in the log).
  • Enable Round Down to reverse this (arrow points left).
  • This can change which step is selected when a value lies between two steps.

Reverse The Output Range

Enable Reverse Output Range to flip the direction:

  • Example: Turning encoder right decreases volume instead of increasing.
  • The output values are reversed (e.g., 0.85 → 0).
  • The log shows rev next to the output range title to indicate this.

A Word Of Warning!

The Log Data feature can generate a large amount of data quickly. Since Control Surface Studio reads from Ableton’s log.txt file, a large log can negatively affect performance.

Always clear the log regularly when logging is enabled.

Remember To Do This!!

When you’re done debugging:

  • Turn Log Data off.
  • Reinstall the updated script into Ableton.
  • Click Clear Log to keep your session running smoothly.