spiffyscore

Changes On Branch ec61af8387630ac1
Login

Changes On Branch ec61af8387630ac1

Changes In Branch stash Excluding Merge-Ins

This is equivalent to a diff from aa88358397 to ec61af8387

2010-11-17
07:42
csound score lines are no longer hardcoded, but are stored with each instrument check-in: b8d35587a4 user: spiffytech@gmail.com tags: master
07:34
WIP on tld: 4b95fed Added support for rest notes Leaf check-in: ec61af8387 user: spiffytech@gmail.com tags: stash
07:34
index on tld: 4b95fed Added support for rest notes check-in: ef35a8e9e0 user: spiffytech@gmail.com tags: stash
07:30
Added support for rest notes Closed-Leaf check-in: aa88358397 user: spiffytech@gmail.com tags: tld
06:57
Note duration is now counted as fraction of a whole note, as measured based on BPM check-in: 5a35ffdd27 user: spiffytech@gmail.com tags: tld

Modified cfg.py from [08a2f25157] to [91366ef5db].

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
        "b": {
            "melody": {  # Instrument 'melody'
                "csound_parameters": {
                    "instrument": 1,
                },
                "grammars": {  # Notes for this instrument to use in this piece
                    "u": ["I V I I/2 IV/2 u u", "I2 IV u u", "I IV IV VI V u u" , "e"],
#                    "u": ["I IV I V u u u", "e"],
                    "e": [""],
                },
                "score": "u u u",
            },
            "rhythm": {
                "csound_parameters": {
                    "instrument": 1,







<







42
43
44
45
46
47
48

49
50
51
52
53
54
55
        "b": {
            "melody": {  # Instrument 'melody'
                "csound_parameters": {
                    "instrument": 1,
                },
                "grammars": {  # Notes for this instrument to use in this piece
                    "u": ["I V I I/2 IV/2 u u", "I2 IV u u", "I IV IV VI V u u" , "e"],

                    "e": [""],
                },
                "score": "u u u",
            },
            "rhythm": {
                "csound_parameters": {
                    "instrument": 1,
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
            generated_score = generate_score(instr["score"], instr["grammars"])  # Fill in the scores by generating them based on the grammars
            score = parse.parse(generated_score)  # Return Node/Chord objects

            # Generate timestamps for the notes 
            t = instr_start_time
            for note in range(len(score)):
                score[note].time = t
#                print "Original duration:", score[note].duration
                score[note].duration *= tempo
#                print "New duration:", score[note].duration
                t += score[note].duration
#                print "t:", t
                max_t = t if t > max_t else max_t
            composition[comp_name][instr_name]["score"] = score

    # Must be done after all note times keyed in, else you can't coordinate melodies with the rhythm chords
    for comp_name in progression.split():
        for instr_name, instr in composition[comp_name].iteritems():
            composition[comp_name][instr_name]["score"] = transliterate_score(composition[comp_name][instr_name]["score"], key)







<

<

<







71
72
73
74
75
76
77

78

79

80
81
82
83
84
85
86
            generated_score = generate_score(instr["score"], instr["grammars"])  # Fill in the scores by generating them based on the grammars
            score = parse.parse(generated_score)  # Return Node/Chord objects

            # Generate timestamps for the notes 
            t = instr_start_time
            for note in range(len(score)):
                score[note].time = t

                score[note].duration *= tempo

                t += score[note].duration

                max_t = t if t > max_t else max_t
            composition[comp_name][instr_name]["score"] = score

    # Must be done after all note times keyed in, else you can't coordinate melodies with the rhythm chords
    for comp_name in progression.split():
        for instr_name, instr in composition[comp_name].iteritems():
            composition[comp_name][instr_name]["score"] = transliterate_score(composition[comp_name][instr_name]["score"], key)

Modified todo.org from [109f37c970] to [8a5fa1e81b].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
* Features [1/7]
- [X] Top-down composition
- [ ] Transition the melody between chords appropriately
- [ ] Set maximum song length of movement
- [ ] Set minimum song length of movement
- [ ] Need to support all chord types
- [ ] Doesn't handle rest notes
- [ ] Handle full ABC BNF (yeah, right...)

* Bugs [4/5]
- [X] TLD resets clock for each movement
- [X] TLD doesn't accept an ordering for the movements
- [X] Doesn't handle minor chords    
- [X] Calculated duration is absolute, not relative to BPM
|

|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
* Features [2/7]
- [X] Top-down composition
- [ ] Coordinate the melody and rhythm
- [ ] Set maximum song length of movement
- [ ] Set minimum song length of movement
- [ ] Need to support all chord types
- [X] Doesn't handle rest notes
- [ ] Handle full ABC BNF (yeah, right...)

* Bugs [4/5]
- [X] TLD resets clock for each movement
- [X] TLD doesn't accept an ordering for the movements
- [X] Doesn't handle minor chords    
- [X] Calculated duration is absolute, not relative to BPM