aboutsummaryrefslogtreecommitdiff
path: root/doc/help/cyclone/bitshift~-help.pd
blob: 4e3d19786225cc7aa0e186b4138e7167719ecccd (plain)
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
#N canvas 1491 227 811 594 10;
#X declare -lib cyclone;
#X text 308 410 see also:;
#X text 24 -18 Bitwise shift signal operator.;
#X floatatom 88 197 0 0 0 0 - - -;
#X msg 88 217 shift \$1;
#X floatatom 430 176 0 0 0 0 - - -;
#X msg 430 196 mode \$1;
#X obj 60 281 clip~ -1 1;
#X floatatom 375 176 0 0 0 0 - - -;
#X msg 375 196 shift \$1;
#X text 64 132 bitwise operation on a signal as bits;
#X floatatom 324 176 0 0 0 0 - - -;
#X obj 324 196 sig~ 1;
#X text 275 351 modes \; mode 0: treat floating point signal input
as raw 32 bit value \; mode 1: convert floating point signal input
to integer \;;
#X floatatom 89 301 0 0 0 0 - - -;
#X obj 60 320 *~ 0.2;
#X obj 60 362 dac~;
#X obj 62 177 cycle~ 440;
#X text 275 325 args: <shift> <mode>. both default to 0;
#X text 325 141 bitwise operation on signals as integers;
#X text 15 4 Performs bitwise operations on a floating point signal
as bits or as an integer. Note that if you are converting the floats
to ints and back that single precision floating point values only retain
24 bits of integer resolution. The floating point bits from left to
right are <1 sign bit> <8 exponent bits> <23 mantissa bits>. Positive
shift values correspond to left shifting that number of bits \, negative
shift values correspond to right shifting that number of bits.;
#X obj 401 23 import cyclone;
#X obj 324 220 bitshift~ 1 1;
#X obj 325 274 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-262144 -1 -1 2 256;
#X obj 62 246 bitshift~ 8 0;
#X obj 324 249 Snapshot~ 100;
#X connect 2 0 3 0;
#X connect 3 0 23 0;
#X connect 4 0 5 0;
#X connect 5 0 21 0;
#X connect 6 0 14 0;
#X connect 7 0 8 0;
#X connect 8 0 21 0;
#X connect 10 0 11 0;
#X connect 11 0 21 0;
#X connect 13 0 14 1;
#X connect 14 0 15 0;
#X connect 14 0 15 1;
#X connect 16 0 23 0;
#X connect 21 0 24 0;
#X connect 23 0 6 0;
#X connect 24 0 22 0;