[PD] "bit" object?

Kjetil S. Matheussen k.s.matheussen at notam02.no
Tue Jul 8 17:33:56 CEST 2003


On Tue, 8 Jul 2003, Tim Blechmann wrote:

> it's also possible to create an object that's using bitwise AND
> operations:
>
> such as:
>
> inlet
> |______________________..
> |             |        ..
> & N1          & N2     ..
> |             |        ..
> == N1         == N2    ..
> |             |        ..
> outlet        outlet
>
> with Nx=1,2,4,8,16,32,64...
>
> it should work similar to pix abstraction, but i suppose that's
> cheaper ;-)
>
> and it's easyer if you are only looking for a single bit...
>

Guess I can't stop promoting k_cext:

[ k_cext 1 16;
  int i;
  RANGE(i, 0, 16) BEGIN;
  . O(i, (I(0) & (1<<i))>0);
  ENDRANGE ]


:)


-- 





More information about the Pd-list mailing list