Python: move a fader in protools using Avid pro tools SDK

import pro_tools_sdk

# Connect to Pro Tools
session = pro_tools_sdk.Session()

# Get a reference to the fader you want to control
fader = session.get_fader("Fader 1")

# Set the fader's level to -12 dB
fader.set_level(-12)

# Close the Pro Tools session
session.close()

  • Pan: You can use the set_pan() method to control the pan position of a channel.
    Mute: You can use the set_mute() method to mute or unmute a channel.
    Solo: You can use the set_solo() method to solo or unsolo a channel.
    Input or output routing: You can use the set_input_routing() and set_output_routing() methods to control the input and output routing of a channel.
    Inserts: You can use the get_inserts() method to get a list of inserts on a channel, and then use the enable() and set_parameter() methods to control the settings of each insert.
    Automation: You can use the get_automation_parameters() method to get a list of automation parameters on a channel, and then use the enable() and set_value() methods to control the settings of each automation parameter.

  • CSV with a time and label to the reaper time line markers

    python script that sends a CSV with a time (in seconds) and labels to the reaper API and converts them into timeline markers

    import csv
    from reaper_python import *

    # Open the CSV file
    with open('markers.csv', 'r') as csvfile:
    # Read the CSV file
    reader = csv.reader(csvfile)
    next(reader) # skip the header
    # Iterate through the rows
    for row in reader:
    time = float(row[0])
    label = row[1]
    # Convert the time to a Reaper time format
    reaper_time = int(time * 1000)
    # Create a new marker at the specified time
    RPR_AddProjectMarker2(0, False, reaper_time, 0, label, -1, 0)

    Hardinge Indexing Head – Plates 20 21 23

     

    Ratio 4
    Plate I HAVE Plate I HAVE Plate I HAVE
    Divisions Ratio Degrees FALSE 20 21 23
    4 1 90.00000000 FALSE 20 21 23
    5 0.8 72.00000000 FALSE 16
    6 0.6666666667 60.00000000 FALSE 14
    7 0.5714285714 51.42857143 FALSE 12
    8 0.5 45.00000000 FALSE 10
    10 0.4 36.00000000 FALSE 8
    12 0.3333333333 30.00000000 FALSE 7
    14 0.2857142857 25.71428571 FALSE 6
    16 0.25 22.50000000 FALSE 5
    20 0.2 18.00000000 FALSE 4
    21 0.1904761905 17.14285714 FALSE 4
    23 0.1739130435 15.65217391 FALSE 4
    28 0.1428571429 12.85714286 FALSE 3
    40 0.1 9.00000000 FALSE 2
    42 0.09523809524 8.57142857 FALSE 2
    46 0.08695652174 7.82608696 FALSE 2
    80 0.05 4.50000000 FALSE 1
    84 0.04761904762 4.28571429 FALSE 1
    92 0.04347826087 3.91304348 FALSE 1

     

    Gear Ratio I can make