I'm rather new to AVS and I've been wondering, is there any sort of simple explanation posted somewhere about Superscope? I've seen it used to great effect, but I have no idea how to get started on making my own. Suggestions?
Announcement
Collapse
No announcement yet.
Superscope...any help out there?
Collapse
X

Hmm...
You know the syntax don't you?
= to assign a var to either
x, y, i, v, ect...
; ends a statement
x is the line on X, try writing " x=i0.5; " in a superscope.
y is the vertical line, try changing " x=i0.5; " to " y=i0.5: ".
v is used to read the sound, try writing "x=i*21; y=v;" to get an example of this.
I is what creates the line, without it you'll just get a dot. try " x=0; " for an example.
to make a moving line use "x=sin(t)i", in "frame" write "t=t+0.02", this will add 0.02 to "T" on each frame. sin/cos/others closes it into the box so it won't go out of it. I assume you know math here.
x and y both go from 1 to 1, where 1 on both is the top left corner and one is bottom right.
That's the basics for ya, try continuing on this yourself.
Linus


Different explanation
I found Linus' explanation to be a bit unclear so here's my way of explaining the superscope:
A superscope is basically a renderer that draws either dots, or the lines between these dots. You have to write code that, at the end, outputs a set of x,y coordinates for each point to be drawn. X ranges from 1 to 1 and is the horizontal coordinate, Y ranges from 1 to 1 and is the vertical coordinate. Some examples:
(0,0)  the center of the AVS screen
(1,1)  the topleft of the AVS screen
(0,1)  the center of the bottom border of the AVS screen
(0.8,0.9)  a point near the bottom right
The variable n is used to set the number of points to calculate each frame. Higher n means slower presets, so don't use huge numbers if it's not needed.
The variable i is different for each point and is a percentage that tells you which point you're drawing. For example:
 first point: i=0 (0%)
 last point: i=1 (100%)
 the 50th point of a 150 point superscope: i=0.33333... (33%)
The variable v is also different for each point and contains the current sound value for this point (either oscilloscope or spectrumdata, depending on your choice).
If you click the 'help' button, you'll see all the functions you can use. Experiment with them if you don't know what they do exactly.
So now we'll make a basic superscope:
Init: n=300;t=0;tpi=acos(1)*2;
Beat: t=t+rand(200)/50
Frame: t=t0.05;rad=sin(t)/2+0.5
Point: x=cos(i*tpi)*(rad+v/5);y=sin(i*tpi)*(rad+v/5)
This will seem very complex at first, but let's look at it step by step:
Init  First we set n to 300, so that the superscope draws 300 different points. We also set the variable t to 0. Then, we set the variable tpi to twice the arccosine of 1. If you do the math, that means 2 times Pi (6.28....). Don't worry, it's just a trick to prevent you from having to type the number pi yourself, which is a useful number.
On Beat  Every beat, the variable t will be increased by a random integer number from 0200, divided by 50. So that means a random decimal number from 0.00 to 4.00.
Per Frame  Every frame we decrease the t value slightly. We also calculate rad by taking the sine of t and scaling it a bit. If you know that a sine is a repetive waveshape and that t is decreased slightly each frame, then you'll understand that the rad value will slowly pulse from 0 to 1 and back, except every beat. Then t gets modified drastically and the rad value jumps.
Per Point  Here we do the actual points. In our equation x and y are coordinates of a point on a circle. The circle has radius rad plus the current soundvalue divided by 5. To make sure we traverse a full circle, we multiply i (range 01) with 2 times pi, so we get a range of 06.28...
Now you have a superscope that draws a spectrum or oscilloscope circle with a jumpy radius.
Another aspect of the superscope is colour. You can either use the (boring) color selector at the bottom, or you can write your own equations for the variables red, green and blue. They range from 01 and contain the value for their color. Let's spice up our superscope by adding this to the "on beat" equation:
cr=rand(100)/100;cg=rand(100)/100;cb=rand(100)/100;
And this to "per frame":
red=cr;green=cg;blue=cb;
What's going on here? Every beat we set cr, cg and cb to a random value in the range 01. Every frame, we assign these three to red, green and blue. Couldn't we just assign them directly 'on beat'? Nope... AVS resets them every frame with the color defined by the colorselector at the bottom.
So there you have your own groovy, colorchanging superscope. It looks neat if you remove the tchanging on beat and combine it with a Trans / Water filter.
Comment


