spiffyscore

Check-in [29231e328a]
Login
Overview
SHA1:29231e328aa76fab3c029a83c52303a78e58826b
Date: 2011-10-11 15:19:14
User: brian
Comment:Played around a little with melodies and instruments
Timelines: family | ancestors | feature/abc
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-10-11
15:31
[192b8b1639] Merged in rewrite of core functionality (user: brian, tags: develop)
15:19
[29231e328a] Closed-Leaf: Played around a little with melodies and instruments (user: brian, tags: feature/abc)
2011-09-22
18:30
[f653a4fa10] Added back in support for subsections (user: brian, tags: feature/abc)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified cfg.orc from [9f49be1cae] to [8f705f0ccb].

13
14
15
16
17
18
19




    out asound
endin

instr 3
    asound foscili p4, cpspch(p5), 5, 2, 3, p9
    out asound
endin











>
>
>
>
13
14
15
16
17
18
19
20
21
22
23
    out asound
endin

instr 3
    asound foscili p4, cpspch(p5), 5, 2, 3, p9
    out asound
endin

instr 4
    aFMinst foscili p4, cpspch(p5), p6, p7, p8, p9
endin

Modified cfg.py from [0cb9a22d0b] to [61885bbe35].

10
11
12
13
14
15
16













17
18
19
20
21
22
23
24
25
26
27
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
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76

import tree

random.seed(time.time())

def main():
    composition = {













        "verse1": {
            "intro": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["G/2 G/2 G/4 G/4 A/4 A/4 A/2 G G A A A3 (w)"],
                        "w": ["E E F F G/2 G/2 G3 (u)"],
                    },
                },
            },
            "body": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2",











                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C G/2 G/2 G/2 C B, F' C F C B F (w)"],
                        "w": ["E/4 A/4 D/4 G/4 F/4 F/4 B2 (u)"],
                    },
                },
            },
        },
        "verse2": {
            "body": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C C C C F/2 F/2 F/2 (u)", "D D G/2 A/2 D D (u)"],
                    },
                },
                "harmony": {  # Instrument 'melody'








                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C C C C F/2 F/2 F/2 (u)", "D D G/2 A/2 D D (u)"],












                    },
                },
            },
        },
    }
    print '''f1 0 512 10 1
f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08
f3 0 1025 10 1
t 0 100
    '''

    section_start = 0
    for section in ["verse1", "verse2"]:

        print "; Section " + section
        subsection_start = section_start
        section = composition[section]
        for subsection in ["intro", "body", "outro"]:
            try:
                print "; Subsection " + subsection
                subsection = section[subsection]







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



|



|
|





|
>
>
>
>
>
>
>
>
>
>
>



|
<







|

|

|



>
>
>
>
>
>
>
>
|

|

<
>
>
>
>
>
>
>
>
>
>
>
>












|
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

import tree

random.seed(time.time())

def main():
    composition = {
        "fm_test": {
            "intro": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2 6 5 1",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["G/2 G/2 | G/4 G/4 A/4 A/4 | A/2 A/2 | G | G | A | A | A3 (w)"],
                        "w": ["E | E | F | F | G/2 G/2 | G3 (u)"],
                    },
                },
            },
        },
        "verse1": {
            "intro": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["G/2 G/2 | G/4 G/4 A/4 A/4 | A/2 A/2 | G | G | A | A | A3 (w)"],
                        "w": ["E | E | F | F | G/2 G/2 | G3 (u)"],
                    },
                },
            },
            "body": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C | G/2 G/2 | G/2 G/2 | C | B, | F' | C | F | C | B | F | (w)"],
                        "w": ["E/4 A/4 D/4 G/4 | F/4 F/4 B2 | (u)"],
                    },
                },
            },
            "outro": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
                    "octave": 8,
                    "duration": 10,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C/4 C/4 C/4 C/4 | z2"],

                    },
                },
            },
        },
        "verse2": {
            "body": {
                "melody": {  # Instrument 'melody'
                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
                    "octave": 8,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C | C | C | C | F/2 F/2 | F/2 F/2 | (u)", "D | D | G/2 A/2 | D | D | (u)"],
                    },
                },
                "harmony": {  # Instrument 'melody'
                    "score_line": "i3 %(time)f %(duration)f 4000 %(octave)d.%(note)s 2 3 5 3",
                    "octave": 8,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C | C | z | C | C | z/2 F/4 F/2 F/2 | F/2 F/2 | z (u)", "D | D | G/2 A/2 | D | D | z (u)"],
                    },
                },
                "percussion": {  # Instrument 'melody'
                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
                    "octave": 8,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece

                        "u": ["C/4 C/4 C/4 C/4 | F/2 F/2 | F/2 F/2 | (u)", "D/4 D/4 G/4 A/4 | D | D | (v)"],
                        "v": ["C | D | E | F | E | D | C | (u)",],
                    },
                },
            },
            "outro": {
                "percussion": {  # Instrument 'melody'
                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
                    "octave": 8,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
                        "u": ["C/4 C/4 C/4 C/4"],
                    },
                },
            },
        },
    }
    print '''f1 0 512 10 1
f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08
f3 0 1025 10 1
t 0 100
    '''

    section_start = 0
