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)