-
Notifications
You must be signed in to change notification settings - Fork 3
/
mercuryKS.ini
552 lines (468 loc) · 14.4 KB
/
mercuryKS.ini
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# ======================================================
# mercury.ini
#
# Mercury extension for CodeKlavier
# ======================================================
# ======================================================
# Midi Setup
[midi]
# midi options of the device to use
port: 0
# IAC driver loopback:
# noteon_id: 144
# M-audio midi controller:
# noteon_id: 152
# noteoff_id: 128
# pedal_id: 184
# pedal_midi_sostenuto: 7
# Yamaha Clavinova:
noteon_id: 144
noteoff_id: 128
pedal_id: 176
pedal_midi_sostenuto: 66
# Casio keyboard:
# pedal_midi_sostenuto: 67
# ======================================================
# Mapping Mode 1-1
[Hello World]
# Just play a single note, not using.
# Could be useful to type in single numbers and non-alphanumeric characters
# simple alphanumeric & commands 1-1 mapping used Hello World module
# midinumber : alphanumeric or command mapping
22: backspace
21: enter
69: backspace
70: 1
71: 2
72: 3
73: 4
74: 5
75: 6
76: 7
77: 8
78: 9
79: 0
80: _
81: a
82: b
83: c
84: d
85: e
86: f
87: g
88: h
89: i
90: j
91: k
92: l
93: m
94: n
95: o
96: p
97: q
98: r
99: s
100: t
101: u
102: v
103: w
104: x
105: y
106: z
108: space
toggle: 107
toggle_callback: none
# ======================================================
# Shortcuts
# first key that remains pressed, second key
[shortcuts]
eval: none
delete_line: alt, x
eval_manual: alt, enter
eval_manual2: alt, enter
jump_start: alt, up
jump_end: alt, down
jump_start_line: alt, left
jump_end_line: alt, right
copy_line: alt, c
insert_paste_line: alt, v
paste_replace_line: alt, p
arrow_up: up
arrow_down: down
arrow_left: left
arrow_right: right
delete: backspace
delete2: backspace
enter: enter
cancel_line: alt, y
#cancel_line: alt, /
# Optional: map the shortcuts to snippets defined in the
# sections below to replace default evaluation
[shortcuts mapping]
cancel_line: cancel_line
delete_line: delete_line
delete: delete
delete2: delete2
eval_manual: eval_manual
eval_manual2: eval_manual2
jump_start: jump_start
jump_end: jump_end
jump_start_line: jump_start_line
jump_end_line: jump_end_line
copy_line: copy_line
insert_paste_line: insert_paste_line
paste_replace_line: paste_replace_line
enter: enter
arrow_up: arrow_up
arrow_down: arrow_down
arrow_left: arrow_left
arrow_right: arrow_right
# simple alphanumeric & commands 1-1 mapping used in
# Motippets module and evaluation shortcut
[Motippets]
66: motippetssc-evaluate
# midi note register limits (21 <= mid_low is low register,
# between mid_low and mid_hi is mid register, > mid_hi is hi)
[Motippets register division]
mid_low: 44
mid_hi: 78
[chordal main motifs midi]
set_tempo: 79, 84, 87, 84, 87, 79
#jump_start: 99, 102, 103
#arrow_up: 91, 90, 87
# can only call this once !!!- not anymore!!!
[melodic main motifs midi]
scale_cmin: 60, 62, 63, 65, 67, 68, 71, 72, 71, 68, 67, 65, 63, 62, 60, 62, 63, 65, 67, 68, 71, 72
scale_cphryg: 60, 61, 63, 65, 67, 68, 70, 72, 70, 68, 67, 65, 63, 61, 60, 61, 63, 65, 67, 68, 70, 72
# ======================================================
# Conditional Motifs !!! IGNORE FOR NOW !!!
[chordal conditional motifs midi]
[melodic conditional motifs midi]
conditional_2: 48, 51, 55, 60, 67, 72, 75
conditional_3: 75, 72, 67, 63, 60, 55, 48
conditional_1: 79, 84, 87, 91, 90
conditional_4: 31, 35, 39, 43, 42
[chordal conditional results motifs midi]
conditional_result_2: 23, 24, 25
conditional_result_loop_stop: 24, 27, 31
conditional_result_mpamount: 96, 99, 98
conditional_result_v_color: 96, 90, 91, 94
[melodic conditional results motifs midi]
conditional_result_3: 68,74,74,63,69
#conditional_result_gomb: 41, 40, 38, 36, 35, 33, 31, 29, 28, 26, 24, 23, 21
conditional_result_5: 26,23,23
#conditional_result_hat: 96, 93, 94, 95, 96, 93, 94, 95, 96, 93, 99
conditional_result_visuals: 96, 97, 97, 97
conditional_result_pillars: 96, 99, 97, 98
conditional_result_multiples: 96, 90, 91, 94, 96, 99, 98
# ======================================================
# Melodic Motifs
# > Anne sets motifs
[melodic mini motifs]
test: 60, 62, 64, 65
tone_mel3: 98, 91, 96, 99
#bell_time: 31, 32, 36, 39, 31, 32, 24
set_volume: 48, 50, 46, 51
set_all: 84, 86, 82, 87
webcam: 90, 99, 90
# Sawtooth bass pulse - eventually a trem as well
set_bass_wave: 40, 39, 41, 40, 39, 39
set_bass_lfo_value: 38, 40, 39, 38, 38
delay_set: 70, 70, 70, 70
time_set: 71, 71, 71, 71
speed_set: 72, 72, 72, 72
speed_set_neg: 84, 84, 84, 84
reverb_set: 34, 34, 34, 34
lfo_set: 38, 38, 38, 38
gain_set: 39, 39, 39, 39
shape_set: 86, 86, 86, 86
time_set2: 83, 83, 83, 83
beat_set: 35, 35, 35, 35
enter: 24, 24, 24, 34
#new_bell: 39, 36, 31, 38, 32, 31, 39, 36, 38, 32, 31, 24, 24
new_kick: 92, 96, 91, 99, 92, 96, 91, 92, 87, 91, 92, 96, 91, 99, 91, 92, 87, 87, 91, 84
kick_beat: 32, 32, 32, 32, 42
kick_beat2: 44, 44, 44, 44, 30
set_kick_fotf: 56, 56, 56, 56, 68
new_snare: 56, 60, 63, 62, 55, 56, 60, 63, 62, 55
tone_mel1: 98, 91, 96, 103, 99, 104, 96
delete: 60, 60, 61
delete2: 96, 97, 98
eval_manual: 87, 97, 99
eval_manual2: 25, 39, 27
cancel_line: 99, 99, 99, 103
arrow_left: 63, 66, 67, 60
arrow_right: 66, 67, 70, 72
new_bass: 24, 39, 32, 31
set_bass_lfo: 39, 38, 40, 39, 38, 38
delete_line: 72, 46, 60
copy_line: 95, 94, 96, 92, 95
insert_paste_line: 71, 70, 72, 68, 71
paste_replace_line: 35, 34, 39, 32, 35
div2: 48, 50, 51, 51
setall: 24, 26, 27, 27
mult2: 72, 74, 75, 75
meshwave: 84, 86, 87, 87
sub: 24, 25, 26, 24, 25, 26
sample: 36, 42, 32, 39, 38
hat_dub: 96, 99, 98, 97, 96, 99, 98, 97, 96, 99, 93
hat: 96, 93, 94, 95, 96, 93, 94, 95, 96, 93, 99
# Tone arpy
new_tone: 55, 60, 63, 65, 67
set_tone_dly: 48, 49, 55
set_tone_shp: 48, 49, 56
tone_mel2: 98, 91, 96, 104, 99, 103, 96, 96
kill: 84, 96, 95, 92, 91, 89, 87, 86, 84
all: 24, 35, 32, 31, 29, 27, 26, 24, 34, 24
cb: 103, 104, 103, 103
[chordal mini motifs]
number: 60, 62, 67, 69
numberinverse: 84, 86, 91, 93
set_tempo_val: 96, 98, 103, 105
set_snare: 56, 60, 63, 62
new_bell: 24, 27, 26, 21
#moved from main motifs
arrow_up: 91, 90, 87
arrow_down: 43, 42, 39
jump_start_line: 67, 63, 66
jump_end_line: 66, 67, 70
jump_end: 31, 27, 30
jump_start: 99, 102, 103
set_bell: 39, 35, 31
set_kick: 92, 96, 91
set_tone: 60, 55, 67, 65, 63
set_hat: 96, 93, 94
#color_range: 96, 90, 91, 94
#amount_set: 96, 99, 98
# ======================================================
# Code Snippets
# > The output of the corresponding motif (unique names)
[snippets code output]
# corresponding code snippet with same name as in motifs
# Parameters that need to be changed with the scales
# time(), gain(), fx(delay <one-param>),
# fx(delayTime), fx(delayFb), speed()
# Global Settings
test: test
scale_cmin: set scale minor_harmonic c
scale_cphryg: set scale phrygian c
set_tempo: set tempo 115
#mini_set_tempo: // set tempo
set_all: set all
sample: new sample
hat_dub: hat_dub time(1/6 1/3) name(dub)
# Bell Soundscape
new_bell: new sample bowl_hi time(5) gain(0.7) speed(0.125) fx(reverb 1.5 18) name(bell)
kill: kill
all: silence
cb: )
# still checkset_bell_verb: set bell fx(reverb 1.5 18)
set_bell_dly: set bell fx(delay 1/2 2/3 0.9)
# speed to 1
set_bell_spd: set bell speed(~9)
# lfo with 3/16th division
set_bell_lfo: set bell fx(lfo ~5 down)
# gain down
set_bell_gain: set bell gain(~1)
bell_time: // set bell time
set_bell: set bell
set_kick: set kick
set_tone: set tone
set_hat: set hat
hat: new sample hat_min time(~6 1/8) gain(0.43) name(hat)
# speed = 1/4, gain = 0.4
# Kick heartbeat-ish
kick_beat: ring kickBeat hex(90000000)
new_kick: new sample kick_909 time(1/16) beat(kickBeat 2) name(kick)
kick_beat2: ring kickBeat hex(8890)
# set kick to four-on-the-floor
set_kick_fotf: set kick time(1/4) beat(1)
sub: kick_sub
#drum
new_snare: new sample snare_dub time(2 15/16) fx(reverb 1.5 16) fx(lfo 3/16) name(snare)
set_snare: set snare
# Tone arpy
tone_mel1: ring melody sine(20 1 0 12)
# speed = 1 per bar, shape attack = 180ms, release = 1ms
new_tone: new synth sine note(melody 2) time(~9 1/16) shape(320.94) name(tone)
# Delay time is ~ 3/16th
set_tone_dly: set tone fx(delay 23.11)
# Set tone to sharper attack = 1ms release = 95ms
set_tone_shp: set tone shape(95.8) time(~8 1/16)
tone_mel2: ring melody [20 11.2 0 24]
tone_mel3: // ring melody sine
number:
numberinverse:
set_tempo_val:
set_bass_lfo_value:
delay_set:
time_set:
speed_set:
speed_set_neg:
reverb_set:
lfo_set:
gain_set:
shape_set:
time_set2:
set_volume: set
beat_set:
color_range:
amount_set:
webcam:
div2: /2
setall: set all
mult2: *2
meshwave: new visual meshwave
# Sawtooth bass pulse
new_bass: new synth saw shape(-1) time(2) fx(filter low 3 1400 90 0.4 0.5 0.1) name(bass)
set_bass_wave: set bass wave2(square 0.4993)
# set lfo speed to 1/4th
set_bass_lfo: set bass fx(lfo ~4 up)
# ===========================================
# Midi output basic instrument
# Change the port argument to your port-name
# Print the portnames to the Max-console with "set midi getPorts"
new_midi: new midi "the midiport name" time(1/8) name(toPiano) note(0 1)
# Some melodic and rhythmic rings
midi_mel1: ring mMelody cosine(32 10.85 0 24)
midi_rtm1: ring mRhythm [1 1 0.3 1 0.7]
# Apply the rings to the midi instrument output
set_midi_melody: set toPiano note(mMelody 1)
set_midi_rhythm: set toPiano beat(mRhythm)
# You can also change the note-duration with: length()
# You can also change the midi-channel with: out()
# I'm working on a function where you can also use pitchbend, but not available yet
# ===========================================
#conditionals
conditional_1: //setting up a conditional: IF number of notes played is more than 100 in...
conditional_4: //setting up an ONGOING conditional: IF number of notes played is more than 150 in...
conditional_2: //setting up an ONGOING loop that checks the range
conditional_3: //setting up a conditional: IF range is less than...
# motif name : code, flag [osc | reset | gomb], [osc address | motif_name to reset], optional flag [grab_value | a value], optional flag [random1 | random2]
#conditional_result_hat_comment:// if true -> start hat, if false -> stop hat
#conditional_result_hat_true: new sample hat_min time(~6 1/8) gain(0.43) name(hat)
#conditional_result_hat_false: set hat gain(0)
# conditionals for visuals
conditional_result_visuals_comment:// if true -> start mesh, if false -> stop mesh
conditional_result_visuals_true: set visuals mesh 1
conditional_result_visuals_false: set visuals mesh 0
conditional_result_pillars_comment:// if true -> start pillars, if false -> stop pillars
conditional_result_pillars_true: set visuals pillars 1
conditional_result_pillars_false: set visuals pillars 0
conditional_result_multiples_comment:// if true-> start multiples, if false -> stop multiples
conditional_result_multiples_true: set visuals multiples 1
conditional_result_multiples_false: set visuals multiples 0
conditional_result_mpamount_comment: //changes amount of squares
conditional_result_mpamount_true: false, osc, amount, 1,
conditional_result_mpamount_false: false, osc, amount, -1,
# conditionals for visual color range
conditional_result_v_color_comment://matches color range to piano range
conditional_result_v_color_true: true, osc, range, grab_value,
conditional_result_v_color_false: true, osc, range, grab_value,
conditional_result_gomb_comment: Activate self-destruct mechanism
conditional_result_gomb_true: killAll, gomb
conditional_result_gomb_false: //nothing
conditional_result_loop_stop_comment: stop perpetual conditionals
conditional_result_loop_stop_true: //CODEKLAVIER loop_stop, loop_stop
conditional_result_loop_stop_false: //CODEKLAVIER loop still going
[snippets code output callback]
# motif_name : code output
# (code to be evaluated after the normal code output, for example: for unmapping)
# (duplicate names won't work!)
#mini_set_tempo: callback mini
[snippets special flags]
# motif name, flag [reset, ] , flag [motif_name to reset, ]
conditional_result_2_true: reset, motif_1
mini_set_pixel: callback mini
[motif counter]
playlimit: 10000
[snippets for tremolos]
# 4 values (also whitespace) separated by commas are allowed:
# the code expression to print, a prefix on the tremolo value, a suffix for the value, linear scaling in the form "minmax(x-y)"
# the code expression is required at least. scaling should ALWAYS be the last value if used. scaling accepts a second argument for
# the output scaling: A third argument in the minmax will be the exponent for the scaling function.
# example with linear scaling:
# myvar = ,( , ),minmax(0-100)
# will result in myvar = ( 30 )
# example 2 wuht exponential scaling:
# myvar =,minmax(0-100 2)
# bell_time: set bell time,(,)
set_tempo_val: set tempo ,,,minmax(10-200)
number:,
numberinverse: 1/,
set_bass_ _value: set bass fx(lfo ,, up),minmax(0.0625-1.0)
delay_set: fx(delay ,,),minmax(1.0-200.0 2)
time_set:time(~,,)
speed_set:speed(,,),minmax(0.125-2.0)
speed_set_neg: speed(-,,),minmax(0.125-20.0 3)
reverb_set: fx(reverb 0.8 ,,)
lfo_set: fx(lfo ~,,)
gain_set: gain(,,),minmax(0.0-2.14)
# exp should be a 3 in shape().minmax
shape_set: shape(,,),minmax(1-5000 3)
time_set2: time(~,, 1/16)
set_volume: volume ,, 5000,minmax(0.0-1.0)
beat_set: beat(,,),minmax(0-1.5)
#color_range: set visuals mp color range ,, ,minmax(0-1)
#amount_set: set visuals mp all amount ,,
tone_mel3: ring melody sine,(,)
webcam: set visuals webcam brightness ,, ,minmax(0.1-1 2)
[conditionals settings]
#name : type [note_count, range_more_than, range_less_than], [perpetual (true | false): 1 | 0], optional settings [totalnotes, ]
conditional_1: note_count, 0, 100
conditional_2: range_more_than, 1
conditional_3: range_less_than, 0
conditional_4: note_count, 1, 150
# make volume,
[motippets display settings]
#motif_name : display column id
#mini_set_tempo: 2
time_test: 2
tone_mel3: 2
bell_time: 2
number: 2
numberinverse: 2
set_bass_lfo_value: 2
delay_set: 2
time_set: 2
time_set2: 2
speed_set: 2
speed_set_neg: 2
reverb_set: 2
lfo_set: 2
gain_set: 2
set_volume: 2
color_ramge: 2
amount_set: 2
webcam: 2
[motippets random limits]
# name : bottom limit, upper limits.
random: 50, 51
random1: 0.01, 1.2
random2: -2, 10
# NOTE: random is also used for range_counter conditional limits
# random2 multiplies by a value extracted from the function where it is used
[ckalculator]
shift: off
wrong_note_tolerance: 1
[lambda]
# lambda function : midi number mapped to the function
evaluate_function: 59
identity_midi: 23
select_first_midi: 0
select_second_midi: 0
successor_midi: 83, 95
predecessor_midi: 0
add_midi: 107
subtract_midi: 71
mult_midi: 0
division_midi: 0
greater_than_midi: 47
equality_midi: 35
less_than_midi: 0
[articulation]
# articulation name : threshold in seconds
chord: 0.02
staccato: 0.35
sostenuto: 0.8
[ar]