Archive: difficulty with keyboard/mouse input


16th January 2004 17:15 UTC

difficulty with keyboard/mouse input
I'm working on a preset called AvsCAD and I want to be able to set the linewidth from 1 to 2 .. to 5 and back to 1. This is not a problem, it's just that if you hold the key for multiple frames, the counter keeps adding on. I thought I had a solution, but it doesn't seem to work.

Could anyone tell me what I'm doing wrong?
I've attached a tryout instead of the preset itself to prevent people from making remixes before final release.

Edit: general idea of what it does:



qpulse=
if qold=qnew
then
0
else
if qold=0
then
1
else
0


--So:-----

keyold|keynew|goal
------|------|----
0|0 =|0
0|1 =|1
1|0 =|0
1|1 =|0


16th January 2004 18:23 UTC

Well, I've attached the fixed file. It seems to work now. If you would add a counter such as reg01=reg01+reg27; then you would see that it is really working. Coz' on high FPS you wont able to see the 0 changing to 1, of course, I slowed my FPS to minimum and tested. The first line of text really changes from 0 to 1 and then quickly back to 0


16th January 2004 19:01 UTC

Thanks a lot for fixing that. I had been staring at it 'til I didn't understand my own code anymore :igor:


16th January 2004 20:06 UTC

No problem. Keep up the work. Do you have any AVS packs, I would like to see some?


16th January 2004 23:03 UTC

You can check out my website, but all that is at least 1.5 years old (EyeCandy minipack being the newest, (don't bother looking at the so called 'new' presets on the site))

I've been neglecting my packs since to do tests and master SSC's.

But a few days ago I decided to start with my second pack, and here's an underway preview of the preset I needed your help for. It leakes out my new nickname and it will be in my new pack (if I get it all done).

(wow, I've been working on this all night from 18:30 to now, 00:05) :eek:


17th January 2004 00:47 UTC

You can have also a more concise code replacing:

qpulse=if(equal(qold,qnew),0,if(equal(qold,0),1,0));

by:

qpulse=qnew*bnot(qold)

It may be also faster ...


17th January 2004 20:09 UTC

@piR:
Thanks, I'll use that.

Just wondering: What are the opinions on this kind of presets (and this one in special :) ), do you like it or is it too far off from 'music visualization'?


18th January 2004 05:42 UTC

Well personally I think these kinds of presets are great if you can do something origional. You're off to a great start with this preset, but keep adding features to make it more interesting. Right now I'm working on an architectual design preset where you can design your own buildings floor-by-floor, for example.


18th January 2004 11:57 UTC

I don't see the point in releasing this as part of a preset-pack with visualisations.

I'll take fsk's digital artist preset over this any time.


19th January 2004 10:55 UTC

As the comment says, there'll be at least a line option and there is a bonus in already... try to find it ;)


19th January 2004 11:31 UTC

Found It. It is a rect-coords disabled movement. Enable rect coords to get paintbrush effect. Got any cookies for finding that?


19th January 2004 14:12 UTC

nope, as I said, it's a bonus for now - In the fianl version, it'll probably be just an option


19th January 2004 16:33 UTC

You'll have to find a way to combine both paintbrush and normal modes. Then you can do cool drawings.


19th January 2004 20:32 UTC

Hey how did you read my mind? I'm working on the MSPaint simulator right now :P


19th January 2004 21:53 UTC

Please leave out the MS-part - unless you want to include the systemcrashes of course ;)


20th January 2004 03:48 UTC

Oh wait! I have an idea! AVS-OS!
Complete shell emulator done in AVS :)
Noone touch this idea! I'm making it already :F