Archive: AVS 2.8b1! :)


4th December 2003 19:13 UTC

AVS 2.8b1! :)
OK this version should resolve the loading preset bugs, finally. Hopefully. Also added some new superscope capabilities, including 'skip', 'linesize', and 'drawmode' (chooses points or lines).

http://firehose.net/~deadbeef/avs28b1.zip

-J


4th December 2003 19:17 UTC

YAY! got to love skip and linesize...

thank you so very much Justin

[edit]
linesize doesnt look very good, is it supposed to be like this, or is there bug?

frame:
t=t-0.01;
st=sin(t);ct=cos(t);
asp=w/h;

point:
px=i*2-1;
py=0;
x=px*st+py*ct;
y=(-px*ct+py*st)*asp;

linesize=100;


4th December 2003 19:38 UTC

100 is pretty big... just make sure your n is set low enough, and then it should be a big fat line.. if you do hundreds of points, you'll have a lot of 1 pixel by 100 pixel line stripes =)


4th December 2003 19:52 UTC

yeah, i was thinking of line width dependent triangel rendering ssc if i read 'linesize' :D, but oh well... skip is very cool ;)


and again i must say... no arrays... no vectors... very cool things could be done with arrays, vectors would make coding much more easyer and many ssc/dm codes much more shorter. But I understand, you got work to do with winamp 5.

i cant say anything about loading preset bug, this bug hasnt occured to me in previous versions, i just hope its fixed :D


4th December 2003 20:00 UTC

Nice. Some great changes for now, but I hope that arrays are eventually added - don't have to be added for wa5, but eventually would be nice. Can't wait to see what people can make with all this new stuff. Cool.


4th December 2003 21:22 UTC

Nice! UnConeD's gonna have a field day with this stuff!


4th December 2003 22:18 UTC

Linesize is nice :).


5th December 2003 01:38 UTC

YESSSS, linesize kicks ass! thanx a lot:). the skip function is a bit weird, because it still links the skiped part.


5th December 2003 01:42 UTC

This is one hell of a bug:

1) Go fullscreen
2) Click left mouse button
3) When the cursor goes under Winamp/AVS/config window, click in the lower left corner of the config window - well under the config window - where the docking window used to be.
AVS docks, but the main AVS window stays where it is and stops updating the portion of the screen under the AVS window (except for the frame).
<edit> The AVS window also gives you the Winamp main window popup menu when you right click after you do this.

...What in the fuck, etc.


5th December 2003 07:56 UTC

you come out with updates everyday, eh justin?


5th December 2003 07:56 UTC

Actually i'm unable to give it a test ride so my question:

Is the new SSC able to do simple antialiasing? This would be very handy imo because using blur for this purpose ain't the best way.

[EDIT]
Congrats to UnConeD for beeing a Mod now. YAY!


5th December 2003 09:49 UTC

er... magicX, what do you mean by AA?

The superscope works in more detail than pixels anyway, so why would you need it?

If a scope looks pixelised, then you need to work in a bigger desktop resolution (or avs fullscreen one), there is no other way around it.

Are you sure you meant antialiasing?


5th December 2003 10:30 UTC

Yes i am ;) i talked about this with UCD in another thread, right now, i don't remeber where.

But basically it should be able to smooth a line along its vectorial direction (eg vector from point 98 of 800 to point 99 of 800).

You could smooth it by bilinear filtering for example.


5th December 2003 11:22 UTC

@Justin:
How long have you been breeding on all of this? Everyday (if Horse-Fly is right) you make the people at this forum a bit happier...

@UnConeD: Congrats!


5th December 2003 12:46 UTC

first they complain that there is no development..


5th December 2003 13:02 UTC

well..for a long time, they were right, there was no development. Surely you remember those horrible days when we all feared that the world had forgotten about avs?

now look what has happened, bwahahaha!
Justin, you are a god among men.


5th December 2003 14:49 UTC

and with the upcoming WA5 and with that more WA- and therefor AVS-users, I fear the n00bish questions coming our way. :igor:

But then... the more the merrier [sp?]


5th December 2003 14:52 UTC

merrrier has three r's


5th December 2003 16:16 UTC

;-c ,rattaplan: I have been regularly forwarding stuff to justin that the regulars at #finnish-flash have been discussing over IRC though. That explains of the flood of new AVS ideas. Still kudos to justin for implementing it all of course.


5th December 2003 16:36 UTC

I can't open the editor by doubleclicking the AVS window. Instead it switches to and from fullscreen. And hitting enter for fullscreen doesn't seems to work anymore either, but alt-enter does. :)

P.S. Man, things have been happening while I was gone. Congrats Unconed.


