Home AMX User Forum AMX General Discussion

TP Design and Negitive Levels

I just noticed that I can no longer receive a negative value from a bargraph. This used to save me a lot of time when coding volume controls for devices that like negative numbers (Clearone?s) especially.

I swear I just did this a few weeks ago on a MVP-8400 with the 2.70.?? Firmware. Now with a MVP-8400i with 2.81.21 I can only get levels from 0-255. TP Design still lets you put in a negative number in the (Range High or Range Low) but when it time to send the master a negative value it jumps to 255.

This is frustrating, just when you find a good short cut it gets taken away. The 0-255 is bringing me back to the G3 days, and now I have to write extra code to account for negative values. Although the code is easy to write, it?s just sloppy.

Anyone having these problems or know what happen to the negative values?

My fear is that in the future if the panel is serviced and swapped out with a newer panel things will not work right.

Comments

  • ericmedleyericmedley Posts: 4,177
    I as a rule do not change the level ranges in TP design and do it exclusively from the program. It involves a little math and algebra but it's good practice.

    I remember the ClearOne XAP400/800 present a little problem in that the box can send you a level of both "0.0" or "-0.0" depending upon which way the ramp is heading.

    I take the data string in and do a set of conditionals to determing the level coming back. I don't have the code in front of me at the time. So my actual numbers may be off but here's the theory

    I think levels go from -77 to +15. In addition there is a 'min' which means infinty and a 'max' which means +16. Ther is also a zero.

    So, (assuming my numbers are correct) there are 95 steps in the scale from lowest to highest.

    What I do is add an offset to keep the volume always positive, add the conditional that deals with it being 0 or -0, do the cross multiplication and send the fader level to the touch panel from 0-255.

    The reason I don't change the level ranges in TP design is that I can change out a peice of gear without having to reprogram the touch panel.
  • yuriyuri Posts: 861
    ericmedley wrote:
    I as a rule do not change the level ranges in TP design and do it exclusively from the program. It involves a little math and algebra but it's good practice.

    I remember the ClearOne XAP400/800 present a little problem in that the box can send you a level of both "0.0" or "-0.0" depending upon which way the ramp is heading.

    I take the data string in and do a set of conditionals to determing the level coming back. I don't have the code in front of me at the time. So my actual numbers may be off but here's the theory

    I think levels go from -77 to +15. In addition there is a 'min' which means infinty and a 'max' which means +16. Ther is also a zero.

    So, (assuming my numbers are correct) there are 95 steps in the scale from lowest to highest.

    What I do is add an offset to keep the volume always positive, add the conditional that deals with it being 0 or -0, do the cross multiplication and send the fader level to the touch panel from 0-255.

    The reason I don't change the level ranges in TP design is that I can change out a peice of gear without having to reprogram the touch panel.

    exactly my point, but i didn't want to type a long story like you did :p
  • dthorsondthorson Posts: 103
    I think we code the Cleaone's a little different.

    I don't send a ramp command, I just send the level of the bargraph of the TP.
    This is why using a negative value was so helpful. Just in the level_event send that current level to the clearone.

    I know the work arounds for codding with an offset is easy to do, and I'm doing that.

    I was just curious if anyone was using the negative levels from TP's or am I the only one.

    Thanks.
  • ericmedleyericmedley Posts: 4,177
    yuri wrote:
    exactly my point, but i didn't want to type a long story like you did :p

    Fair enuff. I must admit... I'm way too right-brained to be an AMX programmer :)
  • NMarkRobertsNMarkRoberts Posts: 455
    Here's the code
    switch (sModelName)
      {
      case 'AP800':
        {
        siVolumeMinimum = -20
        siVolumeMaximum = 20
        }
    
      default:
        {
        siVolumeMinimum = -66
        siVolumeMaximum = 20		
        }
      }
    
    define_function sinteger SignedAdjustFrom255( (* Result in range below        *)
      integer  nArgValue                  , (* Input  - Value in range 0 - 255   *)
      sinteger siArgMinimum               , (* Input  - Minimum input value      *)
      sinteger siArgMaximum               ) (* Input  - Maximum input value      *)
    {
    stack_var sinteger siMyValue
    
    (* Have to do this to avoid a compiler warning *)
    siMyValue                                        = type_cast(nArgValue)
    
    return ((siMyValue * (siArgMaximum - siArgMinimum)) / 255) + siArgMinimum;
    }
    
    
    define_function AddGainCommand(
      char    sArgInputOutput[],
      integer nArgChannel,
      integer nArgVolume)
    {
    stack_var char    sMyValue  [10]
    stack_var char    sMyCommand[100]
    
    sMyValue = itoa(type_cast(SignedAdjustFrom255(nArgVolume, siVolumeMinimum, siVolumeMaximum)))
    sMyCommand  = "'#',sModelNumber,sDeviceNumber, ' GAIN ', 
    sChannels[nArgChannel],' ', (* 12345678ABCD *)
    sArgInputOutput,' ', (* I / O *)
    sMyValue,
    ' A'" (* A = Absolute level *)
    
    // etc
    }
    
  • dthorsondthorson Posts: 103
    heres my code

    This is all the code I used when negative levels was working.
    LEVEL_EVENT[vdvTPa,1]		// PROGRAM LEVEL VOLUME
    {
      IF(iVOLUME_MUTE[1])
      {
    	SEND_STRING dvDSP,"'#50 MUTE C P 0',$0D"//UNMUTE
    	SEND_STRING dvDSP,"'#50 MUTE D P 0',$0D"//UNMUTE
    	iVOLUME_MUTE[1] = 0
      }
      SEND_STRING dvDSP,"'#50 GAIN C P ',ITOA(LEVEL.VALUE),' A',$0D"
      SEND_STRING dvDSP,"'#50 GAIN D P ',ITOA(LEVEL.VALUE),' A',$0D"
    }
    
  • FrankieFrankie Posts: 71
    Yes I have noticed this also. I called tech support and they told me that theirs worked fine and that I must be doing something wrong on my end. The last few that I have done I ended up doing them the "old" way. Guess we'll just have to wait and see if AMX gets it fixed.
  • dthorsondthorson Posts: 103
    So it looks like negative levels has gone away because of a glitch in M2M systems.
    http://www.amx.com/techsupport/techNote.asp?id=765

    I would prefer that they keep the levels negative working, and if you are doing M2M say it's not supported.
Sign In or Register to comment.