Archive: two scopes from one superscope


23rd March 2007 03:55 UTC

two scopes from one superscope
hey, I was wondering if it were possible to have one superscope perform the functions of two superscopes, mainly can you divide a superscope in 2, and have one side display the left channel, and have the opposite side display the right channel? I've been messing around and one possible solution I came up with is this:

x = if(equal(min(i,.5),.5),getspec(i,0,2),getspec(i,0,1));

because piR's guide, and PAK-9's guide both say that i is the relative position of the point drawn, from 0 to 1, but, sadly, that particular code always triggers false, if I change i to .5 or higher then it will trigger true.
is there something I'm doing wrong?
the whole ss is

init
n=h*2;

point
y = i;
x = if(equal(min(i,.5),.5),getspec(i,0,2),getspec(i,0,1));


23rd March 2007 17:37 UTC

Drop the equal(min( thingey and use the above() function instead; that would make (working sample):

init
n=h*2+2
//+2 because you want just as many lines as you have pixels, not points.
//(lines=points-1)

frame
p=0
//needed for the skip() function

point
skip=equal(p,ceil(n*.5)+1);
//remove the line between the two scopes.
//this line can also be used if n changes, but not if the both halfs don't have the same amount of points.

y=if(below(i,.5), //seperate the line in two equal parts: ---|---
i*4-1, //define y for the first part (left)
i*4-3); //define y for the second part (right)

x=below(i,.5)*getspec(i*2,0,1)*.5-.5;
//define x for the first part (left)
x=if(above(i,.5),getspec(i*2-1,0,2)*.5+.5,x);
//define x for the second part (right)
if you don't understand what I'm doing with y, just enter some values for i and see what it does.

What I'm basically doing with getspec() in x is multiplying i by two, and then I either use the first half (0 to 0.5 of i, now 0 to 1), or the second half (>0.5 to 1 of i; now >1 to 2)

I hope this helps

23rd March 2007 19:30 UTC

that works excellently, thanks for your help. I had to modify the code a bit, because when I wrote it, I was going to have the vertical scope, but I decided to go with a timescope-ish effect. I have [code]init
n=h/4;

point

y=if(below(i,.5),i-.5, i/2-.5);
green=if(below(i,.5),-getspec(i*4,0,1)+1,0);
red=if(above(i,.5),-getspec(i*2-1,0,2)+1,0);
blue = green;
x=.99;
and I have a movement that does

x=x+2/sw. I've got 5 other superscopes doing the same, four of them I need to combine into 2, which shouldn't be a problem with your code. if I ever release these, I'll be sure to note you as helper. this particular preset isn't going to be all flash and bang though. purely functional, so I'm not sure how many would like it.


24th March 2007 00:20 UTC

also
Shreyas_Potnis has a post or two in the tips and tricks section on two in one scopes.
me thinks its on page 4.