Control a device parameter by device name

This clip is taken from a longer Control Surface Studio walkthrough video
🎥 Watch the full CSS walkthrough video

This guide shows how to dynamically control a parameter of a device by the device name (on the currently selected track) — even if that device appears in different positions in the device chain on each track

To achieve this we will use a combination of tools in Control Surface Studio: reactions, modifiers, and device parameter mappings.

Specific Goal

We want to control the first parameter of an Auto Filter device on the selected track, regardless of where the device appears in the chain.

Overview of the Approach

  1. Reaction: Each time the selected track changes, it finds the device by its name and saves its position to a modifier.
  2. Modifier: Stores the device position number.
  3. Device Parameter Mapping: Uses the modifier instead of a fixed device number.

Step 1: Add the Device Parameter Mapping

  1. Create a new Device Parameter mapping.
  2. Assign it to a controller input (for this example we will use knob 25).
  3. Set the Track to Selected.
  4. Temporarily set Device Number to 1 and Parameter Number to 1 (this will be changed to use a modifier shortly).
  5. Click Save.
  6. Save and generate the script into Ableton Live.
  7. Reload the MIDI Remote Script to test that the mapping works for the first device in the chain. Note: it’s not dynamically selecting the device number yet!

Step 2: Make the Device Number Dynamic

  1. Edit the device parameter mapping again.
  2. Change the Device Number from a static number to Modifier M1.
  3. Save the mapping.

This makes the device parameter dynamically use the current value stored in the modifier.


Step 3: Add a Reaction to Locate the Device

  1. Add a new Reaction.
  2. Name it something like: Find and set Auto Filter position.

Set Listeners

In the Listeners section, add the following events:

  • Script is initialized
  • Song's selected track value has changed
  • Track's devices value has changed
  • Track's selected device value has changed

For each listener, set the Path menu to Selected Track.

These listeners ensure the reaction updates when you change tracks or rearrange devices.

Create Action Block: Save Device Position to Modifier

  1. Add an Action Block.
  2. Inside the block:
  • Add a Loop
    • Select Devices
    • In the path menu choose: Selected Track.
  • The condition section will be setup so that it checks the contents of each device in the list of devices.
    • Select Device Name
      • For it’s path menu choose the following
        • Track: selected track
        • Device number: script > loop > Loop Iteration Number
    • Comparison: Text exactly matches
    • Auto Filter (you can change this to any device name!)
  1. The Action section will only run if the condition is met (if device name is ‘Auto Filter’):
  • Add action: script > Set the value of a modifier
    • Modifier: M1
    • Value: Loop Iteration Number

Then add 2 further actions to the same Action section.

  • Add action: script > Reload LED Listeners
  • Add action: script > Exit Reaction
  1. Name this action block:
    Device name found – save position to M1

Create Fallback Action Block (Device Not Found)

  1. Add a second action block (after the first).
  2. This block will only run if no match was found (due to the Exit Reaction in the first block).
  3. Add action: Reload LED Listeners
  4. Name it:
    Actions when matching device is not found
  5. Save the reaction.

This ensures that LEDS will update correctly even when the device is not found.


Step 4: Test the Mapping in Ableton Live

  1. Save the script and generate it into Ableton.
  2. Reload the MIDI Remote Script.
  3. On any selected track:
  • Move the Auto Filter to different positions.
  • The assigned encoder should still control its first parameter.
  • Switch tracks — the control should update dynamically and still control the instance of Auto filter on that track.

Summary

ComponentPurpose
Device Parameter MappingControls the target parameter using a modifier.
Modifier M1Stores the dynamic device position.
ReactionLocates the device by name and updates M1.