5th December 2003 16:41 UTC

Originally posted by Jaheckelsafar
I can't open the editor by doubleclicking the AVS window. Instead it switches to and from fullscreen. And hitting enter for fullscreen doesn't seems to work anymore either, but alt-enter does. :)
you can change that in the settings menu

5th December 2003 16:49 UTC

Oops :o, didn't see that. But the doubleclick fullscreen thing doesn't work for me. It goes into full screen, then switches out right away.


5th December 2003 17:40 UTC

i'm on windows xp but i can't use desktop alpha blending for the avs window... not that i really use this feature, but i noticed this in this beta.

and also, when i click a colormap trans, winamp crashes without even being able to open the config dialog.


5th December 2003 18:00 UTC

Originally posted by zamuz
and also, when i click a colormap trans, winamp crashes without even being able to open the config dialog.
happened here aswell, until i updated colormap

5th December 2003 18:45 UTC

thanks :)


5th December 2003 21:04 UTC

but the same happens with channelshift


5th December 2003 21:05 UTC

and again i must say... no arrays
I want arrays too.

6th December 2003 03:24 UTC

Originally posted by hungryskull
I want arrays too.
OK so would an implementation like:


bla=arrayalloc(size);
arraysetitem(bla,index,value);
poo=arraygetitem(bla,index);
arrayfree(bla);

be adequate?

obviously size, index, and the array pointer itself would still be floating point values, but be rounded to int as necessary to make sense...

I can do this fairly easily. Would that meet the needs? If not, what else would be needed?

-Justin

6th December 2003 03:55 UTC

Sounds good to me, although more "traditional" subscripting (bla[index]=value) would be nicer, though (if feasable), although I think it wouldn't add too much as long as the array was dimensioned right away.


6th December 2003 07:54 UTC

That seems terribly convoluted, and I'd rather you didn't put effort into that because eventually I'm betting it'll get changed, and you'd have to leave it in the evallib for old presets (if you didn't, that would be bad.) Personally I'd prefer that you tried to fuddle with the evallib so you could do different things with the lefthand side of an assignment, e.g. the traditional
array[sizex][sizey]...; // array allocation consists of no assignments
array[x][y]=borgle;
You could then do things like user globals:
$global;
$global=bangle;
Overloading globals ($global != global) would be nice too ;)
But in terms of the arrays, I'd like to see the following syntax:

array[sizex][sizey]...; // allocates array of size sizexXsizeyXsizez...
array[5][3]=bloor; // assigns value bloor to index 5,3
array[*][2]=blargh; // assigns value blargh to all indices in y=2
array[*]=skaggle; // assigns value skaggle to all indices
array=warts; // variable "array" is different from array "array"

probably asking for too much here...but it'd be really, really, really nice :D with the code you suggested there's no way to do multidimensional arrays with any ease as far as i can tell.


i know you won't let me down, justin... /me winks sexily


6th December 2003 08:57 UTC

yup, Ateros ideas seem really really nice :), atleast
array[x][y]=blabla;
would be good... its much more readable

i know you won't let me down, justin... /me winks sexily
O_o how far can one go

6th December 2003 09:31 UTC

OK well here is my thinking:


So yes, we could go completely overhaul shit. But ultimately that'll just mean that it'll take tons of time and break shit and be a big pain in the ass. :/ I don't know what the best thing to do is...

-J

6th December 2003 09:49 UTC

That all is true, it would waste a lot of time, but you got work to do with winamp 5, not some stupid 'plugin', uh?
thats why would open source avs be good idea, but yea... things will probably get messy like that

:\

do the arrays way you like them to do, we just gave you ideas :)


6th December 2003 10:36 UTC

i can imagine nemo would be happier, if his presets in the Winamp 5 Newpicks had a different name

splendora.avs > NemoOrange - Splendora.avs ?


6th December 2003 11:01 UTC

It would be great to have arrays. From what I've heard around here, you can do really great things with 'em. Would anybody be so kind to explain shortly and simple what they do? My math aint that good ;).


6th December 2003 11:08 UTC

arrays != math
arrays == programming


6th December 2003 13:36 UTC

supersimple example: peaks

init:
n=576;
val=arrayalloc(n)//I hope new arrays have value 0 set for all items

frame:
t=0//or t=1?

point:
arraysetitem(val,t,max(arraygetitem(val,t)*.99,getspec(i,0,0));
x=i*2-1;
y=1-arraygetitem(val,t);
t=t+1

what does arrayfree do?


6th December 2003 14:25 UTC

Justin:

I'm not sure how the evallib handles assignment and variable-address retrieval, but maybe if you could code it like this:

arraygetitem(array, 5) = foo;
bar = arraygetitem(array, 5);

Then you could put a pre-processor step in to convert from array[5] into that. That would rock ;).


6th December 2003 14:47 UTC

arrays will be fantastic. I dont know how many times ive stopped half way through some idea because i needed arrays.

BUT!

i fear that these betas and pre's are getting buggier and buggier with every release. I really hope that you will have time to iron everything out before the release of wa5.

I want arrays just as much as the next person, but i think its more important to have a generally stable avs. Im not griping.. i just hope you have time to fix everything... there have been sooooo many updates and so little time for beta-testing.


6th December 2003 15:59 UTC

Originally posted by justin
Making the arrays accessed via a function rather than a new language syntax is a lot easier (I know this ultimately doesnt matter that much to everybody else, but it changes it from a quicky day project to a much larger project that could potentially break a lot of other shit)
That's why I don't know if array's should be worried about now. I think eventually it would be best to wait until it is a bit easier to do the full version and when there is a bit more time to do it. I don't ever really like languages that take the function approach to arrays and such. It is much more of a hassle to first have to use the functions, and then when you find time and switch it over - the old functions will still have to be included in new versions.

Just my opinion.

6th December 2003 17:30 UTC

no, arrays are a very good idea, and would be extremely usefull. They would certainly allow us to do many things that we have been otherwise putting off. Such as propper tentacle effects, and speeding up older presets by making more complicated things into single scopes.

I dont think they would scare off the new comers, as they dont need to know about them if they dont understand it.

But still, i think its vital that the released version of 2.8 is just as stable as 2.6 is.


6th December 2003 18:12 UTC

I'd say no arrays for now. They'd only be really useful with proper looping control structures (though you could always use a skip=1 superscope as a for loop ;) ).


6th December 2003 18:58 UTC

yeah, With no looping it is a real pain and will deminish the usefulness of arrays.


6th December 2003 19:04 UTC

grrr... thats no good :(


6th December 2003 19:36 UTC

:down:
I have a ton of things I could use arrays for, and I'm sure that most of the other advanced programmers here do to. It's not something I'd want to stall the release of WA5 over, but I would *REALLY* like to see some proper array management.
I'll be blunt - that arrayalloc() shit sucks major ass. Like I said before, if that gets implemented, people will start using that and then there'll be no way to change it. I know it'd be a lot of major work, and I appreciate that - you're only human (well, to us you're an uberhuman) - but I think trying to use a bad form of array management would be a really bad idea.
As for garbage collection, why not create an internal list of every $global created, and then when a preset is turned off, delete all $globals in that list? Or, when the preset is turned off, look through all the variables and delete all the ones that start with $ (or whatever other marking they'll get)?
Another thing I'd still like to see is a user-expandable varlib. I don't know if this is possible, and if it's not I'd like to see it expanded again, especially if we're gonna be using arrays. (I'm going to assume for now that array[5][5] will take up 25 variable slots, correct me if I'm wrong).


justin is k1ng!!1


7th December 2003 00:40 UTC

I think making one global array, like global variables, will be _realy_ good.
Global variables are almost ok, they'll be perfect if they could be accessed like this:

reg( variable ) = value;  // set value
and blahblah = reg( variable ); // read value

Or, if you'd like to continue using function only on the right side of equation, use this for setting value:
value = reg( variable );  // almost same thing

It's like eval("reg"+number+"=blahblah"); stuff in other languages ;)
And to access arrays with standard syntax ( array[ level1 ][ level2 ] ) will be hard (impossabile?) to program in just a few days, I understand.
I thing one 1-dimentional array will be enough for the first time.

P.S. maybe you don't want to do major stuff with AVS because it's free and doesn't do any good for you - maybe you should make a donation stuff, I'll give you 50$ or more if you do :)

7th December 2003 01:49 UTC

Fragmer : Numbers work just fine.
For the second part... don't be lazy.
1-D array... It *can* be made into a 2D with a little improvisation I guess.


7th December 2003 02:03 UTC

I searched, but didn't see this mentioned before:
When you take the sign of a global variable, it is always 1 or -1, never 0.


7th December 2003 08:17 UTC

Originally posted by UnConeD
I'd say no arrays for now. They'd only be really useful with proper looping control structures (though you could always use a skip=1 superscope as a for loop ;) ).
My fear of adding loop capability would be what if a preset does an infinite loop? :)

-J

7th December 2003 10:07 UTC

make limit for times running a loop, or something like that


7th December 2003 13:08 UTC

or only implement finite loops (for..next)


7th December 2003 17:09 UTC

Now that someone mentioned it. I think loops might be much more useful than arrays. As for the infinite loop problem you have two choices, you could trust people not to send presets into an infinite loop. Or do what gaekwad2 said. I think the first would be better.

