-
Notifications
You must be signed in to change notification settings - Fork 0
/
song.js
187 lines (185 loc) · 5.23 KB
/
song.js
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// This music has been exported by SoundBox. You can use it with
// http://sb.bitsnbites.eu/player-small.js in your own product.
// See http://sb.bitsnbites.eu/demo.html for an example of how to
// use it in a demo.
// Song data
var song = {
songData: [
{ // Instrument 0
i: [
3, // OSC1_WAVEFORM
255, // OSC1_VOL
128, // OSC1_SEMI
0, // OSC1_XENV
0, // OSC2_WAVEFORM
255, // OSC2_VOL
128, // OSC2_SEMI
0, // OSC2_DETUNE
0, // OSC2_XENV
0, // NOISE_VOL
60, // ENV_ATTACK
0, // ENV_SUSTAIN
112, // ENV_RELEASE
25, // ENV_EXP_DECAY
0, // ARP_CHORD
0, // ARP_SPEED
0, // LFO_WAVEFORM
0, // LFO_AMT
0, // LFO_FREQ
0, // LFO_FX_FREQ
2, // FX_FILTER
14, // FX_FREQ
96, // FX_RESONANCE
0, // FX_DIST
7, // FX_DRIVE
0, // FX_PAN_AMT
0, // FX_PAN_FREQ
0, // FX_DELAY_AMT
0 // FX_DELAY_TIME
],
// Patterns
p: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
// Columns
c: [
{n: [135,,,,,,,,145,,,,,,,,142,,,,,,,,138,,,,,,,,137,,,,,,,,140,,,,,,,,144,,,,,,,,133,,,,,,,,142,,,,,,,,149,,,,,,,,149,,,,,,,,142],
f: []}
]
},
{ // Instrument 1
i: [
2, // OSC1_WAVEFORM
63, // OSC1_VOL
128, // OSC1_SEMI
0, // OSC1_XENV
3, // OSC2_WAVEFORM
53, // OSC2_VOL
128, // OSC2_SEMI
9, // OSC2_DETUNE
0, // OSC2_XENV
0, // NOISE_VOL
7, // ENV_ATTACK
5, // ENV_SUSTAIN
52, // ENV_RELEASE
0, // ENV_EXP_DECAY
0, // ARP_CHORD
0, // ARP_SPEED
0, // LFO_WAVEFORM
0, // LFO_AMT
0, // LFO_FREQ
0, // LFO_FX_FREQ
2, // FX_FILTER
255, // FX_FREQ
0, // FX_RESONANCE
0, // FX_DIST
32, // FX_DRIVE
47, // FX_PAN_AMT
3, // FX_PAN_FREQ
0, // FX_DELAY_AMT
0 // FX_DELAY_TIME
],
// Patterns
p: [1,2,1,2,3,2,3,2,4,2,4,2,1,2,1,2],
// Columns
c: [
{n: [152,,,,123,,,,147,,,,116,,,,150,,143,,152,,145,,154,,,,151],
f: []},
{n: [135,,,,142,,,,140,,,,109,,,,140,,138,,137,,140,,147,,,,144],
f: []},
{n: [157,,,,128,,,,152,,,,121,,,,150,,143,,152,,145,,154,,,,151],
f: []},
{n: [128,,132,,134,,130,,140,,,,121,,,,150,,143,,152,,145,,154,,,,151],
f: []}
]
},
{ // Instrument 2
i: [
0, // OSC1_WAVEFORM
0, // OSC1_VOL
140, // OSC1_SEMI
0, // OSC1_XENV
0, // OSC2_WAVEFORM
0, // OSC2_VOL
140, // OSC2_SEMI
0, // OSC2_DETUNE
0, // OSC2_XENV
81, // NOISE_VOL
4, // ENV_ATTACK
10, // ENV_SUSTAIN
47, // ENV_RELEASE
55, // ENV_EXP_DECAY
0, // ARP_CHORD
0, // ARP_SPEED
0, // LFO_WAVEFORM
187, // LFO_AMT
5, // LFO_FREQ
0, // LFO_FX_FREQ
1, // FX_FILTER
239, // FX_FREQ
135, // FX_RESONANCE
0, // FX_DIST
32, // FX_DRIVE
108, // FX_PAN_AMT
5, // FX_PAN_FREQ
16, // FX_DELAY_AMT
4 // FX_DELAY_TIME
],
// Patterns
p: [,,,,1,1,1,1,2,2,2,2,,,2,2],
// Columns
c: [
{n: [,,,,142,,,,,,,,142,,,,,,,,142,,,,,,,,142],
f: []},
{n: [142,,,,142,,,,142,,,,,,,,142,,,,142,,,,142],
f: []}
]
},
{ // Instrument 3
i: [
3, // OSC1_WAVEFORM
255, // OSC1_VOL
128, // OSC1_SEMI
0, // OSC1_XENV
0, // OSC2_WAVEFORM
255, // OSC2_VOL
140, // OSC2_SEMI
0, // OSC2_DETUNE
0, // OSC2_XENV
127, // NOISE_VOL
2, // ENV_ATTACK
2, // ENV_SUSTAIN
47, // ENV_RELEASE
61, // ENV_EXP_DECAY
0, // ARP_CHORD
0, // ARP_SPEED
0, // LFO_WAVEFORM
96, // LFO_AMT
3, // LFO_FREQ
1, // LFO_FX_FREQ
3, // FX_FILTER
94, // FX_FREQ
79, // FX_RESONANCE
0, // FX_DIST
32, // FX_DRIVE
84, // FX_PAN_AMT
2, // FX_PAN_FREQ
12, // FX_DELAY_AMT
4 // FX_DELAY_TIME
],
// Patterns
p: [,3,,3,,,,,1,,1,,2,3,2,3],
// Columns
c: [
{n: [135,,,,147,,,,,,,,,,,,140,,,,142,,,,,,,,144],
f: []},
{n: [142,,146,,148,,151,,,,,,,,,,140,,144,,146,,149],
f: []},
{n: [140,,144,,146,,149,,,,,,,,,,147,,144,,142,,146],
f: []}
]
},
],
rowLen: 7350, // In sample lengths
patternLen: 32, // Rows per pattern
endPattern: 15, // End pattern
numChannels: 4 // Number of channels
};