- AVS
- Superscope...any help out there?
Archive: Superscope...any help out there?
Xaxor
28th September 2001 17:37 UTC
Superscope...any help out there?
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?
LittleBuddy88
29th September 2001 10:50 UTC
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=i-0.5; " in a superscope.
y is the vertical line, try changing " x=i-0.5; " to " y=i-0.5: ".
v is used to read the sound, try writing "x=i*2-1; 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
UnConeD
29th September 2001 18:27 UTC
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 top-left 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=t-0.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 arc-cosine 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 0-200, 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 wave-shape 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 sound-value divided by 5. To make sure we traverse a full circle, we multiply i (range 0-1) with 2 times pi, so we get a range of 0-6.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 0-1 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 0-1. 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 color-selector at the bottom.
So there you have your own groovy, color-changing superscope. It looks neat if you remove the t-changing on beat and combine it with a Trans / Water filter.
transfrmr
29th September 2001 23:54 UTC
WHOA!
That was absolutely magnificent. Thanks!
Scarface2k1
30th September 2001 02:37 UTC
trans...
...didnt any of the stuff i sent u help any?
transfrmr
30th September 2001 09:58 UTC
Oh yeah, definitely :)
But you hafta admit,
Unconed was just alittle more detailed.. :)
Xaxor
30th September 2001 19:34 UTC
Thanks
Thanks for the help guys. Though i guesss this means more work for me. :D
NoSage
19th February 2002 21:28 UTC
I posting this reply so people can read Unconed's explaination of scopes....
NoSage|Jason
Braininator
12th January 2004 09:11 UTC
Just wondering, is it possible to specify the exact coordinates for each dot (so you could create images and shapes out of dots)?
Warrior of the Light
12th January 2004 09:24 UTC
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..
Braininator
12th January 2004 11:32 UTC
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.
S-uper_T-oast
12th January 2004 20:32 UTC
It's easy to do. All you have to is use a custom point count then use equal( to set the locations.
In Init
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
p=0;//reset perpoint counter to 0
In PerPoint
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
Per-Point, those might bring up some helpful things.
//edit-Fixed a few little mess-ups and "fixed" format
Deamon
12th January 2004 22:15 UTC
Somewhat simpler (but the theory is the same):
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);
In this case (and in all cases) you use a counter variable for each point. This counter is called p in this example.
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.
Jaak
13th January 2004 05:18 UTC
Anyways... its easy to store points to megabuf(), like tell a scope run only once. wile doing it, store points to gmegabuf() and every other frame just load the points from buffer.
Im too lazy to write an example now :P
Braininator
13th January 2004 06:24 UTC
Thanks for the help.
EDIT: S-uper_T-oast, 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 top-right corner, but I keep getting a line from the center straight down. My code:
In Init
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
p=0; //reset perpoint counter to 0
In Perpoint
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
Warrior of the Light
13th January 2004 08:24 UTC
Set n to the exact number of points, or else AVS sets all other numbers to 0
Edit: Instead of using Xloc1, Yloc2 and stuff, you can also use the numbers directly, since you'll only need them once
simplest example:
---init----
n=1
---frame---
p=0
---pixel---
p=p+1;
x=equal(p,1)*.5;
y=equal(p,1)*-.25
This sets a dot somewhere in the upper right of the screen.
Deamon
13th January 2004 08:53 UTC
You forgot to change the X coord, Braininator. Try:
Per frame:
p=0;
per point:
p=p+1;
x=0*equal(p,1)+1*equal(p,2);
y=0*equal(p,1)-1*equal(p,2);
I have used a minus in the Y coords because AVS has the Y coords from top to down from -1 to 1 for some strange reason. Somehow it's faster for your computer, though I don't know why.
To Jaak: Please write an example, I don't understand it as well, and I really like to know how to use the buffers.
Warrior of the Light
13th January 2004 10:18 UTC
The y starting at -1 instead of 1 is quite simple to understand: A PC 'thinks' from the upper left of the screen to the lower right. It's more that we as humans are strange, by starting at a high number and lowering our way down along the Y-axis :igor:
And I don't think it has something to do with the X-coörds
Jaak
13th January 2004 10:20 UTC
Deamon here ya go:
note that bla is set to 0 in end of frame, so that all loops will be run only 1 time after loading the preset
;)
Braininator
13th January 2004 10:33 UTC
Originally posted by Deamon
You forgot to change the X coord, Braininator.
I have used a minus in the Y coords because AVS has the Y coords from top to down from -1 to 1 for some strange reason.
Yeah, worked it all out. Already knew about the whole minus thing, just changed the wrong vars and forgot the minus. Thanks for looking at it.
Originally posted by ;-c ,rattaplan
Instead of using Xloc1, Yloc2 and stuff, you can also use the numbers directly, since you'll only need them once
Good point, but I wish to keep the variables so it makes it easier to change them. (I plan to have a few of them!)
Warrior of the Light
13th January 2004 10:55 UTC
@Jaak
...And here is where coding becomes programming
-Guess what? I love it!!!
UnConeD
13th January 2004 11:15 UTC
By the way if you want to interrupt your shape somewhere, use:
skip=equal(p,4)+equal(p,6);
This will hide the 4th and 6th line segment (or 3rd and 5th, depending on how your counter works).
Braininator
13th January 2004 11:19 UTC
First bit of success!
Basically, the variables thing means you could set up a template for creating images in the superscope. All you'd need to do is create a number of different points (20 perhaps), set their coordinates to 0, then when wanting to create a new image just change the amount of points required and change their coordinates. So simple now!
Deamon
13th January 2004 17:10 UTC
Another way of using p2p scoping (point-to-point, which is what you're doing now...) is to let AVS figure out the coords instead of giving them. Here's a nice example I just made. I'm quite proud of it :). Take a good look at the Texer II code. Don't bother the 3D stuff around it, the part that matters is:
init
pd=0.4 //Distance between points
Per frame
xp=-1; //starting positions every frame
yp=-1;
Per point
xp=xp+pd; //gridforming
yp=if(above(xp,1),yp+pd,yp);
xp=if(above(xp,1),-1,xp); //grid reset if N is set too high
yp=if(above(yp,1),-1,yp);
It took me some time to figure this out, though it's quite simple now I've got it. I was playing with extra counters first, but after some puzzling, I realised I didn't need any. Let's see if you can figure out what's happening yourself, it's better that way than if I say it right now ;).
Other dudes around here, tell me what you think. Me personally likes it a lot.
[edit]
Read the comment for code explanation
[/edit]
Braininator
15th January 2004 08:12 UTC
Next job with my stuff, trying to get points to change on beat.
dirkdeftly
17th January 2004 19:37 UTC
by the by, next time please don't revive three year old threads....
Deamon
18th January 2004 16:34 UTC
lol, I didn't even notice that :p
Braininator
19th January 2004 04:04 UTC
Neither did I, sorry about that!
jheriko
25th January 2004 08:43 UTC
Originally posted by Atero
by the by, next time please don't revive three year old threads....
rofl.
i think that i too have been guilty of this once so thats all i'll say right there. it is strange how old threads get resurrected.. i think its probably the result of the search feature being used then replying to a post without thinking. or do people really search through page after page of winamp forum archives by hand (mouse i suppose)?
:weird:
Deamon
26th January 2004 10:06 UTC
of course it's the search option, no-one would read about 50 pages of forum topics if maybe their question is already answered. Certainly not new people.
Braininator
28th January 2004 08:56 UTC
So we're expected to search for a thread relevant to our problem, but if it's three years old we can't reply to it. Weird.
Timzone8
28th January 2004 13:22 UTC
Newbie here....
I've been making some avs' with the presets and eventually found it well, boring, so I want to learn how to make Superscopes...
All I need to know is a few basic formulas to get me started. Could someone post some Superscope "codes" for:
Circle, Triangle, Square, Star, Sphere, Cube, Prism???
I can understand the x,y,i,v just not quite the sin(cos(tan( to it.
UnConeD
28th January 2004 15:15 UTC
So we're expected to search for a thread relevant to our problem, but if it's three years old we can't reply to it. Weird.
Err no. You're supposed to look for old discussions about your question. If you find an answer, that's it. If you don't, start a new topic with your specific issue.
Oh and Timzone8: Read. The. FAQ. It's right in front of your nose.
Timzone8
29th January 2004 06:13 UTC
Where's the FAQ on superscopes? (this is it isn't it?) :p
Jaheckelsafar
29th January 2004 06:19 UTC
There isn't one, but there are several threads which discuss superscope maths which are linked to in the AVS FAQ at the top of the main AVS forum.
martyexodus
2nd January 2005 04:53 UTC
now, i may be mistaken, but instead of going through all that to make a line from the center to the upper-left, could you just put:
init:
n=50;x=0;y=0
point:
x=x+i
y=y-i
I havent tried it, but judging from what i know, that should work.
hboy
2nd January 2005 08:43 UTC
Originally posted by martyexodus
I havent tried it, but judging from what i know, that should work.
No, it doesn't work like this. It works like this:
"init"
n=10
"per pixel"
x=-i;
y=-i;
at least if you reviwe dead for a year ago, please do it with thinking before it. Why the fuck didn't you just try the code before posting? Be ready for some serious flaming dude.
MaTTFURY
2nd January 2005 09:43 UTC
umm someone wanna deploy a ACTUAL SSC HELP GUIDE?! (ffs not hard enough?)
Superscope tutorial goes here
But for now, here is the old text:
You can specify expressions that run on Init, Frame, and on Beat.
'n' specifies the number of points to render (set this in Init, Beat, or Frame).
For the 'Per Point' expression (which happens 'n' times per frame), use:
'x' and 'y' are the coordinates to draw to (-1..1)
'i' is the position of the scope (0..1)
'v' is the value at that point (-1..1).
'b' is 1 if beat, 0 if not.
'red', 'green' and 'blue' are all (0..1) and can be modified
'linesize' can be set from 1.0 to 255.0
'skip' can be set to >0 to skip drawing the current item
'drawmode' can be set to > 0 for lines, <= 0 for points
'w' and 'h' are the width and height of the screen, in pixels.
Anybody want to send me better text to put here? Please :)
umm how's this supposed to help?! :( ?
hboy
2nd January 2005 09:49 UTC
actually, if you do know some english and posess some logic, you may fully understand that quoted help. and besides, somehow all avs artists before today and some even today understand it. because it is simple! you just have to think!
S-uper_T-oast
2nd January 2005 19:52 UTC
hboy pwnd joo
I learned superscopes all by myself back when I was in 6th grade. I had no fourms, no online help, it was just me and the code, and I conquered it. Do it yourself.
bunny
http://www.evsc.k12.in.us/curriculum...ch1/rabbit.jpg
hboy
2nd January 2005 19:56 UTC
thats a cute bunny i must say ^.^
PAK-9
5th January 2005 21:07 UTC
This thread just dont wanna die
^..^
5th January 2005 21:48 UTC
so let's keep it as it is now and come back in a year from now...
good bye everyone and see you next january
randomee
24th October 2007 00:11 UTC
some question to the superscope stuff, im new to the plugins and visualisation stuff but interested in something like an oscilloscope.
i just recently came around this youtube video of a "song" (flac compressed audio data) that was published on the assembly 2007 to make an oscilloscope display fancy animations and "intro"-like stuff...
http://www.youtube.com/watch?v=s1eNjUgaB-g
the flac song file can be found here:
http://kapsi.fi/~jpa/stuff/other/youscope-wave.flac
since winamp can play flac stuff and can visualize stuff, i was trying to draw the x and y axis with the values of the song or something like that.
any hints into this?
thanks for any replies.
randomee
24th October 2007 09:27 UTC
are my posted links supposed to appear properly, or are links forbidden in this forum?
:(
Grandchild
24th October 2007 12:10 UTC
links by jubior members aren't visible but can be seen by clicking on quote.
http://www.youtube.com/watch?v=s1eNjUgaB-g
and
http://kapsi.fi/~jpa/stuff/other/youscope-wave.flac
i think i understand what you want, which is very simple indeed.
- you have opened the avs editor
- preset>new
- in [main] check "clear every frame"
- +>render>superscope
- select the scope delete everything in it.
- put this in the point box:
x=getosc(i,0,2);
y=-getosc(i,0,1);
- and in the init box:
n = 1000
- there you go, now play the file...
it's actually kind of funny, i've never seen stuff like that on avs :) only problem is, it doesn't look quite as good as the thing on youtube, because avs' oscillograph resolution isn't so good.
gc
randomee
24th October 2007 16:33 UTC
thats cool, thanks for the quick reply mate and help with the task :)
cheers.
QOAL
24th October 2007 17:46 UTC
Lets make it a bit more oscilloscope like then...
randomee
24th October 2007 19:02 UTC
hehe sweetness. thanks for the update on the effects :)
PAK-9
31st October 2007 14:49 UTC
Revived for the fourth time, its like night of the living thread.
sorry
Grandchild
2nd November 2007 18:46 UTC
well that pun wasn't too bad :D
AJ Sindri
27th November 2007 05:39 UTC
Here's so basic shapes that are easy to make:
Oscope line:
x=i*2-1;
y=v
Rotating oscope line:
t=//angle in radians;
x=sin(t+v)*i;
y=cos(t+v)*i;
Oscope circle:
i=i*2*$pi;
x=sin(i)*acos(v)/3;
y=cos(i)*acos(v)/3;
Instead of using v, you could do something like this:
vNew=getosc(i,0,0)
Crazy? (saw this off of FramesOfReality's black hole):
x=getosc(i/2,0,0);
y=getosc(i/2+.5,0,0)
Hope that helps. Sorry it's so uber basic ^_^
jheriko
18th December 2007 13:44 UTC
Let this die! FFS!
Also see PAK's excellent AVS guide for help with SSC. Also the help.
As usual, you can all do it with no reference... because we did!