[LAU] logical AND in Faust

Bjoern Lindig bjoern.lindig at googlemail.com
Mon Nov 30 14:38:12 EST 2009


Hi,

I tried to post this to faust-users-list, but since I changed my email-adress 
this was refused. Now, after spending a week of "awaiting moderator approval", 
I decided to post my question here, and I hope that some of the faust-guys 
might be around.

I have a problem understanding this piece of faust-code:

index( n ) = &( n - 1 ) ~ + ( 1 );

It is from the faust-soft-computing.pdf. I do understand that it works like a 
counter and I think it should jump back to 0 when it reaches n - 1. But 
what exactly is the logical AND operator doing? In the quick reference it is 
sayed, that primitives behave like their C counterpart. O.k. I don't have any 
experience in C, but I realy tried to figure this out. To me it seemed, that 
the "&" operator in C would give back the smaller value of the two compared. 
So in this case it would give pack the line from 0 to n-1 and then continue 
with streaming n-1. But that would not make any sense if it is used in a 
delay-line, to calculate the read/write index, does it? 

Please correct me if I missunderstood something and thank you for help.

Kind regards,

Bjoern



More information about the Linux-audio-user mailing list