yes, it is possible but a whole lot of work, especially(sp) when using 3D scopes.. here's an example that siddharta_one gave me once, but try to get Deamon's newest pack (hypernation) too, it has a 3D rendered cross..Attached FilesJesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever
Comment


OK, had a look at both the box example and Deamon's cross. It's for the Christian vis thing, so both of them help.
EDIT: I'm still unsure of how to determine the coordinates for each pixel, if ayone can help by creating a vis with just 2 pixels in different postitions, it would be much appreciated.Last edited by Braininator; 12 January 2004, 10:59.
Comment


It's easy to do. All you have to is use a custom point count then use equal( to set the locations.
In Init
code:
Xloc1=.5;//sets the X coordinate of our first point to .5
Xloc2=.5;//sets the X coordinate of our second point to .5
Yloc1=.5;//sets the Y coordinate of our first point to .5
Yloc2=.5;//sets the Y coordinate of our second point to .5
In Perframe
code:
p=0;//reset perpoint counter to 0
In PerPoint
code:
p=p+1;//adds one to out perpoimt counter for every point being drawn
x=equal(p,1)*Yloc1+equal(p,2)*sloc2;//When P equals 1, sets the X coordinate to our Xloc1, and when P equals 2, sets our X coordinate to our Xloc2
y=equal(p,1)*Yloc1+equal(p,2)*Xloc2;//When P equals 1, set our Y coordinate to our Yloc1, and when P equals 2, sets our Y coordinate to our Yloc
You can copy and paste this into a superscope and fiddle with it if you want to. If you are sill confused just tell us what you are having a problem with or you could search the fourms for Superscopes or PerPoint, those might bring up some helpful things.
//editFixed a few little messups and "fixed" format
Comment


Somewhat simpler (but the theory is the same):
In this case (and in all cases) you use a counter variable for each point. This counter is called p in this example.code:
per frame:
p=0; (this is to reset the counter p you use for each point)
per point:
p=p+1; (meaning for every point p is increased by one).
x=0.1*equal(p,1)0.5*equal(p,2);
y=0.4*equal(p,1)0.35*equal(p,2);
Since we know n is the number of points to render, we set n to 2 in this case, otherwise the rest of the points have the coords (0,0). The equal statement is 1 or 0. It's 1 when p=1 for the first point, and p=2 for the second point. The rest of the points have coords (0,0), but since we don't have any other points, we don't have to bother about that. The reason why it works:
It works Per Point. It's really important to realise this. The code is run for every single dot. P is increased every dot, so we can number them. Point 1 equals p=1 etc. After that, you only have to enter coordinates for each point, and use the counter. Mind that N has to equal the last number of P or the last dots won't be drawn.
The statement:
If you multiply (*) any number 0, the result will be 0. If you multply by 1, the result will remain the same. Knowing this, we can do things like x=0.3*equal(p,1). In normal language: X equal 0.3 if p=1, otherwise it'll be 0.
Comment


Thanks for the help.
EDIT: Super_Toast, your code has a few mistakes in it, but I got the general idea. Thanks.
EDIT 2: Still having trouble. I'm trying to get a line from the center of the screen to the topright corner, but I keep getting a line from the center straight down. My code:
In Init
code:
Xloc1=0; //sets the X coordinate of our first point
Yloc1=1; //sets the Y coordinate of our first point
Xloc2=0; //sets the X coordinate of our second point
Yloc2=1; //sets the Y coordinate of our second point
In Frame
code:
p=0; //reset perpoint counter to 0
In Perpoint
code:
p=p+1; //adds one to out perpoint counter for every point being drawn
x=equal(p,1)*Xloc1+equal(p,2)*Xloc2; //When P equals 1, sets the X coordinate to our Xloc1, and when P equals 2, sets our X coordinate to our Xloc2
y=equal(p,1)*Yloc1+equal(p,2)*Yloc2; //When P equals 1, set our Y coordinate to our Yloc1, and when P equals 2, sets our Y coordinate to our Yloc2
Last edited by Braininator; 13 January 2004, 05:51.
Comment

Comment