[PD] Binary - integer conversion

Steffen stffn at dibidut.dk
Fri Mar 16 19:07:12 CET 2007

On 16/03/2007, at 18.44, David Powers wrote:

> Hello,
> Is it possible to somehow convert back and forth between integer and
> binary in PD?
> My idea, is to represent simple drum machine style rhythms as binary
> numbers. [101010001011]. Ok, so if this were a float, it would be
> trivial to do a common task and shift the rhythm left or right. I
> think, that other rhythmic variations would also be quite fast to
> implement using this system, you can do binary math instead of list
> operations which should be much faster, I assume.

I think you want to have a look at the bitwice operators &,&&,|,||,<<  
and >>. See also http://en.wikipedia.org/wiki/Bitwise_operation

Hope this helps.

More information about the Pd-list mailing list