The slider on my Kiwi-8P is busted so I'm making a shell to drop sysex commands into it. As with all my audio endeavors, I am making this solely to suit my needs, but the code will be small for anybody to hack to his or her desires.
Had to introduce a delay between parameter transmissions, so this isn't intended for realtime performance. Use CC for that. There's a nice CC:parameter mapping in the file cc.h
that is not used in this code, but is a helpful reference.
Some bounds checking and sanitization when it's easy enough, but don't feed this bad input.
Commands are J/K style and intended to be passed all;on;one;line
, so that each line is a discrete slice of synthesizer state. I've found this condensed view to be very useful in previous musical efforts.
Does not build off of any midi library. Unix philosophy. Wrap with rlwrap
and direct its output to your system's midi port.
cc main.c -o kiwi8p
mv kiwi8p /usr/local/bin
rlwrap kiwi8p 1> /dev/rmidi0
Command | Sysex byte | Description | Args |
---|---|---|---|
w /w. |
20/26 | wave/range of dco1/2 | wave shape: s → saw p → pulse q → square n → noise dco2 can also take sync information: y → sync1 Y → sync2 x → xmod + range of 16/8/4/2 ex: ws16;w.qY2 |
t /t. |
21/27 | coarse tuning of dco1/2 | [-24,24] in half semitone steps |
l /l. |
22/29 | pitch lfo amount for dco1/2 | [0,127] |
e /e. |
23/30 | pitch envelope amount for dco1/2 | [0,127] |
y /y. |
24/31 | key velocity modulation of pitch for dco1/2 | [0,127] |
c /c. |
25/32 | dco1/2 control sources | l{n} → lfo number {n} e{n} → envelope number {n} negative numbers are inverted sources ex: cl1e-2;c.e3l3 |
t: |
28 | dco2 fine tune | [-63,63] correlating to a resolution of +/- 50 cents |
t@ |
33 | voice detuning | [0,127] |
V /V. |
34/35 | mix volume of dco1/2 | [0,127] |
Y |
36 | key velocity modulation of dco2 mix level | [0,127] |
E |
37 | envelope amount over dco2 mix level | [0,127] |
C |
38 | mix envelope source | e{n} → envelope number {n} negative numbers are inverted envelopes ex: Ce-2 |
f: |
39 | high pass filter cutoff | [0,3] |
f |
40 | low pass filter cutoff | [0,4095] yes, it is higher res than the display suggests |
f. |
42 | low pass filter resonance | [0,4095] |
l@ |
44 | filter lfo amount | [0,127] |
e@ |
45 | filter envelope amount | [0,127] |
k@ |
46 | filter key follow | [0,127] |
y@ |
47 | key velocity modulation of filter | [0,127] |
c@ |
48 | filter control sources | l{n} → lfo number {n} e{n} → envelope number {n} negative numbers are inverted sources ex: c@e1l-1 |
v |
49 | vca level | [0,127] |
l: |
50 | vca lfo amount | [0,127] |
c: |
51 | vca control sources | l{n} → lfo number {n} e{n} → envelope number {n} only the lfo can be inverted with a negative number ex: c:e2l-3 |
y: |
52 | key velocity sensitivity for vca | [0,127] |
q /q. /q: /Q /Q. /Q: |
53/57/61/65/69/73 | modulation sources for matrix slots [1,6] | o → off bu → bend up bd → bend down bw → bend lfo switch b → bend full l{n}(u) → lfo number {n}; if 'u' is added to end, lfo is unipolar; bipolar if omitted s{n} → sequence track {n} output c{n} → midi cc number {n}; this is not the cc channel; values [1,8] listen on actual channels [47,54] e{n} → envelope number {n} w → mod wheel d → edit slider v → key velocity n → note a → aftertouch ex: qbu;q.e2;q:s1;Qc7;Q.v;Q:a |
u /u. /u: /U /U. /U: |
54/58/62/66/70/74 | control sources for matrix slots [1,6] | most sources can be inverted if they are prefixed with a '-' (-)o → fixed level (-)bu → bend up (-)bd → bend down (-)b → bend full (-)c{n} → midi cc number {n} s{n} → output of sequence {n} (-)w → mod wheel (-)d → edit slider (-)a → aftertouch ex: ua;u.bu;u:s4;U-w;U.-c3;U:b |
x /x. /x: /X /X. /X: |
55/59/63/67/71/75 | modulation levels of matrix slots [1,6], governed by control sources | [0,127] |
z /z. /z: /Z /Z. /Z: |
56/60/64/68/72/76 | modulation targets of matrix slots [1,6] | o → off p1 → dco1 frequency p2 → dco2 frequency p → both dco frequencies w{n} → wave shape of dco{n} r{n} → frequency ranges of dco{n} m{n} → mix level of dco{n} f. → lowpass filter resonance f: → highpass filter cutoff f → lowpass filter cutoff l{n} → lfo{n} rate e{n} → env{n} speed d → detune amount v → vca level P → portamento rate ex: zp1;z.w1;z:l3;ZP;Z.v;Z:f |
a /a. /a: d /d. /d: s /s. /s: r /r. /r: |
77/82/87 78/83/88 79/84/89 80/85/90 |
attack/decay/sustain/release values of env1/2/3 | [0,127] |
W /W. /W: |
92/96/100 | wave shape of lfo1/2/3 | i → sine t → triangle q → square s → saw S → reverse saw r → random |
R /R. /R: |
93/97/101 | rate of lfo1/2/3 | [0,127] |
D /D. /D: |
94/98/102 | delay of lfo1/2/3 | [0,127] |
N /N. /N: |
95/99/103 | control of lfo1/2/3 | (+){n}, where {n} is one of the following clock sync values 0 → free running 2 → two whole notes 1.5 → dotted whole note 1 → whole note 1.25 → dotted half note 1.2 → half note 1.45 → dotted quarter note 1.4 → quarter note 1.85 → dotted eighth note 1.43 → quarter note triplet 1.8 → eighth note 1.83 → eighth note triplet 1.16 → sixteenth note 1.163 → sixteenth note triplet 1.32 → thirty-second note 1.323 → thirty-second note triplet 1.64 → sixty-fourth note prefixing the number with '+' makes the lfo additive ex: N+0;N.1.32;N:1.43 |
O |
104 | chorus type | [0,2], where 0 is off and {n} is chorus type {n} |
p |
105 | portamento rate | [0,127] |
s@ |
106 | load sequence | [0,8] where 0 doesn't load a sequence, and {n} is sequence {n} |
i |
107 | voice controls | {p}(l)(r) where {p} is one of the following polyphony modes: s → 1 voice per key d → 2 voices per key t → 3 voices per key u → 6 voices per key S → 1 voice per key, but monophonic adding r reassigns voices instead of rotating them adding l engages legato behavior of envelopes ex: ildr |
i. |
108 | voice stealing behavior | o → steal oldest voice n → steal newest voice h → steal highest pitched voice l → steal lowest pitched voice q → steal quietest voice i → ignore any new voice |
A |
109 | arp control | {n}{a} where {n} is an octave range [1,4] and {a} is one of the following: u → play arp up d → play arp down b → play arp up/down r → play arp randomly p → play arp in order of key presses ex: A2u |
A. |
110 | aftertouch routings | (l)(f)(v) in parallel: l → dco lfo f → filter cutoff v → vca level ex: A.lf |
b. |
111 | modwheel routings | (l)(f)(v) in parallel: l → dco lfo f → filter cutoff v → vca level ex: b.fvl |
b: |
112 | modwheel level | [0,127] |
S |
113 | performance switches | (a)(s)(h) in parallel: a → enable arp s → play sequence h → hold note ex: Sash |
T |
114 | internal clock rate | {n} ∈ [1,255] correlating to [5,300]bpm; 0 keeps system clock time; lower rates are {n} + 5, while resolution decreases beyond 210 or so ex: T118 → 123bpm |
T. |
116 | arp clock divide | 1.2 → half note 1.4 → quarter note 1.8 → eighth note 1.85 → eighth note half swing 1.89 → eighth note full swing 1.83 → eighth note triplet 1.16 → sixteenth note 1.165 → sixteenth note half swing 1.169 → sixteenth note full swing 1.163 → sixteenth note triplet 1.32 → thirty-second note 1.323 → thirty-second note triplet 1.64 → sixty-fourth note |
T: |
117 | sequence clock divide | 1.2 → half note 1.4 → quarter note 1.8 → eighth note 1.85 → eighth note half swing 1.89 → eighth note full swing 1.83 → eighth note triplet 1.16 → sixteenth note 1.165 → sixteenth note half swing 1.169 → sixteenth note full swing 1.163 → sixteenth note triplet 1.32 → thirty-second note 1.323 → thirty-second note triplet 1.64 → sixty-fourth note |
b |
118 | bend range | [0,127] representing a +/- octave span at 127 |
S. |
119 | sequence control | (o)(k)(t)(r)(c) in parallel: o → oneshot mode k → key down play t → auto transpose r → auto transpose reset c → sequence complete ex: S.kt |
S: |
120 | sequence transpose | [-12,24] semitone transpose of sequence; only works if S.t is enabled |
A: |
121 | analog feel level | [0,127] |