Happy Friday... Oh, and Volume Ramp Request
GasHed
Junior Member
Happy Friday all,
First, how do you do that really cool posting of code in it's own text area with scroll bars? I tried <code></code> but that didn't work.
Second, does anyone have a good example of doing volume ramping with an RS232 device that takes VOL(0-255) commands? Right now, I have something like this:
ACTIVE(FIND_STRING(curFB,'VOL',1)):
{
REMOVE_STRING(curFB,'VOL',1)
VOLUME[1] = MVOLTOVOL(ATOI(curFB))
SEND_LEVEL vdvMAESTRO,1,VOLUME[1]
IF([vdvMAESTRO,24])
{
WAIT 1{CALL 'VOL_RAMP'(1, VOLUME[1], 1)}
}
IF([vdvMAESTRO,25])
{
WAIT 1{CALL 'VOL_RAMP'(0, VOLUME[1], 1)}
}
}
In a nutshell, I start the ramp with a VOL command, then when I recieve the ack back from the device, I send another VOL command, incremented or decremented by one if the ramp channel is still active. This works ok, but I'm curious as to what the 'standard' way or best practice way of doing volume ramps are in this case. I figured you geniuses would know
A sample module that does this would be awesome!
Thanks,
Pat
First, how do you do that really cool posting of code in it's own text area with scroll bars? I tried <code></code> but that didn't work.
Second, does anyone have a good example of doing volume ramping with an RS232 device that takes VOL(0-255) commands? Right now, I have something like this:
ACTIVE(FIND_STRING(curFB,'VOL',1)):
{
REMOVE_STRING(curFB,'VOL',1)
VOLUME[1] = MVOLTOVOL(ATOI(curFB))
SEND_LEVEL vdvMAESTRO,1,VOLUME[1]
IF([vdvMAESTRO,24])
{
WAIT 1{CALL 'VOL_RAMP'(1, VOLUME[1], 1)}
}
IF([vdvMAESTRO,25])
{
WAIT 1{CALL 'VOL_RAMP'(0, VOLUME[1], 1)}
}
}
In a nutshell, I start the ramp with a VOL command, then when I recieve the ack back from the device, I send another VOL command, incremented or decremented by one if the ramp channel is still active. This works ok, but I'm curious as to what the 'standard' way or best practice way of doing volume ramps are in this case. I figured you geniuses would know
Thanks,
Pat
Comments
-
Can't say I'd do it any differently. In fact, I did almost this exact same thing to ramp the volume on an LG plasma display recently.
The only thing I would add would be "check" code that prevents your routine from sending a ramp command when the volume is already all the way up or all the way down. You can link your button feedback off of that as well - makes it slick looking when your TP buttons "release", telling the user "I can't go any furhter - I'm done!".
- Chip -
Pat,
BTW, it's [ CODE ][ /CODE ] . . . without the spaces. -
Thanks
Thanks for the feedback...
Oh, and I check to see if I'm at the min or max volume in that VOL_RAMP function... but turning off the feedback is a neat idea.
Pat
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums