@s_bach Okay it's kind of working now, but is only outputting the last track in the list. I am using this script in a python tag:
import c4d
#Welcome to the world of Python
def main():
# find object in scene, store in obj
obj = doc.SearchObject('VO')
# store some variables
track = obj.GetCTracks()
obj[c4d.ID_USERDATA,4] = track[0].GetName()
track[0][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,6]
track[0][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,7]
track[0][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,14]
obj[c4d.ID_USERDATA,10] = track[1].GetName()
track[1][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,11]
track[1][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,12]
track[1][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,9]
obj[c4d.ID_USERDATA,15] = track[2].GetName()
track[2][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,16]
track[2][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,17]
track[2][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,18]
obj[c4d.ID_USERDATA,3] = track[3].GetName()
track[3][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,20]
track[3][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,21]
track[3][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,22]
obj[c4d.ID_USERDATA,24] = track[4].GetName()
track[4][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,25]
track[4][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,26]
track[4][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,27]
obj[c4d.ID_USERDATA,29] = track[5].GetName()
track[5][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,30]
track[5][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,31]
track[5][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,32]
obj[c4d.ID_USERDATA,34] = track[6].GetName()
track[6][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,35]
track[6][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,36]
track[6][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,37]
obj[c4d.ID_USERDATA,39] = track[7].GetName()
track[7][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,40]
track[7][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,41]
track[7][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,42]
obj[c4d.ID_USERDATA,44] = track[8].GetName()
track[8][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,45]
track[8][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,46]
track[8][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,47]
obj[c4d.ID_USERDATA,49] = track[9].GetName()
track[9][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,50]
track[9][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,51]
track[9][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,52]
obj[c4d.ID_USERDATA,54] = track[10].GetName()
track[10][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,55]
track[10][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,56]
track[10][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,57]
obj[c4d.ID_USERDATA,59] = track[11].GetName()
track[11][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,60]
track[11][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,61]
track[11][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,62]
obj[c4d.ID_USERDATA,64] = track[12].GetName()
track[12][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,65]
track[12][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,66]
track[12][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,67]
obj[c4d.ID_USERDATA,69] = track[13].GetName()
track[13][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,70]
track[13][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,71]
track[13][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,72]
obj[c4d.ID_USERDATA,74] = track[14].GetName()
track[14][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,75]
track[14][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,76]
track[14][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,77]
obj[c4d.ID_USERDATA,79] = track[15].GetName()
track[15][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,80]
track[15][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,81]
track[15][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,82]
obj[c4d.ID_USERDATA,84] = track[16].GetName()
track[16][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,85]
track[16][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,86]
track[16][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,87]
obj[c4d.ID_USERDATA,89] = track[17].GetName()
track[17][c4d.CID_SOUND_ONOFF] = obj[c4d.ID_USERDATA,90]
track[17][c4d.CID_SOUND_START] = obj[c4d.ID_USERDATA,91]
track[17][c4d.CID_SOUND_NAME] = obj[c4d.ID_USERDATA,92]
# outputs the current track name where playhead is
traks = obj.GetCTracks()
for trak in traks:
start = trak[c4d.CID_SOUND_START]
# get length
# length is stored as a string; need to convert it to int
length = trak[c4d.CID_SOUND_LENGTH]
length = length[:-2]
length = int(float(length))
fps = doc.GetFps()
end = start + c4d.BaseTime(length, fps)
# check if the current frame is within the range of the sound clip
curTime = doc.GetTime()
if curTime >= start and curTime < end:
obj[c4d.ID_USERDATA,19] = trak.GetName()
else:
obj[c4d.ID_USERDATA,19] = "No Track"
trak = trak.GetNext()