No internet connection
  1. Home
  2. How to

How to control faders or other plugin parameters via simulated mouse scroll events

Asked by Mike Caffrey on FB

Solved in post #2, click to view
  • 1 replies
  1. As a quick example, this script will simulate a scroll event on the "Input" knob in the first open EQ3 insert window:

    
    var win = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: EQ").first;
    if (!win.exists) throw 'Could not find window';
    var winPos = win.position;
    var pos = { x: winPos.x + 110, y: winPos.y + 150 };
    
    var oldPos = sf.mouse.setPosition({
        position: pos,
    
    }).oldPosition;
    sf.mouse.scroll({
        delta: 1,
        unit: 'Line',
    });
    sf.mouse.setPosition({ position: oldPos });
    

    You can assign a MIDI trigger directly to a script like this, or combine the script with MIDI filtering to be even more advanced.

    ReplySolution