Announcement

Collapse
No announcement yet.

adjust media volume by %?

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

  • adjust media volume by %?

    I'm looking for a way to adjust the media volume by %, rather than specific value. I have searched, but cannot find any scripts for this. My intention is to "map" the dim/bright from a keypad to the volume up/down, which is the reason for % rather than specific value. I've read of many people storing the volume level in a virtual device. Is this so that it can be adjusted by %? if so, how is this done?
    Plugins:
    BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

  • #2
    I'm using the BLmedia player plugin for music in HS. It has more than a few choices of events, % up or down being one of them. I know it allows script commands as i would expect the standard media player to do but since i'm script challanged this was the easier of the two for me to use.
    Marty
    ------
    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
    Playing with HS3 a bit but it's just play at this point.

    Comment


    • #3
      Are you using one of the Media Player plugins?
      -Rupp
      sigpic

      Comment


      • #4
        Yes, using the windows media player plugin, most current version.
        Plugins:
        BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

        Comment


        • #5
          According to the original scripting documentation this should already exist.

          Sub VolumeUp(Optional Percent As Integer = 10)
          Sub VolumeDown(Optional Percent As Integer = 10)
          -Rupp
          sigpic

          Comment


          • #6
            Does that affect mediavolume, or systemvolume?
            Plugins:
            BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

            Comment


            • #7
              1) Create a virtual device such as "Music volume". Device values are 0-100 so you can use it as 0-100% volume.
              2) Just create an event that sets the media player volume whenever "Music Volume" changes. Here's how (Let's say the virtual device is "M1"):

              Trigger:
              Condition: Device: Music Volume changed to any status

              Action:
              Run script: &hs.Plugin("Media Player").MusicAPI.Volume() =hs.DeviceValue("M1")

              Now you can set the volume of the Media Player with an X-10 device, or by voice recogntion with HS's built in VR commands for devices ("Set the Music Volume to 5%"). As an added bonus, if you set "M1" Off or On, it will set the volume to Mute or full volume!

              Comment


              • #8
                CJ,
                that worked! Now I just have a little problem...I am using the three channel rf wall sticky switches in various locations, the top one controls the light, the middle one is for various room specific things, the bottom one is for the speaker in that room. What I'm trying to do is to use that bottom one w/ the dim/bright for volume control, as well as the on/off controlling the status of that specific speaker. What i did was to use Oman's acrf plugin to shadow each x10 command from various wall switches. so, currently it is like this:

                x10 commands used to turn speaker on/off (and change dim/bright = vol)
                b10, b4, c3, d5

                so then if b10 is the dining room speaker (RF switch) Oman's plugin turns the the dining room speaker device on/off according to that switch. based on what you suggested, I added a second shadow to each device, routing it to the dimmable virtual device I created for music volume (v99)

                problem is, if i dim b10, it dims v99, which is good, but it shuts b10/dining room speaker off.

                I'm thinking that if I create a layer of seperation between the speaker and oman's plugin, and connect them with a conditional on/off event, the dimming may not affect it.

                ie, virtual device b10 (non dimable) event triggered by x10 on/off action turn dining room speaker on/off.

                would that work?
                Plugins:
                BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

                Comment


                • #9
                  Great thread! Thanks for the code CJ!

                  Comment


                  • #10
                    I know this is an old thread, but...
                    I used this in HS2, now with HS3 there is no Media Player plugin.
                    So how can I adjust this to work in HS3?

                    Thanks,
                    Tim

                    1) Create a virtual device such as "Music volume". Device values are 0-100 so you can use it as 0-100% volume.
                    2) Just create an event that sets the media player volume whenever "Music Volume" changes. Here's how (Let's say the virtual device is "M1"):

                    Trigger:
                    Condition: Device: Music Volume changed to any status

                    Action:
                    Run script: &hs.Plugin("Media Player").MusicAPI.Volume() =hs.DeviceValue("M1")

                    Now you can set the volume of the Media Player with an X-10 device, or by voice recogntion with HS's built in VR commands for devices ("Set the Music Volume to 5%"). As an added bonus, if you set "M1" Off or On, it will set the volume to Mute or full volume!
                    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                    No, Im from Iowa. I only work in outer space. Captain Kirk

                    Comment

                    Working...
                    X