Home AMX User Forum NetLinx Studio

Kramer protocol 2000

Kramer VP-1608, I can not understand as loudness copes.
It is necessary to make so by pressing the button loudness
smoothly would increase to a maximum and back.

Two ranges of loudness, from 128 to 255 the first, and the second
from 128 to 255 but before a command needs to send a line
SEND_STRING dvKRAMER, "$3F, $80, $81, $81".

Problems basically at transition from one range in another.
From smaller in big loudness on pair commands minimum,
and from big in smaller one passes with the maximum loudness.

Please help to understand!!!

Tried here so:

BUTTON_EVENT [KABINET,2000] // VOL +
{
PUSH:
{
IF((VOL[1]>=128)&&(VOL[1]<255))
{
VOL[1]=VOL[1]+1
SEND_STRING dvKRAMER, "$16, $82,VOL[1], $81"
}
ELSE
{
IF((VOL[1]>=255)&&(VOL[1]<=355))
{
VOL[1]=VOL[1]+1
SEND_STRING dvKRAMER, "$3F, $80, $81, $81"
SEND_STRING dvKRAMER, "$16, $82,VOL[1]-128, $81"
}
}
}
HOLD[1,REPEAT]:
{
IF((VOL[1]>=128)&&(VOL[1]<255))
{
VOL[1]=VOL[1]+1
SEND_STRING dvKRAMER, "$16, $82,VOL[1], $81"
}
ELSE
{
IF((VOL[1]>=255)&&(VOL[1]<=355))
{
VOL[1]=VOL[1]+1
SEND_STRING dvKRAMER, "$3F, $80, $81, $81"
SEND_STRING dvKRAMER, "$16, $82,VOL[1]-128, $81"
}
}
}
}

BUTTON_EVENT [KABINET,2001] // - VOL
{
PUSH:
{
IF((VOL[1]>=128)&&(VOL[1]<=255))
{
VOL[1]=VOL[1]-1
SEND_STRING dvKRAMER, "$16, $82,VOL[1], $81"
}
ELSE
{
IF((VOL[1]>=256)&&(VOL[1]<=355))
{
VOL[1]=VOL[1]-1
SEND_STRING dvKRAMER, "$3F, $80, $81, $81"
SEND_STRING dvKRAMER, "$16, $82,VOL[1]-128, $81"
}
}
}
HOLD[1,REPEAT]:
{
IF((VOL[1]>=128)&&(VOL[1]<=255))
{
VOL[1]=VOL[1]-1
SEND_STRING dvKRAMER, "$16, $82,VOL[1], $81"
}
ELSE
{
IF((VOL[1]>=256)&&(VOL[1]<=355))
{
VOL[1]=VOL[1]-1
SEND_STRING dvKRAMER, "$3F, $80, $81, $81"
SEND_STRING dvKRAMER, "$16, $82,VOL[1]-128, $81"
}
}
}
}
Sign In or Register to comment.