[release] Sound Volume

Set your system sound volume with AveDesk and this desklet. A direct port of Dashboard widget by Natan Heagy (and I'm fully permitted to do so!)

rimmersoundvol.png

Download @ avedesk.philc.ca (~93 KB)

Please, note (online readme):

1) This is a very rough approach to sound volume regulator. Though it works, it uses a very dirty way to set your system sound volume. This is not dangerous in any way, but you might not like this. I'll change the way I do it as soon as I learn more of Windows MultiMedia subsystem.

2) HOW TO MOVE THIS DESKLET ACROSS YOUR DESKTOP? Because of trackbar implemented you are not able to just drag this desklet. To move it, hold the Ctrl key and drag.

3) This is a direct port of Dashboard widget with the same name made by Natan Heagy. I was pretty intoxicated with this fascinating idea and asked for a permission to port it. And - guess what? - I've got it! Natan kindly permitted me to use the original graphics from his widget. I had to cut and paste a bit, but current version should look quite the same as its Dashboard brother.

4) Your ratings at AveDesk site are HIGHLY APPRECIATED and ANTICIPATED! Please look for textual link with the words "Rate Resource" beneath the desklet information and USE IT!

Have a nice volume!

#354673

nice, thankyou

#354677

Nice. :)

Sure, it's a little dirty but, prefer this to the OD Volume Docklet that I've been using.

#354685

Nice desklet ;). Having some problems dragging it for a long period of time, but I'm not sure exactly what the problem is...

My suggestion for the muting behavior is to have the bottom button mute and turn yellow, and then the top speaker button would undo this (instead of having to press the bottom button twice).

Does that make sense? :P

Good job!

-NC

P.S: Added my rating.

#354713

Wow, this is so cooooool :D

a) cool you found out how to use the RegisterCOMServer in the aveinstaller using an alias :-)

B) AveDesk and AveScripter are able to capture the mouse for a certain layer. Effectively, that means with

layerA.SetCapture() you capture all mouse-input to layerA.With layerA.ReleaseCapture() you undo the previously set capture.

Basically, capturing the mouse with SetCapture() for layerA means that all mouse events are sent to layerA, no matter where they occur: mouse-over a different layer -> you still get the input with the coordinates relative to layerA (e.g. you get negative Y coords if the mouse is above layerA). Even when the mouse leaves the desklet and enters another window, you will still get the mouse-events, until ReleaseCapture() has been called again.

Making sliders is pretty easy while you capture the mouse:

var bMouseDown = false;

var grabbedY = 0;

function onmousedown()

{

this.layers("slider").SetCapture();

bMouseDown = true;

grabbedY = this.GetMouseYPos();

}



function onmouseup()

{

this.layers("slider").ReleaseCapture();

bMouseDown = false;

}



function onmousemove()

{

if(bMouseDown)

{

var relY = this.layers("slider").Y + this.GetMouseYPos();

var newY = relY - grabbedY;

newY = max(0, UPPERBOUND);

this.layers("sliders").Y = newY + STARTY;

}

}

EDIT:

c) The proper way to do animations is using Math.sin() and timers :) [it'll look smoother]

var counter = 0;

var MAXFRAMES = 100;

ontimer()

{

var ratio = Math.sin( counter / MAXFRAMES * Math.PI / 2.0);

var newValue = ratio * finalValue;

if(counter == MAXFRAMES)

{

timer.StopTimer();

counter = 0;

}

}



onStartAnim()

{

timer.StopTimer(); // in case it's already running

finalValue = 255; // some random value

timer.ResetTimer();

}

:) Just some nice hints.

#354715

Thanks Rimmer - been wanting something like this for AveDesk for a while

#354716

ooh!...nice!

#354724

it crashes my avedesk sometimes

#354898

2 killaart: AveScripter widgets are known to crash AveDesk sometimes. Can you describe what goes on when a crash occurs?

2 AVe: Thank you, I'll try. Anyway, this is a first approach :)

#354917

2 killaart: AveScripter widgets are known to crash AveDesk sometimes. Can you describe what goes on when a crash occurs?

2 AVe: Thank you, I'll try. Anyway, this is a first approach :)

What you mean it's known!!!! What crashs have you received?

If it crashes I need to know, I can't fix it if I'm not aware of it.

:mad:

#354925

uhm...dunno yet...but i'll stay focused on it.

update:

looks like this one doesn't like to be in showcase....happens when i open up showcase with my shortcut (f9) default i think

#354944

Works in showcase for me, but I'm using the beta version.

What version are you using?

#354951

Yeah, pcm, you've been said once, I said you: AveScripter desklets dont like turning on the ShowCase, it is described in Bug Thread. Fortunately, the xx.1.16 beta is allright, I never had this bug here. Non-beta users might still have it.

2 killaart: Try the AveScripter engine beta from avedesk.philc.ca (you'll have to register and log on there to be able to download it). It seems to be quite stable.

2 everyone who dislikes current thumb drag style: it will be fixed soon. In the mean time try clicking anywhere on the scale, you gonna like it.

#355066

*sigh* i had the oldest version of avescripter....now 1.0.1.0 ...and testing :D

update: hm...maybe this helps....crashes with this version also...its not that big problem guys...i just wanna help u....i could live without this one ;) but its so cool.

okay...just had the same problem, while i had word maximized and hit f9 (showcase), then the screen flickers and avedesk is shutted down...

#355071

I repeat, try LATEST BETA!!! Not even update, but beta! Register, logon, go to downloads and notice the new last section. Go there and take it. I had the same problem with earlier versions, now it's okay.

2 AndreasV

) cool you found out how to use the RegisterCOMServer in the aveinstaller using an alias :-)

Can i do it without alias? Seems like I can not.

____________________________________________

OK, trackbar implemetation CORRECTED and should work fine. It is now more like Windows standard track bar control. Please excuse me everyone for having you to redownload this package from avedesk.philc.ca: http://avedesk.philc.ca/modules/PDdownload...p?cid=10&lid=60. All my thanks to Andreas again!

And visit this forum branch oftenly! New amazing thing is soon to come!

#355094

Yes, the latest beta in avescript has fixed a MAJOR problem with threading. This would cause issues with hyperthreading cpus. That was fixed. This is what rimmer is talking about that was very buggy.

I should, be releasing the next version or final beta by the end of february! Most notable new feature will be activexforms. You'll be able to put IE, Flash, Media Player, QuickTime, excel and yes.. even Mozilaa browser. Basically, most stuff that have a activexform.

#355146

Hi. I put this on my other computer and it worked fine but when I put it on my other one all I get is a stretched out question mark. Any ideas on how to fix it I have the latest beta version of Avescripter installed. Thanks.:)

#357073

You must have installed Sound Volume from aveinst package properly on that machine to have it working. Not just copied! It registers an ActiveX object and uses it for work. This usually happens automatically, if you install a widget, but when it is just copied, you must do it on your own. So, just install it.

Then, if installation went fine but problem still remains, please, go to widget properties and look through the AveScripter tab. There must be Error log, copy it and paste here.

#357221

I registered the dll and it worked. Thanks!:)

#357423

just need

thx man

#372659

This is pretty sweet. I definately like the look of it, and the smoothness of the movements.

Is it possible to better tie this into the Windows volume control? I've got multimedia keys on my laptop, and it would be nice if the desklet were to update along with pressing the buttons and such.

oOoo... even better - combine that along with a type of effect that moves the desklet to "on top" for a couple of seconds when the desklet changes (i.e. weather changes, RSS feed update, etc etc). I'd do it myself, but it would have to wait until the beginning of May - exams and classes and such.

#373412

That's a great idea, Zxian, thanks a lot! I'll work on it.

Also the volume bezel desklet requested sometimes before is possible when I develop the multimedia plugin further.

#373588

Yeah, I was basically just thinking of replacing the little audio pop-up that Dell's Quickset shows when you adjust the volume. (Many other computer manufacturers have the same kinda thing.)

Quickset keeps moving the pop-up window when the resolution changes (in a game for example), and you have to incrementally drag it back to get it into the corner again...:slant:

Since desklets don't move "with" the resolution, then such a volume control would be really ideal... :D

#373757

I've added new features in the avescripter that should allow me/rimmer to create a popup like sound control. A bit like OSX or the dell one.

#373763

Well, after playing around with this a little bit, I found what it would take to get it to update along with multimedia keys.

Most multimedia keyboards adjust the master volume of the system, while the desklet seems to change the Wave volume. I had a look at the JavaScript file, but I'm not sure what to change VolRegPlg.VolRegMono to in order to get it to change the master volume.

After that, we can tackle the "on-top-when-changed" functionality. :)

#379987