#    for section in ["verse1", "verse2"]:
    for section in ["fm_test"]:
        print "; Section " + section
        subsection_start = section_start
        section = composition[section]
        for subsection in ["intro", "body", "outro"]:
            try:
                print "; Subsection " + subsection
                subsection = section[subsection]

Added score.yaml version [29fd4ba47c].















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
chorus:
    core:
        rhythm:
            csound_line: i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6
            max_duration: 80
            sync: timbre
            octave: 7
            sustain: 1
            grammars:
                u: 
                    - (I) (ii)/4 (ii)/4 (IV)/2 (V)2 (IV) (ii) x u
                    - (I) (vii) (III) y u
                    - (I) (v) (IV) u u
                w: (i) (VII)2 (VI)/4 (V)/4 (i)/4 (VII)2 (VI) (V) w u
                x: (III/2) (VI)/2 (III)/2 (vii)2 (i)2 (V) u
                y: (I) (vi)2 (IV) (V) y y u

        timbre:
            csound_line: i3 %(time)f %(duration)f 2000 %(octave)d.%(note)s 2 3 5 3
            max_duration: 80
            sync: melody
            sustain: 1
            octave: 6
            grammars:
                u: 
                    - I2+ VII2 V2 VI2 I2 IV/2 V/2 III2 u
                    - I2- IV2 V2 IV I V2 III2 II2. u

        melody:
            csound_line: i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2
            max_duration: 80
            octave: 8
            grammars: 
                u: 
                    - I V/2 V/2 V/2 I VII
                    - IV' I IV I VII IV
                w: III/4 VI/4 II/4 V/4 VI/4 IV/4 VII2
                x: I/2 I/2 VI IV/2 V2 z I/2 I/2 VI IV/2 V

Modified test.sco from [b5abda4892] to [e27e42951e].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
f1 0 512 10 1
f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08
f3 0 1025 10 1
t 0 100
    
; Section verse1
; Subsection intro
;Instrument melody
i2 0.000000 1.000000 7000 8.04 2
i2 1.000000 1.000000 7000 8.04 2
i2 2.000000 1.000000 7000 8.05 2
i2 3.000000 1.000000 7000 8.05 2
i2 4.000000 0.500000 7000 8.07 2
i2 4.500000 0.500000 7000 8.07 2
i2 5.000000 3.000000 7000 8.07 2
; Subsection body
;Instrument melody
i2 8.000000 0.250000 7000 8.04 2
i2 8.250000 0.250000 7000 8.09 2
i2 8.500000 0.250000 7000 8.02 2
i2 8.750000 0.250000 7000 8.07 2
i2 9.000000 0.250000 7000 8.05 2
i2 9.250000 0.250000 7000 8.05 2
i2 9.500000 2.000000 7000 8.11 2
; Subsection outro
; Section verse2
; Subsection intro
; Subsection body
;Instrument melody
i2 11.500000 1.000000 7000 8.00 2
i2 12.500000 1.000000 7000 8.00 2
i2 13.500000 1.000000 7000 8.00 2
i2 14.500000 1.000000 7000 8.00 2
i2 15.500000 0.500000 7000 8.05 2
i2 16.000000 0.500000 7000 8.05 2
i2 16.500000 0.500000 7000 8.05 2
;Instrument harmony
i2 11.500000 1.000000 7000 8.00 2
i2 12.500000 1.000000 7000 8.00 2
i2 13.500000 1.000000 7000 8.00 2
i2 14.500000 1.000000 7000 8.00 2
i2 15.500000 0.500000 7000 8.05 2
i2 16.000000 0.500000 7000 8.05 2
i2 16.500000 0.500000 7000 8.05 2
; Subsection outro





|


|
|
|
|
|
|
|

<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16








17




















f1 0 512 10 1
f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08
f3 0 1025 10 1
t 0 100
    
; Section fm_test
; Subsection intro
;Instrument melody
i2 0.000000 1.000000 7000 8.04 2 6 5 1
i2 1.000000 1.000000 7000 8.04 2 6 5 1
i2 2.000000 1.000000 7000 8.05 2 6 5 1
i2 3.000000 1.000000 7000 8.05 2 6 5 1
i2 4.000000 0.500000 7000 8.07 2 6 5 1
i2 4.500000 0.500000 7000 8.07 2 6 5 1
i2 5.000000 3.000000 7000 8.07 2 6 5 1
; Subsection body








; Subsection outro