forked from yannseznec/SoundGamesFinalProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bonk_tutorial_6_volume_sorting.pd
80 lines (80 loc) · 1.95 KB
/
bonk_tutorial_6_volume_sorting.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
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
#N canvas 12 28 1200 850 16;
#X obj 152 165 bonk~;
#X obj 114 82 adc~;
#X msg 184 77 minvel \$1;
#X obj 189 20 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 12700 1;
#X obj 39 230 bng 40 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 197 197 unpack 0 0;
#X floatatom 295 233 5 0 0 0 - - -;
#X text 357 234 raw volume;
#X obj 296 266 / 50;
#X text 356 265 divide down to a set of low numbers;
#X obj 295 300 i;
#X text 341 300 convert to integer;
#X floatatom 294 332 5 0 0 0 - - -;
#X obj 294 363 t f;
#X text 357 331 resulting number \, higher integers are higher volume
;
#X text 343 362 bugfix thing;
#X obj 292 409 sel 1 2 3 4;
#X obj 111 450 t b b;
#X msg 90 489 1;
#X msg 143 488 open sounds/musicbox.wav;
#X obj 111 527 readsf~;
#X obj 96 583 dac~;
#X obj 427 465 t b b;
#X msg 406 504 1;
#X obj 427 542 readsf~;
#X obj 412 598 dac~;
#X msg 460 503 open sounds/drum.wav;
#X obj 714 458 t b b;
#X msg 693 497 1;
#X obj 714 535 readsf~;
#X obj 699 591 dac~;
#X msg 748 496 open sounds/cymbal.wav;
#X obj 888 564 t b b;
#X msg 867 603 1;
#X obj 888 641 readsf~;
#X obj 873 697 dac~;
#X msg 923 602 open sounds/gun.wav;
#X connect 0 0 4 0;
#X connect 0 1 5 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 5 1 6 0;
#X connect 6 0 8 0;
#X connect 8 0 10 0;
#X connect 10 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 16 0;
#X connect 16 0 17 0;
#X connect 16 1 22 0;
#X connect 16 2 27 0;
#X connect 16 3 32 0;
#X connect 17 0 18 0;
#X connect 17 1 19 0;
#X connect 18 0 20 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 20 0 21 1;
#X connect 22 0 23 0;
#X connect 22 1 26 0;
#X connect 23 0 24 0;
#X connect 24 0 25 0;
#X connect 24 0 25 1;
#X connect 26 0 24 0;
#X connect 27 0 28 0;
#X connect 27 1 31 0;
#X connect 28 0 29 0;
#X connect 29 0 30 0;
#X connect 29 0 30 1;
#X connect 31 0 29 0;
#X connect 32 0 33 0;
#X connect 32 1 36 0;
#X connect 33 0 34 0;
#X connect 34 0 35 0;
#X connect 34 0 35 1;
#X connect 36 0 34 0;