Index: cfg.py ================================================================== --- cfg.py +++ cfg.py @@ -118,12 +118,20 @@ section = composition[section] for subsection in ["intro", "body", "outro"]: try: print "; Subsection " + subsection subsection = section[subsection] - instrs = [] + unordered_instrs = [] for instr in subsection: + if not "sync" in subsection[instr]: + subsection[instr]["sync"] = None + unordered_instrs.append([subsection[instr]["sync"], instr]) + ordered_instrs = topsort.topsort(unordered_instrs) + ordered_instrs.remove(None) + pdb.set_trace() + instrs = [] + for instr in ordered_instrs: print ";Instrument " + instr instr = subsection[instr] sync = None max_time = instr["duration"] instr_score = render_instr(instr, sync, max_time)