spiffyscore

Diff
Login

Diff

Differences From Artifact [e9b556b4f3]:

To Artifact [3cbe823f2f]:


28
29
30
31
32
33
34



















35
36
37
38
39
40
41
                try:
                    render_order = topsort.topsort([[composition[movement][section][instrument]["sync"], instrument] if "sync" in composition[movement][section][instrument].keys() else [None, instrument] for instrument in composition[movement][section]])
                except topsort.CycleError as ex:
                    print "Your instruments are synced in a circle! This makes no sense!"
                    print movement, section
                    print ex
                    sys.exit(1)



















                

#    for comp_name in progression.split():
#        comp_start_time = max_t
#        for instr_name, instr in composition[comp_name].iteritems():
#            generated_score = generate_score(instr["score"], instr["grammars"])  # Fill in the scores by generating them based on the grammars
##            print generated_score







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
                try:
                    render_order = topsort.topsort([[composition[movement][section][instrument]["sync"], instrument] if "sync" in composition[movement][section][instrument].keys() else [None, instrument] for instrument in composition[movement][section]])
                except topsort.CycleError as ex:
                    print "Your instruments are synced in a circle! This makes no sense!"
                    print movement, section
                    print ex
                    sys.exit(1)
                while None in render_order:
                    render_order.remove(None)
                for instrument in render_order:
                    grammars = composition[movement][section][instrument]["grammars"]
                    for grammar in grammars:
                        if isinstance(grammars[grammar], list):
                            for option in range(len(grammar)):
                                grammars[grammar][option] = parse.parse(grammars[grammar][option])
                        else:
                            grammars[grammar] = parse.parse(grammars[grammar])
                    print instrument, movement, section
                    print grammars


def generate_score_phrase(grammar, grammars):
    count_length = 
    while count_length < 100000:
    

                

#    for comp_name in progression.split():
#        comp_start_time = max_t
#        for instr_name, instr in composition[comp_name].iteritems():
#            generated_score = generate_score(instr["score"], instr["grammars"])  # Fill in the scores by generating them based on the grammars
##            print generated_score