-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftomb.pd
36 lines (36 loc) · 993 Bytes
/
ftomb.pd
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
#N canvas 975 193 561 292 12;
#X obj 44 98 -;
#X obj 76 98 int;
#X text 168 98 get decimal (cents);
#X obj 44 127 * 8191;
#X obj 44 156 / 12;
#X text 168 156 scale to device pitch bend semitone range;
#X text 168 127 scale to pitch bend midi bit range;
#X text 168 185 only ints work;
#X obj 11 11 inlet;
#X obj 11 69 t f f f;
#X obj 11 40 ftom;
#X obj 11 98 int;
#X obj 11 243 outlet;
#X obj 71 243 outlet;
#X text 99 11 ftomb - input a frequency \, outputs a midi note and
corresponding pitch bend (as integers \, safe to send out);
#X text 99 56 \$1 - interval of the pitch bend on the receiver;
#X obj 447 56 loadbang;
#X obj 447 85 f \$1;
#X obj 447 114 select 0;
#X obj 44 185 expr round($f1);
#X connect 0 0 3 0;
#X connect 1 0 0 1;
#X connect 3 0 4 0;
#X connect 4 0 19 0;
#X connect 8 0 10 0;
#X connect 9 0 11 0;
#X connect 9 1 0 0;
#X connect 9 2 1 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 1 4 1;
#X connect 19 0 13 0;