AutoPatch Volume?
vining
Posts: 4,368
I'm just about done writing a module for the new AP 18 x18 w/ DSP and up until a couple of days ago I was programming with a AP unit that wasn't hooked up to any other audio equipment and all went well with no problems. I finally got it hooked up on site the other day but noticed my audible volume range wasn't that great. The lower bargraph indication 0 of a 0-100 scale was still audibly loud where I resonably expected mute or near mute results. On the other end of the scale the volume was loud but not as loud as I would have expected. It was a comfortably loud level and I'm using 55 watts per channel B & K amps. Not obnoxiuously loud or distorted as I would expect at +10 db out of the AP. My amp gain levels are sent mid range, so I do have play there. I'm sending converted absolute levels from -70 to + 10 and everything in between and my returned string mirrors (echos) my values but I'm not audibly getting the range I'm expected. I haven't adjusted any input gains or any EQ but that shouldn't affect my outputs in a manner where my low vloume is too too high and my high volume is too low.
I haven't gotten too deep into this yet because it does work and I have so many other things to get online and working before I isolate this problem.
To any of you guys that have used these AP switches before: you do get a full range of audible volume control, right! These are supposed to be absolute db values -70 to +10 being sent so it should be!
I haven't gotten too deep into this yet because it does work and I have so many other things to get online and working before I isolate this problem.
To any of you guys that have used these AP switches before: you do get a full range of audible volume control, right! These are supposed to be absolute db values -70 to +10 being sent so it should be!
0
Comments
I am using an Autopatch Precis LT 18x18 here at the office with B&K amps and the volume levels are no problem.
Jeff
[quopte]
Are you sending -700 and 100 for -70db and 10db?
[/quote]
That's probably what it is and I know that's what the manual says but it seems every time I tried 3 digits like that I would get some thing screwed up back. I though it was another one of those things where they chnage the paremeters from what's published and just don't let any one know. That sound like it matches my symptom, I give that a real second attemp.
I was using the conversion examples that was posted a month or so ago but that example didn't have the additional divide by 10 that's needed.
Thanks for the inputs!
Daniel do you have a real mute when you go all the way down to -700 or press mute? Somebody reported the following a little while ago in another forum.
I'll be there later this morning and check it out.
It might have been the poor excuse for a control system that guy was using.
The Precis with DSP also has a command to completely disconnect the output from any inputs.
I suspected about that Doug, but I just want to confirm.
Although I can capture the Autopatch volume ranges, parse them individually and convert them to 0-100 values, when I tried to store the Autopatch values in an array, they appeared in debug as values in the 60K range.
Here are my variable declarations and my string handler:
Although nVOLUME appears as the expected Autopatch level of -700 to +100 in debug, when I store the nVolume variable in the nAPVOL array, it goes from the expected values to values up in the 60,000's.
Does anyone have an idea why this is happening?
By the way, I was initially capturing the Autopatch strings in DATA.TEXT, but moved to this method in an attempt to follow Tech Note 616.
I'm not quite sure why this implementation would be in any way superior to working straight from DATA.TEXT, as I am not really creating a buffer, I am simply creating a variable called buffer.
Thanks to all who have posted code dealing with the Autopatch in the past.
I found it cleaner to parsed the return from the AP and store the value natively, that is, leave it as a singed integer, manipulate as a signed integer while adding or subtracting to increase or decrease the volume and only convert it to 0-100 scale to display as a level. I don't beleave in volume bar graph for active touch volume setting because it's very easy for someone to accidentially touch the bar graph at the high end and annoy the heck out of every one. I do like and use the bargraph for display and use up/dwn arrow to increase or decrease levels. Active bargraph to set lighting levels is one thing but IMHO not for setting audio levels especially w/ kids around!
In my example below, which was also posted earlier in this thread I added / 10 to the above examples for the level to dispaly correctly.
This is what I am trying to do as well, and it is working, except when I try to store the SINTEGER nVOLUME in the SINTEGER array nAPVOL [nCURRENT_ZONE].
When I increment or decrement the volume, the nVOLUME variable changes from -700 to 100 by tens, but the array values display in the 60,000's, and increment inconsistently... by relatively small amounts like 10's. Dividing by ten won't fix this.
This is happening in debug, and I am displaying in ASCII and decimal as appropriate.
It sounds an awful lot like a variable type overflow, as if ATOI wasn't returning a signed INT like it ought. I can't see anything in your code that runs it through an intermediate of the wrong type, but some internal typecasting might be introducing one. Have you tried changing nVolume to an SLONG and using ATOL instead? Another trick I have found that works in some cases is to short-circuit internal typecasting by not doing multiple conversions in the same statement ... which means no arithmetic on the value either, since they generated typecasting too. Your code is fine in that respect, but it's something to look for in this kind of situation.
I don't mean to hijack the thread (but I will anyway ), but I wanted to point out that you are able to set the bargraph level function to Drag and set the Range Time Up/Down values to control how quickly the level changes. I only point this out because I used to hate using bargraph buttons to set volume, but doing this in conjunction with two levels has changed my mind. (Two levels = one level for display, and a second level for setting the volume)
Jeff
Do you mean you have to drag the volume and simply pushing the bar graph at the top will not send the level to the top? If so, that I didn't know and haven't tried.
Unfortunately, the Autopatch level doesn't update as quickly on my panel as does the Denon receiver level. On the Denon, it is virtually simultaneous. The Autopatch has an appreciable lag that only begins after I have sent either a series of volume up commands, or even a single 'VA'- absolute volume command.
Denon provides the volume level in the feedback for a volume ramp command. The Autopatch needs to be asked to get the volume level. So what I do for the Autopatch is increment the vol level during a ramp with code and then poll it for vol level after the ramp is over.
In my program for this I do a vol level poll on the release of the volume up/down buttons. That way it happens right after they let go of the volume.
Thats what I'm talking about. But if you want to update the level feedback during the ramp you need to do it manually.
The following code should illustrate both points. If you want to play along, load the program and drop the variables in the watch window. Try changing the values of the variables and you?ll see there is no way to get a negative sign to display in the SINTEGER[] array. You?ll also see when you push button 1 the values will report back correctly with the expected values, it?s just the debugger having a bit of a brain fart. Here is the output when you push button 1 after the program boots:
Line 1 :: snVolume = -700 - 05:37:41
Line 2 :: snVolumes[nZone] = -700 - 05:37:41
Even though the debugger shows 64836 in the SINTEGER[] array.
The debugger (watch window) will display an SINTEGER correctly but it won?t display an SINTEGER in an SINTEGER[] array, instead it displays it as an INTEGER.
I assume when you watched the SINTEGER value in your program go from -700 thru -1 in the in the debugger you saw 64836 thru 65535 displayed in the SINTEGER[] array. The first clue that something is wrong is that SINTEGERs only range from -32K thru +32K however the debugger displays values thru 64K in the SINTEGER[] array. Reason being is because the debugger isn?t treating the sign bit as a sign bit in a signed integer array. Or at least that?s what it looks like.
I am late to this thread but I am not following why you're doing this crazy math business with the volume level. Why do you need to mathematically scale from 0-100 to 0-255 and back again?
The bargraph has 255 levels but the volume level the user sees is between 0-100%. You can set the range in the bargraph to 255 so no mathematical conversion is ever required. If you use $P% as your text then the volume gets updated to the correct percentage. I am controlling a Precis/dsp this way right now and it works great. I send the volume level to the panel with no converting and it shows up in the correct precentage.
Paul
Oh, you aren't using the module. My mistake, I wasn't looking close enough. I am using the module so I get 0-255 not the -70-+10 range.
Paul
Just wondering when you all have an A/V receiver in a room getting fed from an autopatch switcher...do you set the volume on the autopatch to an "absolute volume"? When/if you do, does the switcher ever loose that setting and when do you send that string to and absolute volume (online event, every time room is turned on, etc)?
Can someone tell me what the default baud rate is on a Precis switcher?
I thought the BCS protocol would have been improved when AMX took autopatch over, but I don't see any protocol improvements.
As all the documentation says, 9600 baud.
And what "improvements" on BCS did you have in mind? The protocol is simple, obvious, and complete - which one of those would you change?
As all the documentation says, 9600 baud.
[/QUOTE]
Thanks for the reply on this old thread. Maybe I am not looking at the correct protocol doc, but I don't see baud rate mentioned anywhere, I am looking at:
Instruction Manual - BCS Basic Control Structure Protocol (from product page on AMX's website)
and
Quick Start Guide - BCS Basic Control Structure Protocol (from product page on AMX's website)
Regarding improvements (only because you asked)
1) a way to fix the volume on any given output, without fear it will loose its set volume output
2) volume on a scale from 0 - 255 (really anything other than negative asci numbers)
3) Ability to set a max and min volume
4) Unsolicited response when ramping volume up and down
5) ability to save an initial turn on volume
(I realize all my issues with autopatch can be worked around through programming, but I should not have to...I guess that is my point. Autopatch being that it is AMX should be the easiest switcher to work with via the protocol and in my opinion it is not)
Some of the features you suggest have caused confounding issues when encountered in other devices - things to trip over or conflict with what you really want programmatic control of, things to turn off to get out of the way.