Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

ramping volume on a Marantz SR-5600 (Axcent 3)

Hi, I would like some help with having the volume ramp up or down as long as the touchpanel button is pressed. This is in Axcess and with an Axcent 3 controller. The previous amp was a Yamaha and was controlled IR, so a MIN_TO worked fine to send the IR continously as long as the button was being pushed.
Any ideas on how to write the code to send the volume up string to the Marantz repeatedly until the button is released. It seems that this should be simple to do, but it's been quite a while since I've programmed - i.e. pre-NetLinx
I tried a WHILE command, which immediately ramped the volume to maximum.

Any help is appreciated.

Jim

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Set a flag on the button press and release. Set the flag on a press, and turn it off on a release. Then in mainline, run a test with a delay:
    IF(VOLUME_FLAG)
    {
        WAIT 8 'VOLUME RAMPING'
            (* send volume command here *)
    }
    
    

    I've found the 8 to be a good starting value for the delay on RS-232 devices. Make it too high, and the ramping rate is too slow; make it too small, and you get buffer overruns when it's held to long. You need to tweak the value depending on the device. It's probably not strictly necessary, but I put a CANCEL_WAIT on the button release as well, so the ramping stops immediately, and doesn't get one more command due to the WAIT being active. I will usually set my flag to one for a volume up, and 2 for a volume down, then do another quick test to determine the right command to send.
  • westjrwestjr Posts: 2
    volume ramping

    Thanks Dave. It worked great. I thought I had done that, but I had the IF statement nested in the braces.
Sign In or Register to comment.