|
|
@@ -56,7 +56,7 @@ if root.tag != "Session": |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
print "Ardour session file version is " + root.attrib["version"] |
|
|
|
print "This program is known to work with versions <= 2.0.0" |
|
|
|
print "This program is known to work with versions <= 3.0.1" |
|
|
|
|
|
|
|
ProjectName = root.attrib["name"] |
|
|
|
|
|
|
@@ -77,6 +77,11 @@ for node in root.findall( "./Sources/Source" ): |
|
|
|
Sources[node.attrib["id"]] = node; |
|
|
|
# print "\tFound source " + node.attrib["name"] |
|
|
|
|
|
|
|
print "Gathering version 3 diskstreams." |
|
|
|
for node in root.findall( "./Routes/Route/Diskstream" ): |
|
|
|
DiskStreams[node.attrib["id"]] = node; |
|
|
|
print "\tFound diskstream " + node.attrib["name"]; |
|
|
|
|
|
|
|
print "Gathering version 2 diskstreams." |
|
|
|
for node in root.findall( "./DiskStreams/AudioDiskstream" ): |
|
|
|
DiskStreams[node.attrib["id"]] = node; |
|
|
@@ -105,7 +110,12 @@ for node in root.findall("./TempoMap/Tempo"): |
|
|
|
|
|
|
|
for node in root.findall("./TempoMap/Meter"): |
|
|
|
TimeID = NewID() |
|
|
|
History.write( "Time_Point " + TimeID + " create :start 0 :beats_per_bar " + node.attrib["beats-per-bar"] + " :beat_type " + node.attrib["note-type"] + "\n") |
|
|
|
try: |
|
|
|
BPB = node.attrib["beats-per-bar"] |
|
|
|
except: |
|
|
|
BPB = node.attrib["divisions-per-bar"] |
|
|
|
|
|
|
|
History.write( "Time_Point " + TimeID + " create :start 0 :beats_per_bar " + BPB + " :beat_type " + node.attrib["note-type"] + "\n") |
|
|
|
|
|
|
|
|
|
|
|
print "Processing playlists." |
|
|
@@ -114,8 +124,11 @@ for node in root.findall( "./Playlists/Playlist" ): |
|
|
|
try: |
|
|
|
Track = DiskStreams[node.attrib["orig_diskstream_id"]] |
|
|
|
except: |
|
|
|
print "\tSkipping playlist " + node.attrib["name"] + " for unknown diskstream" |
|
|
|
continue |
|
|
|
try: |
|
|
|
Track = DiskStreams[node.attrib["orig-track-id"]] |
|
|
|
except: |
|
|
|
print "\tSkipping playlist " + node.attrib["name"] + " for unknown diskstream" |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
if node.attrib["name"] == Track.attrib["playlist"]: |
|
|
|