Maybe a harder but overall better solution would be to put in some kind of feature that allows presets made by other people to use loops. But doesn't allow n00bs to use loops unless a checkbox in the display options is checked. That way n00bs who don't need loops simply can't use them unless the checkbox is on. Which would prevent idiots from accidentally sending there presets into infinite loops.


7th December 2003 18:57 UTC

Justin, would it be possible to make render/text display more than one line of text?


7th December 2003 19:26 UTC

In Macromedia Flash, if a loop goes for too long (I think about 10 seconds) a popup comes up asking if you would like to abort the script. This happens every ten seconds if you select not to abort but the script is still looping. Perhaps this can be implemented in AVS.


7th December 2003 22:33 UTC

OK I'll think about loops and arrays, and we'll do it later (post wa5.0).
Here is avs 2.8b2, which mainly just fixes the sscope skip bug in b1.

http://www.firehose.net/~deadbeef/avs28b2.zip

Ideally this will be the ver in wa5.0 that launches, well, any day now...

-Justin


7th December 2003 23:17 UTC

I think arrays will be more useful than loops. I mean, loops are great, but priority of arrays is above loops.
Arrays will enable particle engines, complex random-scopes, complex flows etc. What major improvements can loops make? And - preset is recompiled at any change, every time you check a checkbox or type a symbol. Imagine that you're typing code and you didn't finish it and it's already compiled - and does infinite loop. Imagine how much harder it is to build loops (with standart syntax I mean) than arrays? I'm voting for arrays first!


8th December 2003 05:22 UTC

I'd say they are the same priority. A lot of things that you would want to do with arrays can't be done til loops are implemented.

I have a feeling they will both be added at the same time to AVS.


8th December 2003 05:41 UTC

yuh, arrays are nuffin without loops...

but thing i vote for is less buggier avs, this is above everything :p


8th December 2003 06:38 UTC

arrrays aren't nothing without loops - they are just a bit less. You can still use arrays to draw a cube or something much easier - just use array[curr_pixel] to get the predefined vertice for the 3D figure.

For example: square
INIT:
n=6;vertices[6][2]={{-1,-1},{-1,1},{1,1},{1,-1}};
FRAME:
q=0;
PIXEL:
x=vertices[q][0];y=vertices[q][1];
q=q+1;

Then it would be really cool if matrix/array math was added. 3D rotation and just about everything would be a bit easier, although possibly not faster.


8th December 2003 07:09 UTC

IMO, it's more important to get avs stable and to do some "small" improvementsto avs right now like multiline text and maybe some others to have a proper release ready for WA5.

There's been so much progress that it might take me a few months to work all the stuff out i could do with those new features.

I agree that arrays, looping and a better assignment structure are valueable but for now they're not nessecary.

People have been messing around with avs for about 2 years without any changes, tweaking it to the max of its possibillities.

Now, there's a flood of new stuff and peopel keep on asking for more although it's been barely used yet.

Let's leave this stuff for coming up releases. :)


8th December 2003 10:51 UTC

that's a good idea anubis, didn't think of that. which is funny cos i've wished for it in cpp for a long time :p

(of course if it's there i'd never know about it cos i'm a n00b cpper)


btw justin, it's really not that hard to make avs crash (or at least lock up). i've done it several times before. i can never repeat it, but it's entirely possible. all you really have to do is make it do a TON of slow operations all at once. you might even be able to do something like:
init: n=pow(w*h,2)
point: n=n+1;p=p+1;x=p*n*pow(-1,p)*cos(p);y=p*n*pow(-1,p)*sin(p);red=p/0;

at some point i'll make a special "fuck you" preset that just crashes avs just for you justin ;)


8th December 2003 17:15 UTC

I have a question. Is there a posability that fullscreen on a second monitor feature could be added to the AVS. You can see my specs. I noticed that in the modern skin If I click the full screen button in the video window it goes full screen on whatever monitor the window occupies.

I hope that made sense. I'd like to see that same feature added to the AVS if possible.

Also I am aware that milkdrop is supposed to do that. But I cant get it to work.


8th December 2003 20:20 UTC

i didnt think idd ever say this, but...
FAQ


8th December 2003 22:00 UTC

Um yeah, I just looked at the FAQ and I could not find anything relevant to my post.


8th December 2003 22:31 UTC

yeah it's in current avs wishlist :p


8th December 2003 23:03 UTC

OK, fine then

/me stomps off back to Winamp5 disscusion.


9th December 2003 00:19 UTC

any mirrors for the new avs 2.8b2?

EDIT: Nevermind. However, any mirrors might be good for other users.