spiffyscore

Check-in [4f872339ff]
Login
Overview
SHA1:4f872339ff41a69d874c3519a88dc83b30dd8315
Date: 2011-11-07 01:39:19
User: brian
Comment:Altered the sample-based instruments to ine Csound string formatting instead of a billion if clauses to choose what file to play
Timelines: family | ancestors | descendants | both | develop
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-11-15
22:09
[0c3fb3e27f] Replaced csound support with midi support (user: brian, tags: develop)
15:47
[daa0ddb3ad] Attempted to make a csound based on midi. Failed. (user: brian, tags: feature/midi)
2011-11-07
01:39
[4f872339ff] Altered the sample-based instruments to ine Csound string formatting instead of a billion if clauses to choose what file to play (user: brian, tags: develop)
2011-11-03
19:23
[8293931a34] Added a very, very bad set of violin samples (user: brian, tags: develop)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified cfg.orc from [a0811d420c] to [feddf36ca4].

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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
sr=44100
ksmps=20
nchnls=1

instr 3
    if p5=1.05 then
        asig diskin2 "samples/bass/1.05.wav", 1
    elseif p5=1.06 then
        asig diskin2 "samples/bass/1.06.wav", 1
    elseif p5=1.07 then
        asig diskin2 "samples/bass/1.07.wav", 1
    elseif p5=1.08 then
        asig diskin2 "samples/bass/1.08.wav", 1
    elseif p5=1.08 then
        asig diskin2 "samples/bass/1.09.wav", 1
    elseif p5=1.10 then
        asig diskin2 "samples/bass/1.10.wav", 1
    elseif p5=1.11 then
        asig diskin2 "samples/bass/1.11.wav", 1
    elseif p5=2.00 then
        asig diskin2 "samples/bass/2.00.wav", 1
    elseif p5=2.01 then
        asig diskin2 "samples/bass/2.01.wav", 1
    elseif p5=2.02 then
        asig diskin2 "samples/bass/2.02.wav", 1
    elseif p5=2.03 then
        asig diskin2 "samples/bass/2.03.wav", 1
    elseif p5=2.04 then
        asig diskin2 "samples/bass/2.04.wav", 1
    elseif p5=2.05 then
        asig diskin2 "samples/bass/2.05.wav", 1
    elseif p5=2.06 then
        asig diskin2 "samples/bass/2.06.wav", 1
    elseif p5=2.07 then
        asig diskin2 "samples/bass/2.07.wav", 1
    elseif p5=2.08 then
        asig diskin2 "samples/bass/2.08.wav", 1
    elseif p5=2.09 then
        asig diskin2 "samples/bass/2.09.wav", 1
    elseif p5=2.10 then
        asig diskin2 "samples/bass/2.10.wav", 1
    elseif p5=2.11 then
        asig diskin2 "samples/bass/2.11.wav", 1
    elseif p5=3.00 then
        asig diskin2 "samples/bass/3.00.wav", 1
    elseif p5=3.01 then
        asig diskin2 "samples/bass/3.01.wav", 1
    elseif p5=3.02 then
        asig diskin2 "samples/bass/3.02.wav", 1
    elseif p5=3.03 then
        asig diskin2 "samples/bass/3.03.wav", 1
    elseif p5=3.04 then
        asig diskin2 "samples/bass/3.04.wav", 1
    elseif p5=3.05 then
        asig diskin2 "samples/bass/3.05.wav", 1
    elseif p5=3.06 then
        asig diskin2 "samples/bass/3.06.wav", 1
    elseif p5=3.07 then
        asig diskin2 "samples/bass/3.07.wav", 1
    elseif p5=3.08 then
        asig diskin2 "samples/bass/3.08.wav", 1
    elseif p5=3.09 then
        asig diskin2 "samples/bass/3.09.wav", 1
    elseif p5=3.10 then
        asig diskin2 "samples/bass/3.10.wav", 1
    elseif p5=3.11 then
        asig diskin2 "samples/bass/3.11.wav", 1
    endif
    outs asig
endin

instr 1
    asound pluck   p4, cpspch(p5), cpspch(p6), p7, p8 p9 p10
    out asound
endin

instr 2
    kenv linen p4, .1, p3, .2; envelope
    asound oscili kenv, cpspch(p5), p6; oscillator
    out asound
endin











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

