View Single Post
Old 1st May 2003, 13:14   #80
AVS Axer
Member
 
AVS Axer's Avatar
 
Join Date: Feb 2003
Location: Ozshtrayleeuh
Posts: 98
switches:

---------------
binary: sw=1-sw
---------------
'sw' will switch from 1 to 0 every time the code is run. Because it is binary, you can use simple maths to get ANY two numbers from this switch:
sw2=sw*(difference between desired numbers)+(lowest desired number)

Superscope example (use dots, not lines):
sw=1-sw;
y=getosc(i,0,0)*0.2+(sw-0.5)*0.5;
x=2*i-1;

-------------------------------------
Other Switches: t=t+1; sw=t%ns;
Where ns is the number of switches.)
---------------------------------------
sw will progress through 0 to ns and then loop.

Superscope example:
t=t+1;
sw=(t%7);
v=getspec(sw/7+i/7,0,0);
x=v*0.2+((sw*0.2)-0.6)*1.5;
y=2*i-1;
AVS Axer is offline   Reply With Quote