Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Bitwise Operations for Integer Signals

There are also C-style operators for manipulating the bits in each sample of an integer signal:

$\displaystyle \texttt{<< >> \vert \& xor}
$

For example, & can be used to apply a bit mask:
  ramp = _~+(1); // integer ramp 1,2,3,...
  process = ramp & ((1<<8)-1); // restart ramp every 256 samples


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download aspf.pdf
[Comment on this page via email]

``Audio Signal Processing in Faust'', by Julius O. Smith III
Copyright © 2023-08-16 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA