Announcement

Collapse
No announcement yet.

New Phidgets Encoder volume control util

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Phidgets Encoder volume control util

    I have finished writing a C & C++ based component to take input from the Phidgets Encoder to control the master volume. It works with XP, Vista and Win7. The only thing I haven't done yet is make it start automatically when a user logs in. But there is plenty of notes on the net that show how this is done.

    The attached zip has the phidgets21.dll and the UsbVolume.exe application I wrote. Just extract these to anywhere you want and run the .exe.

    When it starts, there is a window that pops up that has a slider to show the current volume and the mute setting. As you turn the knob on the Phidgets encoder, the master colume changes. If you push the encoder's momentary switch, it toggles the mute. The window will automatically disappear after 10 seconds of not touching the encoder.

    This util does not need to be run in compatibiliity mode under Vista or Win7. It knows which OS it's running on and does the right thing.

    The util was not meant to be killed, but if you click once in the pop up window (to set focus) and click the ESC key, that will end the program. Or you can use task manager to kill the process called UsbVolume.

    Let me know if there's any changes or features you'd want.
    Attached Files

  • #2
    Hey Meisner,

    Good job on the programming!! It worked immediately, very nice. I was wondering if you could adjust a bit. I did a bit of programming on the phidget, but I never got this properly working myself. Maybe it is a bit to much to ask but I'll try it anyway.

    1. Could you make the volume adjusting more sensitive. So you have to make 2 full revolutions in order to go from min to max...

    2. It doesn't react on the winamp volume adjust, that not really an issue, but I just noticed it.

    3. The screen disappears in 10 sec. is, I would like to have it gone in 2 sec.

    4. And maybe you can make it look like the picture below, bit more flat and stretched? - Slighty transparant?

    I am allready very happy with it, but like this it would be PERFECT!

    Thanks a lot!!

    Jeroen
    Attached Files

    Comment


    • #3
      Originally posted by jefoon View Post
      Hey Meisner,

      Good job on the programming!! It worked immediately, very nice. I was wondering if you could adjust a bit. I did a bit of programming on the phidget, but I never got this properly working myself. Maybe it is a bit to much to ask but I'll try it anyway.

      1. Could you make the volume adjusting more sensitive. So you have to make 2 full revolutions in order to go from min to max...

      2. It doesn't react on the winamp volume adjust, that not really an issue, but I just noticed it.

      3. The screen disappears in 10 sec. is, I would like to have it gone in 2 sec.

      4. And maybe you can make it look like the picture below, bit more flat and stretched? - Slighty transparant?

      I am allready very happy with it, but like this it would be PERFECT!

      Thanks a lot!!

      Jeroen
      #1 is easy.
      #2...I am only trying to control the master volume. When I used winamp, the master volume does change and indirectly controls winamp. Are you not seeing this?
      #3 is also very easy. I hardcoded the 10 sec delay.
      #4...hmm...when you say more flat, do you mean get rid of the 3D "sunken" effect? That's easy. Stretching it is also simple. Transparent should be easy as well.

      I can make a simple text file to set the sensitivity and the delay before hiding the window.

      What operating system have you tried this on? Are you seeing any problems with suspend/resume?

      Comment


      • #4
        Originally posted by meisner View Post
        #1 is easy.
        #2...I am only trying to control the master volume. When I used winamp, the master volume does change and indirectly controls winamp. Are you not seeing this?
        #3 is also very easy. I hardcoded the 10 sec delay.
        #4...hmm...when you say more flat, do you mean get rid of the 3D "sunken" effect? That's easy. Stretching it is also simple. Transparent should be easy as well.

        I can make a simple text file to set the sensitivity and the delay before hiding the window.

        What operating system have you tried this on? Are you seeing any problems with suspend/resume?

        Thanks!!

        #1 Nice.
        #2 well.. I guess. But it is OK like this
        #3 Nice
        #4 Idd the sunken effect, but also less "high". Is it possible to adjust the transparancy in a textfile too? And maybe the dimension of the box.. with certain limits offcourse. I guess than its completely adjustable..

        I am using this on Windows 7 64bit Ultimate. With a Asus Xonar HDAV1.3 card. But no problems encountered so far. I tested it with direct startup, winamp, Total media theatre 3 (arcsoft), media player. I can use my remote control, your application and just the mouse without interference. Al perfectly fine!

        Anyway.. A bit information about my project. I made an amplifier diy, with 5 channels. This is being connected to a computer.

        This is a link to a dutch diy audio forum, but the pictures are self explanatory.

        http://www.zelfbouwaudio.nl/forum/vi...=8435&start=25

        http://www.zelfbouwaudio.nl/forum/do...9897&mode=view


        I am looking forward to see something

        Thanks! Jeroen

        Comment


        • #5
          This is awesome! Something I have been waiting on for years. I had nearly thrown away my encoder because it would never work with my carputer, but this one does!

          My only 2 thoughts.
          1. No popup. I cant see any reason for another popup telling me the volume. Maybe an option, or a tray icon so I can bring it up if I need it, but right now it covers all my relevant info on screen.
          2. The mute button doesnt work....what can I tell you to get it to work?

          THANKS!
          98 V6 Camry XLE
          Status-Everything is working again!
          No progress while I am in NYC
          Ze Worklog

          Comment


          • #6
            OK, I just updated the attached zip file. It now includes an updated UsbVolume.exe and a new UsbVolume.ini file. The contents of the ini file are:

            WindowWidth : width of the dialog box window
            Sensitivity : sensitivity of the changes in encoder position
            Timeout : how many seconds until the window is hidden
            Transparency : not used yet
            RoundedCorners : 1 means use rounded corners; 0 is square
            Visible : 1 means work as usual; 0 means minimize the window immediately. This will keep the window from popping up as well. If you click on the icon in the task bar, clicking in the dialog box window will hide it again.

            The sensitivity field is used as follows:

            newvolume = oldvolume + change-in-encoder-position * 1 / sensitivity. Therefore, 1 is the same as before. 2 would be 1/2 the rate...3 would be 1/3...etc.

            One other note; right now the .ini file must be in the same folder as the .exe. By default, Windows looks in the Windows folder (usually C:\Windows) for ini files. Not sure how I will finalize this yet.

            Comment


            • #7
              Originally posted by Anshu View Post
              This is awesome! Something I have been waiting on for years. I had nearly thrown away my encoder because it would never work with my carputer, but this one does!

              My only 2 thoughts.
              1. No popup. I cant see any reason for another popup telling me the volume. Maybe an option, or a tray icon so I can bring it up if I need it, but right now it covers all my relevant info on screen.
              2. The mute button doesnt work....what can I tell you to get it to work?

              THANKS!
              So, usingn the latest version, set Visible to 0 to keep the popup from appearing automatically.

              As far as the mute not working, I found a bug that is fixed in the latest version. Let me know if it corrects your problem.

              Comment


              • #8
                Wow. Thats instant feedback response!
                Yes everything is great now, no problems. I love the way this little app works and does everything beautifully. My only remaining thought would be, could we get the app to live in the tray and not the taskbar? Just when I am working it takes up space down there which it doesnt have to...

                Thanks so much!
                98 V6 Camry XLE
                Status-Everything is working again!
                No progress while I am in NYC
                Ze Worklog

                Comment


                • #9
                  I agree...my first thought was to put it in the system tray, but the task bar was a lot easier. I am going to continue looking at doing the transparent background and moving it to the tray.

                  Comment


                  • #10
                    Fair Enough. It might be cool if there was a way to do it transparent and a smaller footprint, and then one could drag it to a part of their layout which wouldnt interfere but you could see it in action.

                    Now ive got to go back and figure out where im going to mount the thing. Ive had it for like 3 years but had never been able to get any other versions of vol control to work.
                    98 V6 Camry XLE
                    Status-Everything is working again!
                    No progress while I am in NYC
                    Ze Worklog

                    Comment


                    • #11
                      OK, I just updated the attachment in post #1 with v1.2. If you have Visible=0 in the ini file, it will now minimize to the system tray on startup. If you click on the systray icon, it will be restored until you either click on the icon again or on the window that was restored.

                      Next will be transparency and *maybe* putting the ini file settings in the registry. The idea of moving the window and saving its location sounds kind of cool too.

                      In my '96 camry I am putting mine in the radio surround trim. Just under the cig lighter.

                      Comment


                      • #12
                        Word. Thats all I need.

                        I am thinking for mine more around the shifter near the handbrake. I was gonna drive around and see, somewhere on the door panel could be cool, but I never want to have to run wires into there again!
                        98 V6 Camry XLE
                        Status-Everything is working again!
                        No progress while I am in NYC
                        Ze Worklog

                        Comment


                        • #13
                          Nice work on this! I've been looking into the Phidgets recently, and debated this encoder being the first item I wanted to play with. Seeing this thread has now made up my mind!

                          Got a few questions though...

                          First: Where did everyone get their Phidget stuff from? Directly from Phidgets.com or through a dealer? (in the US)

                          Second: How bad was it working with their dll's? Been looking into this off-and-on for some time, and the programming doesn't seem complex. Then again, being a programmer by profession, I know how things that are "seemingly non-complex" turn out!

                          Third: Does the application have any form of .COM visibility to be controlled via another application?
                          Play with it, 'til it's broke.

                          Comment


                          • #14
                            I got mine from www.trossenrobotics.com for ~$30 delivered.

                            When you start using the encoder and the software in this thread, let me know if there's anything (within reason) that you'd like to see added. The software is working quite well with XP as well as Vista & win7 (Vista & 7 have different sound device controls).

                            But...in RideRunner, I had to set it to control the master volume. If it wasn't set to that, the encoder sw didn't play nice with RR.

                            Comment


                            • #15
                              Originally posted by Anshu View Post
                              Word. Thats all I need.

                              I am thinking for mine more around the shifter near the handbrake. I was gonna drive around and see, somewhere on the door panel could be cool, but I never want to have to run wires into there again!
                              BTW...I ended up using your idea and mounted my encoder in one of those knock-out plates (I don't think you have them in the 97 and later models) near the handbrake. I am happy with the results.

                              Comment

                              Working...
                              X