![]() |
#1 |
Junior Member
Join Date: Jun 2013
Posts: 22
|
Superscope: 'v' variable in frame code
Hi,
Im trying to figure out how some of the superscope codes work. Im checking "Marco - science of superscope" preset from classic winamp presets list. here is the code: code: Here,
|
![]() |
![]() |
![]() |
#2 |
[STILL a retard!]
Join Date: Apr 2002
Location: Bristol, UK
Posts: 1,167
|
Open the (Settings -> )debug window and add reg00 = var; then you can watch the value, and see if it does anything. (reg goes from 00 to 99)
1: In fact it does. code: Both reg00 and reg01 show the same value. I am an idiot and it's too late to be thinking. The code I tested was wrong, which I've now amended and it looks like they're different values. It's not equal to i=1 either. 2: Variables aren't case sensitive. (I can't remember if I knew that ![]() Example: D=1; d=0; reg02=D; (this will show 0) 3: Doesn't look like it, nope. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Oct 2009
Location: Behind your house
Posts: 106
|
Well, "V" in this case is used to change the speed of the scope, and it's excecuted every frame, stating the obvious.
Z is useless, so go ahead, annihilate it. It's 1 A.M. here and I'm tired, so my answer may not be what you're seeking. It cannot rain forever |
![]() |
![]() |
![]() |
#4 | |
Junior Member
Join Date: Jun 2013
Posts: 22
|
Quote:
Also the d=D/n; code doesnt do anything either since D was never initialized, will always be zero (im assuming this is the case, the debugger confirms: uninitialized variables are 0) how does it control the speed? what values is assigned to it? is 'v' something provided internally by the Superscope? |
|
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Oct 2009
Location: Behind your house
Posts: 106
|
Using 'v' should be the same as using the getosc(), the only difference is that with the getosc function you can control more parameters (that is: band, width or channel)
For example: code: is the same as code: That being said, with "control the speed" I mean you use a variable, called 't', where its value depends on 'v', and you use it on the point section to change the speed of the scope. It all depends where you put the 't'. It cannot rain forever |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Jun 2013
Posts: 22
|
I think value of 'v' maintains the last assigned value. ie. 'v' in frame section will be equal to last 'v' from the point section ie. when i = 1. I tried the following code
code: and reg01 shows up as 1 in the debug window. |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Oct 2009
Location: Behind your house
Posts: 106
|
Ugh, that if statement is superfluous, at least use this
code: It cannot rain forever Last edited by InCUbuS-94; 17th June 2013 at 19:11. |
![]() |
![]() |
![]() |
#8 |
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,121
|
No need for debugging, the answer is rather low-tech.
When that preset was created, we didn't have a rand() function yet (AVS 2.5). We used the audio to generate random values. In this case I assume (as I don't have the preset installed here) that v is used as a waveform and varies between -1 and 1. That means that t increases or decreases with that value. Today you'd have used something like t=t-(100-rand(200))*.005; D and z are normal variables with no special meaning in a ssc Looking more closely, d is never really used. It's set to be 0 like stated above, and its always added. Adding 0 does nothing. The preset would be the same without it. Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever |
![]() |
![]() |
![]() |
#9 |
Junior Member
Join Date: Nov 2015
Posts: 15
|
1: When the spec data is collected, however in frame section, also collects spec data and moves to the music, same as t=t+getosc(1,0,1)*0.5
2: Values and variables are not case sensitive 3: /z, *z, -z, +z, sin(z), anything that uses (z), it does anything but in this preset, nope. |
![]() |
![]() |
![]() |
|
Tags |
superscope |
Thread Tools | Search this Thread |
Display Modes | |
|
|