2 wavedrum-lib, a library to parse, edit and write Korg Wavedrum programs.
3 Copyright (C) 2013 Ricardo Wurmus
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 {-# LANGUAGE OverloadedStrings #-}
21 module Wavedrum.Algorithm where
23 import Control.Applicative
25 import qualified Data.Text as T
28 type ParamSetting = (T.Text, Range)
29 data AlgoType = Single | Double deriving (Show, Eq)
30 data Algorithm = Algorithm { algoType :: AlgoType
32 , algoParams :: [ParamSetting]
35 apply3 :: (a -> b -> c -> d) -> (a,b,c) -> d
36 apply3 f (a,b,c) = f a b c
38 algorithms :: [Algorithm]
39 algorithms = map (apply3 Algorithm) [
41 [ ("Clang Pitch", (0,100))
42 , ("Clang Decay", (0,100))
43 , ("Clang Color", (0,100))
44 , ("Clang Height", (0,100))
45 , ("Clang Width", (0,100))
46 , ("Clang Level", (0,100))
47 , ("Boom Level", (0,100))
48 , ("Clang Type", (0,100))
51 [ ("Bell Color", ( 0,100))
52 , ("Harmonic Shift", (-50, 50))
53 , ("Bell Type", ( 0,100))
54 , ("Bend Range", ( 0,100))
55 , ("Pressure Level", ( 0,100))
56 , ("Bell Height", ( 0,100))
57 , ("Bell Width", ( 0,100))
58 , ("Bell Thickness", ( 0,100))
60 , (Single, "WoodDrum",
61 [ ("Wood Type", ( 0,100))
62 , ("Shell Decay", ( 0,100))
63 , ("Shell Pitch", ( 0,100))
64 , ("Shell Level", ( 0,100))
65 , ("Mute Cutoff", ( 0,100))
66 , ("Mute Resonance", ( 0,100))
67 , ("Mute Pitch", ( 0,100))
68 , ("Velocity Curve", ( 0,100))
71 [ ("Filter Cutoff", ( 0,100))
72 , ("Resonance", ( 0,100))
73 , ("Pitch EG Depth", ( 0,100))
74 , ("Filter EG Depth", ( 0,100))
75 , ("Pressure Resonance", (-50, 50))
76 , ("Filter EG Decay", ( 0,100))
77 , ("Mute Depth", ( 0,100))
78 , ("Effects Level", ( 0,100))
81 [ ("Tone Pitch", ( 0,100))
82 , ("Tension Balance", ( 0,100))
83 , ("Tone Level", ( 0,100))
84 , ("Drum Type", ( 0,100))
85 , ("Damping", ( 0,100))
86 , ("Bark Level", ( 0,100))
87 , ("Pitch Interval", ( 0,100))
88 , ("Dry Level", ( 0,100))
90 , (Single, "Sawari-A",
91 [ ("Buzz Intensity", ( 0,100))
92 , ("L-R Delay", ( 0,100))
93 , ("Drone Pitch", (-50, 50))
94 , ("Drone Decay", ( 0,100))
95 , ("Drone Balance", (-50, 50))
96 , ("Brightness", ( 0,100))
97 , ("Drone Level", ( 0,100))
98 , ("Drum Level", ( 0,100))
100 , (Single, "WindDrum",
101 [ ("Fine Tuning", ( 0,100))
102 , ("Scale Select", ( 0, 7))
103 , ("Balance", (-50, 50))
104 , ("Tone Decay", ( 0,100))
105 , ("Interval", ( 0,100))
106 , ("Noise Filter", ( 0,100))
107 , ("Noise Decay", ( 0,100))
108 , ("Noise Color", ( 0,100))
110 , (Single, "Triangle",
111 [ ("Brightness", ( 0,100))
112 , ("Pitch 1", ( 0,100))
113 , ("Pitch 2", ( 0,100))
114 , ("Pitch 3", ( 0,100))
115 , ("Metal Type 1", ( 0,100))
116 , ("Metal Type 2", ( 0,100))
117 , ("Metal Type 3", ( 0,100))
118 , ("Metal Type 4", ( 0,100))
121 [ ("Pitch Change", ( 0,100))
122 , ("Brightness", ( 0,100))
123 , ("Drum Type 1", ( 0,100))
124 , ("Drum Type 2", ( 0,100))
125 , ("Portamento", ( 0,100))
126 , ("Pressure = Level", ( 0,100))
127 , ("Water Pitch", ( 0,100))
128 , ("Water Strength", ( 0,100))
130 , (Single, "BigHand",
131 [ ("Drum Type", ( 0,100))
132 , ("Bass Tone Level", ( 0,100))
133 , ("Slap Level", ( 0,100))
134 , ("Slap Decay", ( 0,100))
135 , ("Slap Color", ( 0,100))
136 , ("Slap Filter", ( 0,100))
137 , ("Slap Resonance", ( 0,100))
138 , ("Threshold", ( 0,100))
140 , (Single, "SteelST",
141 [ ("Brightness", ( 0,100))
142 , ("Pressure Pitch", ( 0,100))
143 , ("Pressure Color", ( 0,100))
144 , ("Pressure Range", (-50, 50))
145 , ("Threshold", ( 0,100))
146 , ("Balance", (-50, 50))
147 , ("Wah Depth", ( 0,100))
148 , ("Gauge", ( 0,100))
150 , (Single, "Mo'Daiko",
151 [ ("Drum Type", ( 0,100))
152 , ("Pitch EG Depth", ( 0,100))
153 , ("LFO Rate", ( 0,100))
154 , ("LFO Depth", ( 0,100))
155 , ("Damping", ( 0,100))
156 , ("Pressure Pitch", ( 0,100))
157 , ("Resonance Sweep", ( 0,100))
158 , ("Mute Depth", ( 0,100))
160 , (Single, "Sawari-B",
161 [ ("Bend Range", ( 0,100))
162 , ("Decay Balance", (-50, 50))
163 , ("Level Balance", (-50, 50))
164 , ("Top Color", ( 0,100))
165 , ("Drone Color", ( 0,100))
166 , ("Buzz Intensity", ( 0,100))
167 , ("Scale Select", ( 0, 7))
168 , ("Bend/Scale Select", ( 0, 1))
171 [ ("Baya Pitch", ( 0,100))
172 , ("Baya Level", ( 0,100))
173 , ("Baya Decay", ( 0,100))
174 , ("Bend Curve", ( 0,100))
175 , ("Damping", ( 0,100))
176 , ("Shell Pitch", ( 0,100))
177 , ("Shell Damping", ( 0,100))
178 , ("Shell Decay", ( 0,100))
181 [ ("Gong Color", ( 0,100))
182 , ("LFO Depth", (-50, 50))
183 , ("LFO Rate", ( 0,100))
184 , ("Damping", ( 0,100))
185 , ("Gong Type", ( 0,100))
186 , ("Harmonic Shift", ( 0,100))
187 , ("Thickness", ( 0,100))
188 , ("Model Select", ( 0, 7))
190 , (Single, "Wah Harp",
191 [ ("Damping", ( 0,100))
192 , ("Wah Color", ( 0,100))
193 , ("String Character", ( 0,100))
194 , ("Wah Balance", ( 0,100))
195 , ("LoDamp", ( 0,100))
196 , ("Attack Level", ( 0,100))
197 , ("Attack LoDamp", ( 0,100))
198 , ("Bend Range", (-50, 50))
200 , (Single, "TalkDrum",
201 [ ("Bend Range", ( 0,100))
202 , ("Brightness 1", ( 0,100))
203 , ("Brightness 2", ( 0,100))
204 , ("Decay Interval", ( 0,100))
205 , ("Tension", ( 0,100))
206 , ("Drum Type", ( 0,100))
207 , ("Attack", ( 0,100))
208 , ("Pressure Filter", ( 0,100))
211 [ ("Jingle Type", ( 0,100))
212 , ("Jingle Size", (-50, 50))
213 , ("Repeat", ( 0,100))
214 , ("Bell Decay", ( 0,100))
215 , ("Brightness", ( 0,100))
216 , ("Pressure Decay", (-50, 50))
217 , ("Pressure Pitch", (-50, 50))
218 , ("Model Select", ( 0, 2))
221 [ ("Shell Size", ( 0,100))
222 , ("Shell Damp", ( 0,100))
223 , ("Sub Harmonics", ( 0,100))
224 , ("Brightness", ( 0,100))
225 , ("Drum Size", ( 0,100))
226 , ("Slap Level", ( 0,100))
227 , ("Slap Decay", ( 0,100))
228 , ("Slap Color", ( 0,100))
231 [ ("Fine Tune", (-50, 50))
232 , ("Pluck Position", (-50, 50))
233 , ("Damping", ( 0,100))
234 , ("String Type 1", ( 0,100))
235 , ("String Type 2", ( 0,100))
236 , ("Plucked Noise", ( 0,100))
237 , ("Bottom String", ( 0, 12))
238 , ("String Range", ( 0, 12))
241 [ ("Fine Tune", (-50, 50))
242 , ("Accent Level", ( 0,100))
243 , ("Velocity Range", ( 0,100))
244 , ("2nd Pitch", (-50, 50))
245 , ("Pressure Pitch", (-50, 50))
246 , ("Pressure Range", (-50, 50))
247 , ("Scale Select", ( 0, 7))
248 , ("Sequence Type", ( 0, 2))
250 , (Single, "JingDrum",
251 [ ("Jingle Level", ( 0,100))
252 , ("Drum Level", ( 0,100))
253 , ("Brightness 1", ( 0,100))
254 , ("Drum Width", ( 0,100))
255 , ("Pressure Decay", (-50, 50))
256 , ("Jingle Pitch", ( 0,100))
257 , ("Jingle Decay", ( 0,100))
258 , ("Brightness 2", ( 0,100))
260 , (Single, "Don-Hya",
261 [ ("Seq. Note Volume", ( 0,100))
262 , ("Motif Select", ( 0, 7))
263 , ("Delay Time", ( 0,100))
264 , ("Portamento", ( 0,100))
265 , ("Brightness", ( 0,100))
266 , ("Noise-Color", ( 0,100))
267 , ("Noise-Level", ( 0,100))
268 , ("Pitch Interval", ( 0,100))
271 [ ("Tone Pitch", ( 0,100))
272 , ("Pitch Response", ( 0,100))
273 , ("Pressure Pitch", ( 0,100))
274 , ("Tone Level", ( 0,100))
275 , ("Resonance Balance", ( 0,100))
276 , ("Brightness", ( 0,100))
277 , ("Drum Type1", ( 0,100))
278 , ("Drum Type2", ( 0,100))
281 [ ("Pitch EG Depth", ( 0,100))
282 , ("Harmonics", ( 0,100))
283 , ("HiDamp", ( 0,100))
284 , ("Filter Level", ( 0,100))
285 , ("Filter Cutoff", ( 0,100))
286 , ("Pop Level", ( 0,100))
287 , ("Pop Pitch", ( 0,100))
288 , ("Pop Random", ( 0,100))
291 [ ("Pressure Pitch", ( 0,100))
292 , ("Brightness", ( 0,100))
293 , ("Ensemble Size", ( 0,100))
294 , ("Delay Control", ( 0,100))
295 , ("Snappy Level", ( 0,100))
296 , ("LoDamp", ( 0,100))
297 , ("HiDamp", ( 0,100))
298 , ("Resonance", ( 0,100))
300 , (Double, "Conga", type1)
301 , (Double, "Bongo", type1)
302 , (Double, "Snare Drum 1", type2)
303 , (Double, "Snare Drum 2", type2)
304 , (Double, "Snare Drum 3", type2)
305 , (Double, "Timbales", type2)
306 , (Double, "Cajon", type3)
307 , (Double, "Djembe", type3)
308 , (Double, "Bass Drum + Snare Drum 1", type3)
309 , (Double, "Bass Drum + Snare Drum 2", type3)
310 -- only available on Wavedrum Oriental
311 , (Double, "Darbuka", type4) --37
312 , (Double, "Darbuka ensemble", type4) --38
313 , (Double, "Darbuka Turkish", type4) --39
314 , (Double, "Tar", type4) --40
315 , (Double, "Daf", type4) --41
316 , (Double, "Doyra", type4) --42
317 , (Double, "Req", --43
318 [ ("Switching", ( 0,100))
319 , ("PCM Balance", (-50, 50))
320 , ("Alg-PCM Balance", (-50, 50))
321 , ("Drum Width", ( 0,100))
322 , ("Jingle Pitch", ( 0,100))
323 , ("Jingle Decay", ( 0,100))
324 , ("Brightness 2", ( 0,100)) -- sic
325 , ("Sensitivity", ( 0,100))
327 , (Double, "Daf Iranian", type6) --44
328 , (Double, "Bendir", type6) --45
331 type1 = [ ("Switching", ( 0,100))
332 , ("PCM Balance", (-50, 50))
333 , ("Alg-PCM Balance", (-50, 50))
334 , ("Sub Harmonics", ( 0,100))
335 , ("Brightness", ( 0,100))
336 , ("Slap Level", ( 0,100))
337 , ("Slap Decay", ( 0,100)) -- manual wrongly says "Delay"
338 , ("Slap Color", ( 0,100))
340 type2 = [ ("Switching", ( 0,100))
341 , ("PCM Balance", (-50, 50))
342 , ("Alg-PCM Balance", (-50, 50))
343 , ("Curve", ( 0,100))
344 , ("Brightness", ( 0,100))
345 , ("Snappy Decay", ( 0,100))
346 , ("Snappy Level", ( 0,100))
347 , ("Shell Type", ( 0, 4))
349 type3 = [ ("Switching", ( 0,100))
350 , ("PCM Balance", (-50, 50))
351 , ("Alg-PCM Balance", (-50, 50))
352 , ("Curve", ( 0,100))
353 , ("Brightness", ( 0,100))
354 , ("Snappy Decay", ( 0,100))
355 , ("Snappy Level", ( 0,100))
356 , ("Shell Type", ( 0, 4))
358 type4 = [ ("Switching", ( 0,100))
359 , ("PCM Balance", (-50, 50))
360 , ("Alg-PCM Balance", (-50, 50))
361 , ("Drum Type", ( 0,100))
362 , ("Slap Level", ( 0,100))
363 , ("Slap Decay", ( 0,100))
364 , ("Slap Color", ( 0,100))
365 , ("Sensitivity", ( 0,100))
367 type6 = [ ("Switching", ( 0,100))
368 , ("PCM Balance", (-50, 50))
369 , ("Alg-PCM Balance", (-50, 50))
370 , ("Curve", ( 0,100))
371 , ("Brightness", ( 0,100))
372 , ("Snappy Decay", ( 0,100))
373 , ("Snappy Level", ( 0,100))
374 , ("Sensitivity", ( 0,100))
377 headInstruments :: [T.Text]
380 , "Dance Kicks w/reverse"
388 , "Dance Kick & Snare 2"
389 , "Kick, Snare & Hat"
392 , "Orch SD to Orchestra BD"
397 , "Orch Snare w/ Cym"
400 , "Multi Powerful Tom"
405 , "Low Tom/ velo Forest"
408 , "Mark Tree Chord w/Thump"
410 , "Tiki Tiki Tom Tom"
411 , "Epic Hi-Toms Head"
414 , "Steel Drum (F-A-B -C-F)"
415 , "Mouth Harp C Drone"
421 , "Conga Hi-Close/Open"
423 , "Conga Lo-Basstone"
428 , "Broken Kalimba (Head)"
432 , "Djembe Closed Slap"
436 , "Iya Boca Open+Slap"
437 , "Itotele Boca Open"
438 , "Okonkolo → Iya (Open)"
439 , "Tom/Iya Drum Corps"
469 , "Low Bull Roar Loop"
470 , "Synth Stab (Key of C)"
472 , "Industrial BD/SD/HH"
475 , "Shaker & Church Bell"
481 rimInstruments :: [T.Text]
483 [ "Multi Pitched BDs"
484 , "2 Tone Dance Kick"
493 , "Deep Tom Tom (Key of C)"
499 , "Dance Kick & Snare 1"
500 , "Dance Kick & Snare 2"
514 , "Broken Kalimba (Rim)"
516 , "Djembe Closed Slap"
523 , "Timbales Lo-Paila"
532 , "Steel Drum (Low F)"
534 , "Udus/ Shaker Accent"
537 , "Velo Accent Shaker"
550 , "Short Finger Cymbal"
562 , "Rain → Thunder Velo SW"
566 , "Timpani w/Orch Hits"
581 , "Low Bull Roar Loop"
582 , "Synth Stab (Key of C)"