Pro Tools Markers From Resolve CSV Markers
Just a little sketch of this; it’s very easy to whip something like this up in a few minutes with py-ptsl.
import csv
import sys, re
import ptsl
from ptsl import PTSL_pb2 as pt
def create_marker(client: ptsl.Client, time: str, notes: str):
print("Time: {}\n\t{}".format(time, notes))
result = client.run_command(pt.CId_CreateMemoryLocation, {
'name': notes[0:32],
'start_time': time,
'end_time': time,
'time_properties': 'TProperties_Marker',
'reference': 'MLReference_Absolute',
'comments': notes,
'color_index': 7,
'location': 'MarkerLocation_NamedRuler',
'track_name': 'Robert Notes'
})
print(result)
def main():
client = ptsl.Client(company_name="Squad 51",
application_name='csv_import')
for p in sys.argv[1:]:
with open(p, "r") as f:
table = csv.DictReader(f)
for row in table:
time = row['Record In']
notes = row['Notes'].strip()
if md := re.match(r'^Marker \d+ - (.*)$', notes):
notes = md.group(1)
create_marker(client, time, notes)
client.close()
if __name__ == "__main__":
main()