Home AMX User Forum AMX Technical Discussion

Extron SSP volume control

I'm very new to this and can really use some help!

I'm replacing a broken sony receiver that was controlled with IR to an Extron SSP 7.1 surround processor (requires a command such as 10V0D to set the the volume at 10% I have all the input switching and processing commands working fine, but I'm at a loss of where to start for the volume control.

Ideally I'd like a bar graph showing feedback with a + and - button for control (how to send 0-100 for the volume level, and then scale that to 0-255 for feedback.)
I already have it setting back to the default volume when switching sources to as to not hurt hearing or speakers if the new source is already playing at a much higher level.

any help would be greatly appreciated!

Comments

  • All you need to do is have a variable that you use to keep track of the volume level. When the volume up button is pressed, check to make sure that the volume is less than 101 (to get all the way to 100). If it is less than 101, then you can increase it by 1 and send that level to the Extron using send_string and the appropriate commands.

    When the down button is pressed, check to make sure that the value is greater than 0. If it is, then you can decrease the variable by 1 and send the appropriate commands.

    For the feedback to a bargraph, it would be easier to set the limits of the bargraph to match the values you are going to send it rather than scale it. You can scale the value, and there is a good function here on the forums if you search for scale_range that I have used many times, but it would probably just be easier to change the limits on the bargraph.

    Hope that helps.
  • samossamos Posts: 106
    a short example

    //VOL UP
    BUTTON_EVENT[dvTP,1]
    {
    PUSH:
    {
    if(nVOl<=99)
    nVol=nVOl+1
    send_command dvVOl,"'vol='itoa(nVol)"
    send_level dvTP,1,vVol
    }
    hold[5]:
    {
    if(nVOl<=99)
    nVol=nVOl+1
    send_command dvVOl,"'vol='itoa(nVol)"
    send_level dvTP,1,vVol
    }
    }



    //VOL DN
    BUTTON_EVENT[dvTP,2]
    {
    PUSH:
    {
    if(nVOl>=1)
    nVol=nVOl-1
    send_command dvVOl,"'vol='itoa(nVol)"
    send_level dvTP,1,vVol
    }
    hold[5]:
    {
    if(nVOl>=1)
    nVol=nVOl-1
    send_command dvVOl,"'vol='itoa(nVol)"
    send_level dvTP,1,vVol
    }
    }
Sign In or Register to comment.