instr 5
    if p5=3.07 then
        asig diskin2 "samples/violin/3.07.wav", 1
    elseif p5=3.08 then
        asig diskin2 "samples/violin/3.08.wav", 1
    elseif p5=3.08 then
        asig diskin2 "samples/violin/3.09.wav", 1
    elseif p5=3.10 then
        asig diskin2 "samples/violin/3.10.wav", 1
    elseif p5=3.11 then
        asig diskin2 "samples/violin/3.11.wav", 1
    elseif p5=4.00 then
        asig diskin2 "samples/violin/4.00.wav", 1
    elseif p5=4.01 then
        asig diskin2 "samples/violin/4.01.wav", 1
    elseif p5=4.02 then
        asig diskin2 "samples/violin/4.02.wav", 1
    elseif p5=4.03 then
        asig diskin2 "samples/violin/4.03.wav", 1
    elseif p5=4.04 then
        asig diskin2 "samples/violin/4.04.wav", 1
    elseif p5=4.05 then
        asig diskin2 "samples/violin/4.05.wav", 1
    elseif p5=4.06 then
        asig diskin2 "samples/violin/4.06.wav", 1
    elseif p5=4.07 then
        asig diskin2 "samples/violin/4.07.wav", 1
    elseif p5=4.08 then
        asig diskin2 "samples/violin/4.08.wav", 1
    elseif p5=4.09 then
        asig diskin2 "samples/violin/4.09.wav", 1
    elseif p5=4.10 then
        asig diskin2 "samples/violin/4.10.wav", 1
    elseif p5=4.11 then
        asig diskin2 "samples/violin/4.11.wav", 1
    elseif p5=5.00 then
        asig diskin2 "samples/violin/5.00.wav", 1
    elseif p5=5.01 then
        asig diskin2 "samples/violin/5.01.wav", 1
    elseif p5=5.02 then
        asig diskin2 "samples/violin/5.02.wav", 1
    elseif p5=5.03 then
        asig diskin2 "samples/violin/5.03.wav", 1
    elseif p5=5.04 then
        asig diskin2 "samples/violin/5.04.wav", 1
    elseif p5=5.05 then
        asig diskin2 "samples/violin/5.05.wav", 1
    elseif p5=5.06 then
        asig diskin2 "samples/violin/5.06.wav", 1
    elseif p5=5.07 then
        asig diskin2 "samples/violin/5.07.wav", 1
    elseif p5=5.08 then
        asig diskin2 "samples/violin/5.08.wav", 1
    elseif p5=5.09 then
        asig diskin2 "samples/violin/5.09.wav", 1
    elseif p5=5.10 then
        asig diskin2 "samples/violin/5.10.wav", 1
    elseif p5=5.11 then
        asig diskin2 "samples/violin/5.11.wav", 1
    endif
    outs asig
endin




|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|








>
>
>
>
>
>
>
>
>
>





<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


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
sr=44100
ksmps=20
nchnls=1

instr 1
;    kcps = 220
;    icps = 220
;    ifn  = 0
;    imeth = p4
;;    asig pluck 0.7, cpspch(p5), cpspch(p6), ifn, imeth, .1, 10






























































    asig pluck   p4, cpspch(p5), cpspch(p6), p7, p8 p9 p10
    out asig
endin

instr 2
    kenv linen p4, .1, p3, .2; envelope
    asound oscili kenv, cpspch(p5), p6; oscillator
    out asound
endin

instr 3
;    pylassigni "note", p5
;    pylruni "sample_file = 'samples/bass/%.2f.wav' % note"
;    Ssample_file pylevali "sample_file"

    Ssample_file sprintf "samples/bass/%.2f.wav", p5
    asig diskin2 Ssample_file, 1
    outs asig
endin

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

instr 5










    Ssample_file sprintf "samples/bass/%.2f.wav", p5
    asig diskin2 Ssample_file, 1















































    outs asig
endin

Modified spiffyscore.py from [c67f427fd6] to [390f3e8450].

101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118

119

120
121
122
123
124
125
126
127
128
129
130












131
132
133
134
135
136
137
138
139
140
141
142
143
144
                        "u": ["C/4 C/4 C/4 C/4"],
                    },
                },
            },
        },
        "sync_test": {
            "body": {
                "lead_instr": {  # Instrument 'melody'

                    "score_line": "i5 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
                    "octave": 4,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
#                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
                        "v": ["C/2 C/2 C/2 C/2 (w)"],
                        "w": ["E/2 F/2 E/2 F/2 (u)"],
                    },
                },

                "follow_instr": {  # Instrument 'melody'

                    "score_line": "i3 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
#                    "sync": "lead_instr",
                    "octave": 2,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
#                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
                        "u": ["E F G E (v)"],
                        "v": ["G A A A (e)", "G A A A (v)"],
                        "e": ["B A G A (v)"],
                    },
                },












            },
        },
    }
    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 ["sync_test"]:
        print "; Section " + section
        subsection_start = section_start







|
>
|
|
|
|
|
|
|
|
<
|
>

>








|


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






|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
                        "u": ["C/4 C/4 C/4 C/4"],
                    },
                },
            },
        },
        "sync_test": {
            "body": {
#                "lead_instr": {  # Instrument 'melody'
#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
##                    "score_line": "i5 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
#                    "octave": 7,
#                    "duration": 30,
#                    "grammars": {  # Notes for this instrument to use in this piece
##                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
#                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
#                        "v": ["C/2 C/2 C/2 C/2 (w)"],
#                        "w": ["E/2 F/2 E/2 F/2 (u)"],

#                    },
#                },
                "follow_instr": {  # Instrument 'melody'
#                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
                    "score_line": "i3 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
#                    "sync": "lead_instr",
                    "octave": 2,
                    "duration": 30,
                    "grammars": {  # Notes for this instrument to use in this piece
#                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
                        "u": ["E F G E (v)"],
                        "v": ["G A A A (e)", "G A A A (v)"],
                        "e": ["B A G A (u)"],
                    },
                },
#                "instr2": {  # Instrument 'melody'
#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s",
#                    "octave": 5,
#                    "duration": 30,
#                    "grammars": {  # Notes for this instrument to use in this piece
##                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
#                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
#                        "v": ["C/2 C/2 C/2 C/2 (w)"],
#                        "w": ["E/2 F/2 E/2 F/2 (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 60
    '''

    section_start = 0
#    for section in ["verse1", "verse2"]:
    for section in ["sync_test"]:
        print "; Section " + section
        subsection_start = section_start